':"")),e.coverpage&&(f+=(o=", 100%, 85%",'')),e.logo&&(o=/^data:image/.test(e.logo),n=/(?:http[s]?:)?\/\//.test(e.logo),i=/^\./.test(e.logo),o||n||i||(e.logo=q(this.router.getBasePath(),e.logo))),f+=(i=(n=e).name||"",""+('')+' '),this._renderTo(u,f,!0)):this.rendered=!0,e.mergeNavbar&&s?p=b(".sidebar"):(c.classList.add("app-nav"),e.repo||c.classList.add("no-badge")),e.loadNavbar&&y(p,c),e.themeColor&&(v.head.appendChild(w("div","").firstElementChild),a=e.themeColor,window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)")||(e=k("style:not(.inserted),link"),[].forEach.call(e,function(e){"STYLE"===e.nodeName?Q(e,a):"LINK"===e.nodeName&&(e=e.getAttribute("href"),/\.css$/.test(e)&&X(e).then(function(e){e=w("style",e);_.appendChild(e),Q(e,a)}))}))),this._updateRender(),S(h,"ready")},n}(function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype.routes=function(){return this.config.routes||{}},n.prototype.matchVirtualRoute=function(t){var a=this.routes(),r=Object.keys(a),c=function(){return null};function u(){var e=r.shift();if(!e)return c(null);var n=A(o=(i="^",0===(o=e).indexOf(i)?o:"^"+o),"$")?o:o+"$",i=t.match(n);if(!i)return u();var o=a[e];if("string"==typeof o)return c(o);if("function"!=typeof o)return u();n=o,e=Xn(),o=e[0];return(0,e[1])(function(e){return"string"==typeof e?c(e):!1===e?c(null):u()}),n.length<=2?o(n(t,i)):n(t,i,o)}return{then:function(e){c=e,u()}}},n}(function(i){function e(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];i.apply(this,e),this.route={}}return i&&(e.__proto__=i),((e.prototype=Object.create(i&&i.prototype)).constructor=e).prototype.updateRender=function(){this.router.normalize(),this.route=this.router.parse(),h.setAttribute("data-page",this.route.file)},e.prototype.initRouter=function(){var n=this,e=this.config,e=new("history"===(e.routerMode||"hash")&&t?D:H)(e);this.router=e,this.updateRender(),U=this.route,e.onchange(function(e){n.updateRender(),n._updateRender(),U.path!==n.route.path?(n.$fetch(d,n.$resetEvents.bind(n,e.source)),U=n.route):n.$resetEvents(e.source)})},e}(function(e){function n(){e.apply(this,arguments)}return e&&(n.__proto__=e),((n.prototype=Object.create(e&&e.prototype)).constructor=n).prototype.initLifecycle=function(){var i=this;this._hooks={},this._lifecycle={},["init","mounted","beforeEach","afterEach","doneEach","ready"].forEach(function(e){var n=i._hooks[e]=[];i._lifecycle[e]=function(e){return n.push(e)}})},n.prototype.callHook=function(e,t,a){void 0===a&&(a=d);var r=this._hooks[e],c=this.config.catchPluginErrors,u=function(n){var e=r[n];if(n>=r.length)a(t);else if("function"==typeof e){var i="Docsify plugin error";if(2===e.length)try{e(t,function(e){t=e,u(n+1)})}catch(e){if(!c)throw e;console.error(i,e),u(n+1)}else try{var o=e(t);t=void 0===o?t:o,u(n+1)}catch(e){if(!c)throw e;console.error(i,e),u(n+1)}}else u(n+1)};u(0)},n}(we))))))));function Kn(e,n,i){return Qn&&Qn.abort&&Qn.abort(),Qn=X(e,!0,i)}window.Docsify={util:Me,dom:n,get:X,slugify:Tn,version:"4.13.1"},window.DocsifyCompiler=In,window.marked=Sn,window.Prism=Pn,e(function(e){return new Jn})}();
diff --git a/html/assets/js/mermaid.min.js b/html/assets/js/mermaid.min.js
index 061ce28..b631153 100644
--- a/html/assets/js/mermaid.min.js
+++ b/html/assets/js/mermaid.min.js
@@ -1,13 +1,1642 @@
-var __defProp=Object.defineProperty,__defNormalProp=(i,c,p)=>c in i?__defProp(i,c,{enumerable:!0,configurable:!0,writable:!0,value:p}):i[c]=p,__publicField=(i,c,p)=>(__defNormalProp(i,"symbol"!=typeof c?c+"":c,p),p);!function(i,c){"object"==typeof exports&&"undefined"!=typeof module?module.exports=c():"function"==typeof define&&define.amd?define(c):(i="undefined"!=typeof globalThis?globalThis:i||self).mermaid=c()}(this,(function(){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var i,p={exports:{}};(i=p).exports=function(){var c;function f(){return c.apply(null,arguments)}function a(i){return i instanceof Array||"[object Array]"===Object.prototype.toString.call(i)}function F(i){return null!=i&&"[object Object]"===Object.prototype.toString.call(i)}function c2(i,c){return Object.prototype.hasOwnProperty.call(i,c)}function L(i){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(i).length;for(var c in i)if(c2(i,c))return;return 1}function o(i){return void 0===i}function u(i){return"number"==typeof i||"[object Number]"===Object.prototype.toString.call(i)}function V(i){return i instanceof Date||"[object Date]"===Object.prototype.toString.call(i)}function G(i,c){for(var p=[],b=i.length,_=0;_>>0,b=0;b Ae(i)?(k=i+1,c-Ae(i)):(k=i,c),{year:k,dayOfYear:p}}function qe(i,c,p){var b,_,k=ze(i.year(),c,p);return(k=Math.floor((i.dayOfYear()-k-1)/7)+1)<1?b=k+P(_=i.year()-1,c,p):k>P(i.year(),c,p)?(b=k-P(i.year(),c,p),_=i.year()+1):(_=i.year(),b=k),{week:b,year:_}}function P(i,c,p){var b=ze(i,c,p);return c=ze(i+1,c,p),(Ae(i)-b+c)/7}function Be(i,c){return i.slice(c,7).concat(i.slice(0,c))}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),t("week","w"),t("isoWeek","W"),n("week",5),n("isoWeek",5),v("w",K),v("ww",K,z),v("W",K),v("WW",K,z),Te(["w","ww","W","WW"],(function(i,c,p,b){c[b.substr(0,1)]=g(i)})),s("d",0,"do","day"),s("dd",0,0,(function(i){return this.localeData().weekdaysMin(this,i)})),s("ddd",0,0,(function(i){return this.localeData().weekdaysShort(this,i)})),s("dddd",0,0,(function(i){return this.localeData().weekdays(this,i)})),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),t("day","d"),t("weekday","e"),t("isoWeekday","E"),n("day",11),n("weekday",11),n("isoWeekday",11),v("d",K),v("e",K),v("E",K),v("dd",(function(i,c){return c.weekdaysMinRegex(i)})),v("ddd",(function(i,c){return c.weekdaysShortRegex(i)})),v("dddd",(function(i,c){return c.weekdaysRegex(i)})),Te(["dd","ddd","dddd"],(function(i,c,p,b){null!=(b=p._locale.weekdaysParse(i,b,p._strict))?c.d=b:m(p).invalidWeekday=i})),Te(["d","e","E"],(function(i,c,p,b){c[b]=g(i)}));var ye="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),me="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),be="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),_e=vt,xe=vt,ve=vt;function nt(){function e3(i,c){return c.length-i.length}for(var i,c,p,b=[],_=[],k=[],w=[],T=0;T<7;T++)p=l([2e3,1]).day(T),i=M(this.weekdaysMin(p,"")),c=M(this.weekdaysShort(p,"")),p=M(this.weekdays(p,"")),b.push(i),_.push(c),k.push(p),w.push(i),w.push(c),w.push(p);b.sort(e3),_.sort(e3),k.sort(e3),w.sort(e3),this._weekdaysRegex=new RegExp("^("+w.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+k.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+b.join("|")+")","i")}function st(){return this.hours()%12||12}function it(i,c){s(i,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),c)}))}function rt(i,c){return c._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,st),s("k",["kk",2],0,(function(){return this.hours()||24})),s("hmm",0,0,(function(){return""+st.apply(this)+r(this.minutes(),2)})),s("hmmss",0,0,(function(){return""+st.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)})),s("Hmm",0,0,(function(){return""+this.hours()+r(this.minutes(),2)})),s("Hmmss",0,0,(function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)})),it("a",!0),it("A",!1),t("hour","h"),n("hour",13),v("a",rt),v("A",rt),v("H",K),v("h",K),v("k",K),v("HH",K,z),v("hh",K,z),v("kk",K,z),v("hmm",J),v("hmmss",tt),v("Hmm",J),v("Hmmss",tt),D(["H","HH"],jt),D(["k","kk"],(function(i,c,p){i=g(i),c[jt]=24===i?0:i})),D(["a","A"],(function(i,c,p){p._isPm=p._locale.isPM(i),p._meridiem=i})),D(["h","hh"],(function(i,c,p){c[jt]=g(i),m(p).bigHour=!0})),D("hmm",(function(i,c,p){var b=i.length-2;c[jt]=g(i.substr(0,b)),c[Wt]=g(i.substr(b)),m(p).bigHour=!0})),D("hmmss",(function(i,c,p){var b=i.length-4,_=i.length-2;c[jt]=g(i.substr(0,b)),c[Wt]=g(i.substr(b,2)),c[te]=g(i.substr(_)),m(p).bigHour=!0})),D("Hmm",(function(i,c,p){var b=i.length-2;c[jt]=g(i.substr(0,b)),c[Wt]=g(i.substr(b))})),D("Hmmss",(function(i,c,p){var b=i.length-4,_=i.length-2;c[jt]=g(i.substr(0,b)),c[Wt]=g(i.substr(b,2)),c[te]=g(i.substr(_))})),vt=de("Hours",!0);var ke,we={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ie,monthsShort:se,week:{dow:0,doy:6},weekdays:ye,weekdaysMin:be,weekdaysShort:me,meridiemParse:/[ap]\.?m?\.?/i},Ce={},Se={};function lt(i){return i&&i.toLowerCase().replace("_","-")}function ht(i){for(var c,p,b,_,k=0;k=c&&function(i,c){for(var p=Math.min(i.length,c.length),b=0;b=c-1)break;c--}k++}return ke}function dt(c){var p;if(void 0===Ce[c]&&i&&i.exports&&null!=c.match("^[^/\\\\]*$"))try{p=ke._abbr,function commonjsRequire(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}("./locale/"+c),ct(p)}catch(i){Ce[c]=null}return Ce[c]}function ct(i,c){return i&&((c=o(c)?mt(i):ft(i,c))?ke=c:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),ke._abbr}function ft(i,c){if(null===c)return delete Ce[i],null;var p,b=we;if(c.abbr=i,null!=Ce[i])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),b=Ce[i]._config;else if(null!=c.parentLocale)if(null!=Ce[c.parentLocale])b=Ce[c.parentLocale]._config;else{if(null==(p=dt(c.parentLocale)))return Se[c.parentLocale]||(Se[c.parentLocale]=[]),Se[c.parentLocale].push({name:i,config:c}),null;b=p._config}return Ce[i]=new K2(X(b,c)),Se[i]&&Se[i].forEach((function(i){ft(i.name,i.config)})),ct(i),Ce[i]}function mt(i){var c;if(!(i=i&&i._locale&&i._locale._abbr?i._locale._abbr:i))return ke;if(!a(i)){if(c=dt(i))return c;i=[i]}return ht(i)}function _t(i){var c=i._a;return c&&-2===m(i).overflow&&(c=c[Mt]<0||11We(c[Dt],c[Mt])?It:c[jt]<0||24P(k,S,O)?m(b)._overflowWeeks=!0:null!=N?m(b)._overflowWeekday=!0:(R=$e(k,w,T,S,O),b._a[Dt]=R.year,b._dayOfYear=R.dayOfYear)),null!=i._dayOfYear&&(_=bt(i._a[Dt],p[Dt]),(i._dayOfYear>Ae(_)||0===i._dayOfYear)&&(m(i)._overflowDayOfYear=!0),N=Ze(_,0,i._dayOfYear),i._a[Mt]=N.getUTCMonth(),i._a[It]=N.getUTCDate()),c=0;c<3&&null==i._a[c];++c)i._a[c]=Y[c]=p[c];for(;c<7;c++)i._a[c]=Y[c]=null==i._a[c]?2===c?1:0:i._a[c];24===i._a[jt]&&0===i._a[Wt]&&0===i._a[te]&&0===i._a[ee]&&(i._nextDay=!0,i._a[jt]=0),i._d=(i._useUTC?Ze:je).apply(null,Y),k=i._useUTC?i._d.getUTCDay():i._d.getDay(),null!=i._tzm&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[jt]=24),i._w&&void 0!==i._w.d&&i._w.d!==k&&(m(i).weekdayMismatch=!0)}}function Tt(i){if(i._f===f.ISO_8601)St(i);else if(i._f===f.RFC_2822)Ot(i);else{i._a=[],m(i).empty=!0;for(var c,p,b,_,k,w=""+i._i,S=w.length,O=0,R=ae(i._f,i._locale).match(T)||[],Y=R.length,j=0;ji.valueOf():i.valueOf()"}),j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},j.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},j.eraName=function(){for(var i,c=this.localeData().eras(),p=0,b=c.length;pthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},j.isLocal=function(){return!!this.isValid()&&!this._isUTC},j.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},j.isUtc=At,j.isUTC=At,j.zoneAbbr=function(){return this._isUTC?"UTC":""},j.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},j.dates=e("dates accessor is deprecated. Use date instead.",at),j.months=e("months accessor is deprecated. Use month instead",Ge),j.years=e("years accessor is deprecated. Use year instead",ge),j.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(i,c){return null!=i?(this.utcOffset(i="string"!=typeof i?-i:i,c),this):-this.utcOffset()})),j.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var i,c={};return $(c,this),(c=Nt(c))._a?(i=(c._isUTC?l:W)(c._a),this._isDSTShifted=this.isValid()&&0{},debug:(...i)=>{},info:(...i)=>{},warn:(...i)=>{},error:(...i)=>{},fatal:(...i)=>{}},setLogLevel$1=function(i="fatal"){let c=_.fatal;"string"==typeof i?(i=i.toLowerCase())in _&&(c=_[i]):"number"==typeof i&&(c=i),k.trace=()=>{},k.debug=()=>{},k.info=()=>{},k.warn=()=>{},k.error=()=>{},k.fatal=()=>{},c<=_.fatal&&(k.fatal=console.error?console.error.bind(console,format$1("FATAL"),"color: orange"):console.log.bind(console,"[35m",format$1("FATAL"))),c<=_.error&&(k.error=console.error?console.error.bind(console,format$1("ERROR"),"color: orange"):console.log.bind(console,"[31m",format$1("ERROR"))),c<=_.warn&&(k.warn=console.warn?console.warn.bind(console,format$1("WARN"),"color: orange"):console.log.bind(console,"[33m",format$1("WARN"))),c<=_.info&&(k.info=console.info?console.info.bind(console,format$1("INFO"),"color: lightblue"):console.log.bind(console,"[34m",format$1("INFO"))),c<=_.debug&&(k.debug=console.debug?console.debug.bind(console,format$1("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",format$1("DEBUG"))),c<=_.trace&&(k.trace=console.debug?console.debug.bind(console,format$1("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",format$1("TRACE")))},format$1=i=>`%c${b().format("ss.SSS")} : ${i} : `;var w={};Object.defineProperty(w,"__esModule",{value:!0});var T=w.sanitizeUrl=void 0,S=/^([^\w]*)(javascript|data|vbscript)/im,O=/(\w+)(^\w|;)?/g,N=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,R=/^([^:]+):/gm,Y=[".","/"];function ascending$1(i,c){return null==i||null==c?NaN:ic?1:i>=c?0:NaN}function descending$1(i,c){return null==i||null==c?NaN:ci?1:c>=i?0:NaN}function bisector(i){let c,p,b;function left2(i,b,_=0,k=i.length){if(_>>1;p(i[c],b)<0?_=c+1:k=c}while(_ascending$1(i(c),p),b=(c,p)=>i(c)-p):(c=i===ascending$1||i===descending$1?i:zero$1,p=i,b=i),{left:left2,center:function center2(i,c,p=0,_=i.length){const k=left2(i,c,p,_-1);return k>p&&b(i[k-1],c)>-b(i[k],c)?k-1:k},right:function right2(i,b,_=0,k=i.length){if(_>>1;p(i[c],b)<=0?_=c+1:k=c}while(_-1}(c))return c;var p=c.match(R);if(!p)return c;var b=p[0];return S.test(b)?"about:blank":c};const j=bisector(ascending$1).right;bisector((function number$3(i){return null===i?NaN:+i})).center;const z=j;class InternMap extends Map{constructor(i,c=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:c}}),null!=i)for(const[c,p]of i)this.set(c,p)}get(i){return super.get(intern_get(this,i))}has(i){return super.has(intern_get(this,i))}set(i,c){return super.set(function intern_set({_intern:i,_key:c},p){const b=c(p);return i.has(b)?i.get(b):(i.set(b,p),p)}(this,i),c)}delete(i){return super.delete(function intern_delete({_intern:i,_key:c},p){const b=c(p);i.has(b)&&(p=i.get(b),i.delete(b));return p}(this,i))}}function intern_get({_intern:i,_key:c},p){const b=c(p);return i.has(b)?i.get(b):p}function keyof(i){return null!==i&&"object"==typeof i?i.valueOf():i}var U=Math.sqrt(50),H=Math.sqrt(10),Z=Math.sqrt(2);function tickIncrement(i,c,p){var b=(c-i)/Math.max(0,p),_=Math.floor(Math.log(b)/Math.LN10),k=b/Math.pow(10,_);return _>=0?(k>=U?10:k>=H?5:k>=Z?2:1)*Math.pow(10,_):-Math.pow(10,-_)/(k>=U?10:k>=H?5:k>=Z?2:1)}function tickStep(i,c,p){var b=Math.abs(c-i)/Math.max(0,p),_=Math.pow(10,Math.floor(Math.log(b)/Math.LN10)),k=b/_;return k>=U?_*=10:k>=H?_*=5:k>=Z&&(_*=2),c=c)&&(p=c);else{let b=-1;for(let _ of i)null!=(_=c(_,++b,i))&&(p<_||void 0===p&&_>=_)&&(p=_)}return p}function min$2(i,c){let p;if(void 0===c)for(const c of i)null!=c&&(p>c||void 0===p&&c>=c)&&(p=c);else{let b=-1;for(let _ of i)null!=(_=c(_,++b,i))&&(p>_||void 0===p&&_>=_)&&(p=_)}return p}function identity$5(i){return i}var K=1e-6;function translateX(i){return"translate("+i+",0)"}function translateY(i){return"translate(0,"+i+")"}function number$2(i){return c=>+i(c)}function center(i,c){return c=Math.max(0,i.bandwidth()-2*c)/2,i.round()&&(c=Math.round(c)),p=>+i(p)+c}function entering(){return!this.__axis}function axis(i,c){var p=[],b=null,_=null,k=6,w=6,T=3,S="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,O=1===i||4===i?-1:1,N=4===i||2===i?"x":"y",R=1===i||3===i?translateX:translateY;function axis2(Y){var j=null==b?c.ticks?c.ticks.apply(c,p):c.domain():b,z=null==_?c.tickFormat?c.tickFormat.apply(c,p):identity$5:_,U=Math.max(k,0)+T,H=c.range(),Z=+H[0]+S,J=+H[H.length-1]+S,tt=(c.bandwidth?center:number$2)(c.copy(),S),et=Y.selection?Y.selection():Y,at=et.selectAll(".domain").data([null]),ot=et.selectAll(".tick").data(j,c).order(),ut=ot.exit(),pt=ot.enter().append("g").attr("class","tick"),gt=ot.select("line"),yt=ot.select("text");at=at.merge(at.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),ot=ot.merge(pt),gt=gt.merge(pt.append("line").attr("stroke","currentColor").attr(N+"2",O*k)),yt=yt.merge(pt.append("text").attr("fill","currentColor").attr(N,O*U).attr("dy",1===i?"0em":3===i?"0.71em":"0.32em")),Y!==et&&(at=at.transition(Y),ot=ot.transition(Y),gt=gt.transition(Y),yt=yt.transition(Y),ut=ut.transition(Y).attr("opacity",K).attr("transform",(function(i){return isFinite(i=tt(i))?R(i+S):this.getAttribute("transform")})),pt.attr("opacity",K).attr("transform",(function(i){var c=this.parentNode.__axis;return R((c&&isFinite(c=c(i))?c:tt(i))+S)}))),ut.remove(),at.attr("d",4===i||2===i?w?"M"+O*w+","+Z+"H"+S+"V"+J+"H"+O*w:"M"+S+","+Z+"V"+J:w?"M"+Z+","+O*w+"V"+S+"H"+J+"V"+O*w:"M"+Z+","+S+"H"+J),ot.attr("opacity",1).attr("transform",(function(i){return R(tt(i)+S)})),gt.attr(N+"2",O*k),yt.attr(N,O*U).text(z),et.filter(entering).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===i?"start":4===i?"end":"middle"),et.each((function(){this.__axis=tt}))}return axis2.scale=function(i){return arguments.length?(c=i,axis2):c},axis2.ticks=function(){return p=Array.from(arguments),axis2},axis2.tickArguments=function(i){return arguments.length?(p=null==i?[]:Array.from(i),axis2):p.slice()},axis2.tickValues=function(i){return arguments.length?(b=null==i?null:Array.from(i),axis2):b&&b.slice()},axis2.tickFormat=function(i){return arguments.length?(_=i,axis2):_},axis2.tickSize=function(i){return arguments.length?(k=w=+i,axis2):k},axis2.tickSizeInner=function(i){return arguments.length?(k=+i,axis2):k},axis2.tickSizeOuter=function(i){return arguments.length?(w=+i,axis2):w},axis2.tickPadding=function(i){return arguments.length?(T=+i,axis2):T},axis2.offset=function(i){return arguments.length?(S=+i,axis2):S},axis2}var J={value:()=>{}};function dispatch(){for(var i,c=0,p=arguments.length,b={};c =0&&(p=i.slice(b+1),i=i.slice(0,b)),i&&!c.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:p}}))}function get$3(i,c){for(var p,b=0,_=i.length;b<_;++b)if((p=i[b]).name===c)return p.value}function set$3(i,c,p){for(var b=0,_=i.length;b<_;++b)if(i[b].name===c){i[b]=J,i=i.slice(0,b).concat(i.slice(b+1));break}return null!=p&&i.push({name:c,value:p}),i}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(i,c){var p,b=this._,_=parseTypenames$1(i+"",b),k=-1,w=_.length;if(!(arguments.length<2)){if(null!=c&&"function"!=typeof c)throw new Error("invalid callback: "+c);for(;++k0)for(var p,b,_=new Array(p),k=0;k=0&&"xmlns"!==(c=i.slice(0,p))&&(i=i.slice(p+1)),et.hasOwnProperty(c)?{space:et[c],local:i}:i}function creatorInherit(i){return function(){var c=this.ownerDocument,p=this.namespaceURI;return p===tt&&c.documentElement.namespaceURI===tt?c.createElement(i):c.createElementNS(p,i)}}function creatorFixed(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function creator(i){var c=namespace(i);return(c.local?creatorFixed:creatorInherit)(c)}function none(){}function selector(i){return null==i?none:function(){return this.querySelector(i)}}function array$1(i){return null==i?[]:Array.isArray(i)?i:Array.from(i)}function empty(){return[]}function selectorAll(i){return null==i?empty:function(){return this.querySelectorAll(i)}}function matcher(i){return function(){return this.matches(i)}}function childMatcher(i){return function(c){return c.matches(i)}}var at=Array.prototype.find;function childFirst(){return this.firstElementChild}var ot=Array.prototype.filter;function children(){return Array.from(this.children)}function sparse(i){return new Array(i.length)}function EnterNode(i,c){this.ownerDocument=i.ownerDocument,this.namespaceURI=i.namespaceURI,this._next=null,this._parent=i,this.__data__=c}function constant$3(i){return function(){return i}}function bindIndex(i,c,p,b,_,k){for(var w,T=0,S=c.length,O=k.length;Tc?1:i>=c?0:NaN}function attrRemove$1(i){return function(){this.removeAttribute(i)}}function attrRemoveNS$1(i){return function(){this.removeAttributeNS(i.space,i.local)}}function attrConstant$1(i,c){return function(){this.setAttribute(i,c)}}function attrConstantNS$1(i,c){return function(){this.setAttributeNS(i.space,i.local,c)}}function attrFunction$1(i,c){return function(){var p=c.apply(this,arguments);null==p?this.removeAttribute(i):this.setAttribute(i,p)}}function attrFunctionNS$1(i,c){return function(){var p=c.apply(this,arguments);null==p?this.removeAttributeNS(i.space,i.local):this.setAttributeNS(i.space,i.local,p)}}function defaultView(i){return i.ownerDocument&&i.ownerDocument.defaultView||i.document&&i||i.defaultView}function styleRemove$1(i){return function(){this.style.removeProperty(i)}}function styleConstant$1(i,c,p){return function(){this.style.setProperty(i,c,p)}}function styleFunction$1(i,c,p){return function(){var b=c.apply(this,arguments);null==b?this.style.removeProperty(i):this.style.setProperty(i,b,p)}}function styleValue(i,c){return i.style.getPropertyValue(c)||defaultView(i).getComputedStyle(i,null).getPropertyValue(c)}function propertyRemove(i){return function(){delete this[i]}}function propertyConstant(i,c){return function(){this[i]=c}}function propertyFunction(i,c){return function(){var p=c.apply(this,arguments);null==p?delete this[i]:this[i]=p}}function classArray(i){return i.trim().split(/^|\s+/)}function classList(i){return i.classList||new ClassList(i)}function ClassList(i){this._node=i,this._names=classArray(i.getAttribute("class")||"")}function classedAdd(i,c){for(var p=classList(i),b=-1,_=c.length;++b<_;)p.add(c[b])}function classedRemove(i,c){for(var p=classList(i),b=-1,_=c.length;++b<_;)p.remove(c[b])}function classedTrue(i){return function(){classedAdd(this,i)}}function classedFalse(i){return function(){classedRemove(this,i)}}function classedFunction(i,c){return function(){(c.apply(this,arguments)?classedAdd:classedRemove)(this,i)}}function textRemove(){this.textContent=""}function textConstant$1(i){return function(){this.textContent=i}}function textFunction$1(i){return function(){var c=i.apply(this,arguments);this.textContent=null==c?"":c}}function htmlRemove(){this.innerHTML=""}function htmlConstant(i){return function(){this.innerHTML=i}}function htmlFunction(i){return function(){var c=i.apply(this,arguments);this.innerHTML=null==c?"":c}}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function constantNull(){return null}function remove(){var i=this.parentNode;i&&i.removeChild(this)}function selection_cloneShallow(){var i=this.cloneNode(!1),c=this.parentNode;return c?c.insertBefore(i,this.nextSibling):i}function selection_cloneDeep(){var i=this.cloneNode(!0),c=this.parentNode;return c?c.insertBefore(i,this.nextSibling):i}function parseTypenames(i){return i.trim().split(/^|\s+/).map((function(i){var c="",p=i.indexOf(".");return p>=0&&(c=i.slice(p+1),i=i.slice(0,p)),{type:i,name:c}}))}function onRemove(i){return function(){var c=this.__on;if(c){for(var p,b=0,_=-1,k=c.length;b=0&&(this._names.splice(c,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};var ut=[null];function Selection$1(i,c){this._groups=i,this._parents=c}function selection(){return new Selection$1([[document.documentElement]],ut)}function select(i){return"string"==typeof i?new Selection$1([[document.querySelector(i)]],[document.documentElement]):new Selection$1([[i]],ut)}function selectAll(i){return"string"==typeof i?new Selection$1([document.querySelectorAll(i)],[document.documentElement]):new Selection$1([array$1(i)],ut)}function define2(i,c,p){i.prototype=c.prototype=p,p.constructor=i}function extend$1(i,c){var p=Object.create(i.prototype);for(var b in c)p[b]=c[b];return p}function Color$2(){}Selection$1.prototype=selection.prototype={constructor:Selection$1,select:function selection_select(i){"function"!=typeof i&&(i=selector(i));for(var c=this._groups,p=c.length,b=new Array(p),_=0;_=et&&(et=tt+1);!(J=H[et])&&++et=0;)(b=_[k])&&(w&&4^b.compareDocumentPosition(w)&&w.parentNode.insertBefore(b,w),w=b);return this},sort:function selection_sort(i){function compareNode(c,p){return c&&p?i(c.__data__,p.__data__):!c-!p}i||(i=ascending);for(var c=this._groups,p=c.length,b=new Array(p),_=0;_1?this.each((null==c?styleRemove$1:"function"==typeof c?styleFunction$1:styleConstant$1)(i,c,null==p?"":p)):styleValue(this.node(),i)},property:function selection_property(i,c){return arguments.length>1?this.each((null==c?propertyRemove:"function"==typeof c?propertyFunction:propertyConstant)(i,c)):this.node()[i]},classed:function selection_classed(i,c){var p=classArray(i+"");if(arguments.length<2){for(var b=classList(this.node()),_=-1,k=p.length;++_>8&15|c>>4&240,c>>4&15|240&c,(15&c)<<4|15&c,1):8===p?rgba$2(c>>24&255,c>>16&255,c>>8&255,(255&c)/255):4===p?rgba$2(c>>12&15|c>>8&240,c>>8&15|c>>4&240,c>>4&15|240&c,((15&c)<<4|15&c)/255):null):(c=Lt.exec(i))?new Rgb(c[1],c[2],c[3],1):(c=Dt.exec(i))?new Rgb(255*c[1]/100,255*c[2]/100,255*c[3]/100,1):(c=Mt.exec(i))?rgba$2(c[1],c[2],c[3],c[4]):(c=It.exec(i))?rgba$2(255*c[1]/100,255*c[2]/100,255*c[3]/100,c[4]):(c=jt.exec(i))?hsla(c[1],c[2]/100,c[3]/100,1):(c=Wt.exec(i))?hsla(c[1],c[2]/100,c[3]/100,c[4]):te.hasOwnProperty(i)?rgbn(te[i]):"transparent"===i?new Rgb(NaN,NaN,NaN,0):null}function rgbn(i){return new Rgb(i>>16&255,i>>8&255,255&i,1)}function rgba$2(i,c,p,b){return b<=0&&(i=c=p=NaN),new Rgb(i,c,p,b)}function rgbConvert(i){return i instanceof Color$2||(i=color(i)),i?new Rgb((i=i.rgb()).r,i.g,i.b,i.opacity):new Rgb}function rgb(i,c,p,b){return 1===arguments.length?rgbConvert(i):new Rgb(i,c,p,null==b?1:b)}function Rgb(i,c,p,b){this.r=+i,this.g=+c,this.b=+p,this.opacity=+b}function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatRgb(){const i=clampa(this.opacity);return`${1===i?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${1===i?")":`, ${i})`}`}function clampa(i){return isNaN(i)?1:Math.max(0,Math.min(1,i))}function clampi(i){return Math.max(0,Math.min(255,Math.round(i)||0))}function hex(i){return((i=clampi(i))<16?"0":"")+i.toString(16)}function hsla(i,c,p,b){return b<=0?i=c=p=NaN:p<=0||p>=1?i=c=NaN:c<=0&&(i=NaN),new Hsl(i,c,p,b)}function hslConvert(i){if(i instanceof Hsl)return new Hsl(i.h,i.s,i.l,i.opacity);if(i instanceof Color$2||(i=color(i)),!i)return new Hsl;if(i instanceof Hsl)return i;var c=(i=i.rgb()).r/255,p=i.g/255,b=i.b/255,_=Math.min(c,p,b),k=Math.max(c,p,b),w=NaN,T=k-_,S=(k+_)/2;return T?(w=c===k?(p-b)/T+6*(p0&&S<1?0:w,new Hsl(w,T,S,i.opacity)}function Hsl(i,c,p,b){this.h=+i,this.s=+c,this.l=+p,this.opacity=+b}function clamph(i){return(i=(i||0)%360)<0?i+360:i}function clampt(i){return Math.max(0,Math.min(1,i||0))}function hsl2rgb(i,c,p){return 255*(i<60?c+(p-c)*i/60:i<180?p:i<240?c+(p-c)*(240-i)/60:c)}define2(Color$2,color,{copy(i){return Object.assign(new this.constructor,this,i)},displayable(){return this.rgb().displayable()},hex:color_formatHex,formatHex:color_formatHex,formatHex8:function color_formatHex8(){return this.rgb().formatHex8()},formatHsl:function color_formatHsl(){return hslConvert(this).formatHsl()},formatRgb:color_formatRgb,toString:color_formatRgb}),define2(Rgb,rgb,extend$1(Color$2,{brighter(i){return i=null==i?gt:Math.pow(gt,i),new Rgb(this.r*i,this.g*i,this.b*i,this.opacity)},darker(i){return i=null==i?pt:Math.pow(pt,i),new Rgb(this.r*i,this.g*i,this.b*i,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:rgb_formatRgb,toString:rgb_formatRgb})),define2(Hsl,(function hsl(i,c,p,b){return 1===arguments.length?hslConvert(i):new Hsl(i,c,p,null==b?1:b)}),extend$1(Color$2,{brighter(i){return i=null==i?gt:Math.pow(gt,i),new Hsl(this.h,this.s,this.l*i,this.opacity)},darker(i){return i=null==i?pt:Math.pow(pt,i),new Hsl(this.h,this.s,this.l*i,this.opacity)},rgb(){var i=this.h%360+360*(this.h<0),c=isNaN(i)||isNaN(this.s)?0:this.s,p=this.l,b=p+(p<.5?p:1-p)*c,_=2*p-b;return new Rgb(hsl2rgb(i>=240?i-240:i+120,_,b),hsl2rgb(i,_,b),hsl2rgb(i<120?i+240:i-120,_,b),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const i=clampa(this.opacity);return`${1===i?"hsl(":"hsla("}${clamph(this.h)}, ${100*clampt(this.s)}%, ${100*clampt(this.l)}%${1===i?")":`, ${i})`}`}}));const ee=Math.PI/180,ne=180/Math.PI,re=.96422,ie=.82521,se=4/29,oe=6/29,le=3*oe*oe;function labConvert(i){if(i instanceof Lab)return new Lab(i.l,i.a,i.b,i.opacity);if(i instanceof Hcl)return hcl2lab(i);i instanceof Rgb||(i=rgbConvert(i));var c,p,b=rgb2lrgb(i.r),_=rgb2lrgb(i.g),k=rgb2lrgb(i.b),w=xyz2lab((.2225045*b+.7168786*_+.0606169*k)/1);return b===_&&_===k?c=p=w:(c=xyz2lab((.4360747*b+.3850649*_+.1430804*k)/re),p=xyz2lab((.0139322*b+.0971045*_+.7141733*k)/ie)),new Lab(116*w-16,500*(c-w),200*(w-p),i.opacity)}function Lab(i,c,p,b){this.l=+i,this.a=+c,this.b=+p,this.opacity=+b}function xyz2lab(i){return i>.008856451679035631?Math.pow(i,1/3):i/le+se}function lab2xyz(i){return i>oe?i*i*i:le*(i-se)}function lrgb2rgb(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function rgb2lrgb(i){return(i/=255)<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function hclConvert(i){if(i instanceof Hcl)return new Hcl(i.h,i.c,i.l,i.opacity);if(i instanceof Lab||(i=labConvert(i)),0===i.a&&0===i.b)return new Hcl(NaN,0()=>i;function linear$1(i,c){return function(p){return i+p*c}}function gamma(i){return 1==(i=+i)?nogamma:function(c,p){return p-c?function exponential(i,c,p){return i=Math.pow(i,p),c=Math.pow(c,p)-i,p=1/p,function(b){return Math.pow(i+b*c,p)}}(c,p,i):constant$2(isNaN(c)?p:c)}}function nogamma(i,c){var p=c-i;return p?linear$1(i,p):constant$2(isNaN(i)?c:i)}const pe=function rgbGamma(i){var c=gamma(i);function rgb$1(i,p){var b=c((i=rgb(i)).r,(p=rgb(p)).r),_=c(i.g,p.g),k=c(i.b,p.b),w=nogamma(i.opacity,p.opacity);return function(c){return i.r=b(c),i.g=_(c),i.b=k(c),i.opacity=w(c),i+""}}return rgb$1.gamma=rgbGamma,rgb$1}(1);function numberArray(i,c){c||(c=[]);var p,b=i?Math.min(c.length,i.length):0,_=c.slice();return function(k){for(p=0;pk&&(_=c.slice(k,_),T[w]?T[w]+=_:T[++w]=_),(p=p[0])===(b=b[0])?T[w]?T[w]+=b:T[++w]=b:(T[++w]=null,S.push({i:w,x:interpolateNumber(p,b)})),k=ye.lastIndex;return k180?c+=360:c-i>180&&(i+=360),_.push({i:p.push(pop(p)+"rotate(",null,b)-2,x:interpolateNumber(i,c)})):c&&p.push(pop(p)+"rotate("+c+b)}(_.rotate,k.rotate,w,T),function skewX(i,c,p,_){i!==c?_.push({i:p.push(pop(p)+"skewX(",null,b)-2,x:interpolateNumber(i,c)}):c&&p.push(pop(p)+"skewX("+c+b)}(_.skewX,k.skewX,w,T),function scale(i,c,p,b,_,k){if(i!==p||c!==b){var w=_.push(pop(_)+"scale(",null,",",null,")");k.push({i:w-4,x:interpolateNumber(i,p)},{i:w-2,x:interpolateNumber(c,b)})}else 1===p&&1===b||_.push(pop(_)+"scale("+p+","+b+")")}(_.scaleX,_.scaleY,k.scaleX,k.scaleY,w,T),_=k=null,function(i){for(var c,p=-1,b=T.length;++p180||p<-180?p-360*Math.round(p/360):p):constant$2(isNaN(i)?c:i)}));var we,Ce,Se=0,Le=0,De=0,Ne=0,Me=0,Ie=0,Fe="object"==typeof performance&&performance.now?performance:Date,Re="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(i){setTimeout(i,17)};function now$2(){return Me||(Re(clearNow),Me=Fe.now()+Ie)}function clearNow(){Me=0}function Timer(){this._call=this._time=this._next=null}function timer(i,c,p){var b=new Timer;return b.restart(i,c,p),b}function wake(){Me=(Ne=Fe.now())+Ie,Se=Le=0;try{!function timerFlush(){now$2(),++Se;for(var i,c=we;c;)(i=Me-c._time)>=0&&c._call.call(void 0,i),c=c._next;--Se}()}finally{Se=0,function nap(){var i,c,p=we,b=Infinity;for(;p;)p._call?(b>p._time&&(b=p._time),i=p,p=p._next):(c=p._next,p._next=null,p=i?i._next=c:we=c);Ce=i,sleep(b)}(),Me=0}}function poke(){var i=Fe.now(),c=i-Ne;c>1e3&&(Ie-=c,Ne=i)}function sleep(i){Se||(Le&&(Le=clearTimeout(Le)),i-Me>24?(i{b.stop(),i(p+c)}),c,p),b}Timer.prototype=timer.prototype={constructor:Timer,restart:function(i,c,p){if("function"!=typeof i)throw new TypeError("callback is not a function");p=(null==p?now$2():+p)+(null==c?0:+c),this._next||Ce===this||(Ce?Ce._next=this:we=this,Ce=this),this._call=i,this._time=p,sleep()},stop:function(){this._call&&(this._call=null,this._time=Infinity,sleep())}};var Pe=dispatch("start","end","cancel","interrupt"),Ye=[];function schedule(i,c,p,b,_,k){var w=i.__transition;if(w){if(p in w)return}else i.__transition={};!function create$1(i,c,p){var b,_=i.__transition;function schedule2(i){p.state=1,p.timer.restart(start2,p.delay,p.time),p.delay<=i&&start2(i-p.delay)}function start2(k){var w,T,S,O;if(1!==p.state)return stop();for(w in _)if((O=_[w]).name===p.name){if(3===O.state)return timeout(start2);4===O.state?(O.state=6,O.timer.stop(),O.on.call("interrupt",i,i.__data__,O.index,O.group),delete _[w]):+w0)throw new Error("too late; already scheduled");return p}function set$2(i,c){var p=get$2(i,c);if(p.state>3)throw new Error("too late; already running");return p}function get$2(i,c){var p=i.__transition;if(!p||!(p=p[c]))throw new Error("transition not found");return p}function tweenRemove(i,c){var p,b;return function(){var _=set$2(this,i),k=_.tween;if(k!==p)for(var w=0,T=(b=p=k).length;w=0&&(i=i.slice(0,c)),!i||"start"===i}))}(c)?init$1:set$2;return function(){var w=k(this,i),T=w.on;T!==b&&(_=(b=T).copy()).on(c,p),w.on=_}}var Ue=selection.prototype.constructor;function styleRemove(i){return function(){this.style.removeProperty(i)}}function styleInterpolate(i,c,p){return function(b){this.style.setProperty(i,c.call(this,b),p)}}function styleTween(i,c,p){var b,_;function tween(){var k=c.apply(this,arguments);return k!==_&&(b=(_=k)&&styleInterpolate(i,k,p)),b}return tween._value=c,tween}function textInterpolate(i){return function(c){this.textContent=i.call(this,c)}}function textTween(i){var c,p;function tween(){var b=i.apply(this,arguments);return b!==p&&(c=(p=b)&&textInterpolate(b)),c}return tween._value=i,tween}var He=0;function Transition(i,c,p,b){this._groups=i,this._parents=c,this._name=p,this._id=b}function newId(){return++He}var Xe=selection.prototype;Transition.prototype={constructor:Transition,select:function transition_select(i){var c=this._name,p=this._id;"function"!=typeof i&&(i=selector(i));for(var b=this._groups,_=b.length,k=new Array(_),w=0;w<_;++w)for(var T,S,O=b[w],N=O.length,R=k[w]=new Array(N),Y=0;Y2&&p.state<5,p.state=6,p.timer.stop(),p.on.call(b?"interrupt":"cancel",i,i.__data__,p.index,p.group),delete k[_]):w=!1;w&&delete i.__transition}}(this,i)}))},selection.prototype.transition=function selection_transition(i){var c,p;i instanceof Transition?(c=i._id,i=i._name):(c=newId(),(p=Ke).time=now$2(),i=null==i?null:i+"");for(var b=this._groups,_=b.length,k=0;k<_;++k)for(var w,T=b[k],S=T.length,O=0;Oen)if(Math.abs(N*T-S*O)>en&&_){var Y=p-k,j=b-w,z=T*T+S*S,U=Y*Y+j*j,H=Math.sqrt(z),Z=Math.sqrt(R),K=_*Math.tan((Qe-Math.acos((z+R-U)/(2*H*Z)))/2),J=K/Z,tt=K/H;Math.abs(J-1)>en&&(this._+="L"+(i+J*O)+","+(c+J*N)),this._+="A"+_+","+_+",0,0,"+ +(N*Y>O*j)+","+(this._x1=i+tt*T)+","+(this._y1=c+tt*S)}else this._+="L"+(this._x1=i)+","+(this._y1=c);else;},arc:function(i,c,p,b,_,k){i=+i,c=+c,k=!!k;var w=(p=+p)*Math.cos(b),T=p*Math.sin(b),S=i+w,O=c+T,N=1^k,R=k?b-_:_-b;if(p<0)throw new Error("negative radius: "+p);null===this._x1?this._+="M"+S+","+O:(Math.abs(this._x1-S)>en||Math.abs(this._y1-O)>en)&&(this._+="L"+S+","+O),p&&(R<0&&(R=R%Je+Je),R>ln?this._+="A"+p+","+p+",0,1,"+N+","+(i-w)+","+(c-T)+"A"+p+","+p+",0,1,"+N+","+(this._x1=S)+","+(this._y1=O):R>en&&(this._+="A"+p+","+p+",0,"+ +(R>=Qe)+","+N+","+(this._x1=i+p*Math.cos(_))+","+(this._y1=c+p*Math.sin(_))))},rect:function(i,c,p,b){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+c)+"h"+ +p+"v"+ +b+"h"+-p+"Z"},toString:function(){return this._}};(function parser$c(i){return(c,p)=>function text$1(i,c){return fetch(i,c).then(responseText)}(c,p).then((c=>(new DOMParser).parseFromString(c,i)))})("image/svg+xml");function formatDecimalParts(i,c){if((p=(i=c?i.toExponential(c-1):i.toExponential()).indexOf("e"))<0)return null;var p,b=i.slice(0,p);return[b.length>1?b[0]+b.slice(2):b,+i.slice(p+1)]}function exponent(i){return(i=formatDecimalParts(Math.abs(i)))?i[1]:NaN}var _n,xn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(i){if(!(c=xn.exec(i)))throw new Error("invalid format: "+i);var c;return new FormatSpecifier({fill:c[1],align:c[2],sign:c[3],symbol:c[4],zero:c[5],width:c[6],comma:c[7],precision:c[8]&&c[8].slice(1),trim:c[9],type:c[10]})}function FormatSpecifier(i){this.fill=void 0===i.fill?" ":i.fill+"",this.align=void 0===i.align?">":i.align+"",this.sign=void 0===i.sign?"-":i.sign+"",this.symbol=void 0===i.symbol?"":i.symbol+"",this.zero=!!i.zero,this.width=void 0===i.width?void 0:+i.width,this.comma=!!i.comma,this.precision=void 0===i.precision?void 0:+i.precision,this.trim=!!i.trim,this.type=void 0===i.type?"":i.type+""}function formatRounded(i,c){var p=formatDecimalParts(i,c);if(!p)return i+"";var b=p[0],_=p[1];return _<0?"0."+new Array(-_).join("0")+b:b.length>_+1?b.slice(0,_+1)+"."+b.slice(_+1):b+new Array(_-b.length+2).join("0")}formatSpecifier.prototype=FormatSpecifier.prototype,FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Cn={"%":(i,c)=>(100*i).toFixed(c),b:i=>Math.round(i).toString(2),c:i=>i+"",d:function formatDecimal(i){return Math.abs(i=Math.round(i))>=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)},e:(i,c)=>i.toExponential(c),f:(i,c)=>i.toFixed(c),g:(i,c)=>i.toPrecision(c),o:i=>Math.round(i).toString(8),p:(i,c)=>formatRounded(100*i,c),r:formatRounded,s:function formatPrefixAuto(i,c){var p=formatDecimalParts(i,c);if(!p)return i+"";var b=p[0],_=p[1],k=_-(_n=3*Math.max(-8,Math.min(8,Math.floor(_/3))))+1,w=b.length;return k===w?b:k>w?b+new Array(k-w+1).join("0"):k>0?b.slice(0,k)+"."+b.slice(k):"0."+new Array(1-k).join("0")+formatDecimalParts(i,Math.max(0,c+k-1))[0]},X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function identity$3(i){return i}var Sn,En,An,Ln=Array.prototype.map,Dn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale$1(i){var c=void 0===i.grouping||void 0===i.thousands?identity$3:function formatGroup(i,c){return function(p,b){for(var _=p.length,k=[],w=0,T=i[0],S=0;_>0&&T>0&&(S+T+1>b&&(T=Math.max(1,b-S)),k.push(p.substring(_-=T,_+T)),!((S+=T+1)>b));)T=i[w=(w+1)%i.length];return k.reverse().join(c)}}(Ln.call(i.grouping,Number),i.thousands+""),p=void 0===i.currency?"":i.currency[0]+"",b=void 0===i.currency?"":i.currency[1]+"",_=void 0===i.decimal?".":i.decimal+"",k=void 0===i.numerals?identity$3:function formatNumerals(i){return function(c){return c.replace(/[0-9]/g,(function(c){return i[+c]}))}}(Ln.call(i.numerals,String)),w=void 0===i.percent?"%":i.percent+"",T=void 0===i.minus?"−":i.minus+"",S=void 0===i.nan?"NaN":i.nan+"";function newFormat(i){var O=(i=formatSpecifier(i)).fill,N=i.align,R=i.sign,Y=i.symbol,j=i.zero,z=i.width,U=i.comma,H=i.precision,Z=i.trim,K=i.type;"n"===K?(U=!0,K="g"):Cn[K]||(void 0===H&&(H=12),Z=!0,K="g"),(j||"0"===O&&"="===N)&&(j=!0,O="0",N="=");var J="$"===Y?p:"#"===Y&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",tt="$"===Y?b:/[%p]/.test(K)?w:"",et=Cn[K],at=/[defgprs%]/.test(K);function format2(i){var p,b,w,Y=J,ot=tt;if("c"===K)ot=et(i)+ot,i="";else{var ut=(i=+i)<0||1/i<0;if(i=isNaN(i)?S:et(Math.abs(i),H),Z&&(i=function formatTrim(i){t:for(var c,p=i.length,b=1,_=-1;b 0&&(_=0)}return _>0?i.slice(0,_)+i.slice(c+1):i}(i)),ut&&0==+i&&"+"!==R&&(ut=!1),Y=(ut?"("===R?R:T:"-"===R||"("===R?"":R)+Y,ot=("s"===K?Dn[8+_n/3]:"")+ot+(ut&&"("===R?")":""),at)for(p=-1,b=i.length;++p(w=i.charCodeAt(p))||w>57){ot=(46===w?_+i.slice(p+1):i.slice(p))+ot,i=i.slice(0,p);break}}U&&!j&&(i=c(i,Infinity));var pt=Y.length+i.length+ot.length,gt=pt>1)+Y+i+ot+gt.slice(pt);break;default:i=gt+Y+i+ot}return k(i)}return H=void 0===H?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,H)):Math.max(0,Math.min(20,H)),format2.toString=function(){return i+""},format2}return{format:newFormat,formatPrefix:function formatPrefix2(i,c){var p=newFormat(((i=formatSpecifier(i)).type="f",i)),b=3*Math.max(-8,Math.min(8,Math.floor(exponent(c)/3))),_=Math.pow(10,-b),k=Dn[8+b/3];return function(i){return p(_*i)+k}}}}function initRange(i,c){switch(arguments.length){case 0:break;case 1:this.range(i);break;default:this.range(c).domain(i)}return this}!function defaultLocale$1(i){return Sn=formatLocale$1(i),En=Sn.format,An=Sn.formatPrefix,Sn}({thousands:",",grouping:[3],currency:["$",""]});const On=Symbol("implicit");function ordinal(){var i=new InternMap,c=[],p=[],b=On;function scale(_){let k=i.get(_);if(void 0===k){if(b!==On)return b;i.set(_,k=c.push(_)-1)}return p[k%p.length]}return scale.domain=function(p){if(!arguments.length)return c.slice();c=[],i=new InternMap;for(const b of p)i.has(b)||i.set(b,c.push(b)-1);return scale},scale.range=function(i){return arguments.length?(p=Array.from(i),scale):p.slice()},scale.unknown=function(i){return arguments.length?(b=i,scale):b},scale.copy=function(){return ordinal(c,p).unknown(b)},initRange.apply(scale,arguments),scale}function number$1(i){return+i}var Mn=[0,1];function identity$2(i){return i}function normalize(i,c){return(c-=i=+i)?function(p){return(p-i)/c}:function constants(i){return function(){return i}}(isNaN(c)?NaN:.5)}function bimap(i,c,p){var b=i[0],_=i[1],k=c[0],w=c[1];return _c&&(p=i,i=c,c=p),function(p){return Math.max(i,Math.min(c,p))}}(w[0],w[i-1])),b=i>2?polymap:bimap,_=k=null,scale}function scale(c){return null==c||isNaN(c=+c)?p:(_||(_=b(w.map(i),T,S)))(i(O(c)))}return scale.invert=function(p){return O(c((k||(k=b(T,w.map(i),interpolateNumber)))(p)))},scale.domain=function(i){return arguments.length?(w=Array.from(i,number$1),rescale()):w.slice()},scale.range=function(i){return arguments.length?(T=Array.from(i),rescale()):T.slice()},scale.rangeRound=function(i){return T=Array.from(i),S=interpolateRound,rescale()},scale.clamp=function(i){return arguments.length?(O=!!i||identity$2,rescale()):O!==identity$2},scale.interpolate=function(i){return arguments.length?(S=i,rescale()):S},scale.unknown=function(i){return arguments.length?(p=i,scale):p},function(p,b){return i=p,c=b,rescale()}}function continuous(){return transformer()(identity$2,identity$2)}function tickFormat(i,c,p,b){var _,k=tickStep(i,c,p);switch((b=formatSpecifier(null==b?",f":b)).type){case"s":var w=Math.max(Math.abs(i),Math.abs(c));return null!=b.precision||isNaN(_=function precisionPrefix(i,c){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(exponent(c)/3)))-exponent(Math.abs(i)))}(k,w))||(b.precision=_),An(b,w);case"":case"e":case"g":case"p":case"r":null!=b.precision||isNaN(_=function precisionRound(i,c){return i=Math.abs(i),c=Math.abs(c)-i,Math.max(0,exponent(c)-exponent(i))+1}(k,Math.max(Math.abs(i),Math.abs(c))))||(b.precision=_-("e"===b.type));break;case"f":case"%":null!=b.precision||isNaN(_=function precisionFixed(i){return Math.max(0,-exponent(Math.abs(i)))}(k))||(b.precision=_-2*("%"===b.type))}return En(b)}function linearish(i){var c=i.domain;return i.ticks=function(i){var p=c();return function ticks(i,c,p){var b,_,k,w,T=-1;if(p=+p,(i=+i)==(c=+c)&&p>0)return[i];if((b=c0){let p=Math.round(i/w),b=Math.round(c/w);for(p*wc&&--b,k=new Array(_=b-p+1);++T<_;)k[T]=(p+T)*w}else{w=-w;let p=Math.round(i*w),b=Math.round(c*w);for(p/wc&&--b,k=new Array(_=b-p+1);++T<_;)k[T]=(p+T)/w}return b&&k.reverse(),k}(p[0],p[p.length-1],null==i?10:i)},i.tickFormat=function(i,p){var b=c();return tickFormat(b[0],b[b.length-1],null==i?10:i,p)},i.nice=function(p){null==p&&(p=10);var b,_,k=c(),w=0,T=k.length-1,S=k[w],O=k[T],N=10;for(O0;){if((_=tickIncrement(S,O,p))===b)return k[w]=S,k[T]=O,c(k);if(_>0)S=Math.floor(S/_)*_,O=Math.ceil(O/_)*_;else{if(!(_<0))break;S=Math.ceil(S*_)/_,O=Math.floor(O*_)/_}b=_}return i},i}function linear(){var i=continuous();return i.copy=function(){return copy$1(i,linear())},initRange.apply(i,arguments),linearish(i)}var In=new Date,Bn=new Date;function newInterval(i,c,p,b){function interval2(c){return i(c=0===arguments.length?new Date:new Date(+c)),c}return interval2.floor=function(c){return i(c=new Date(+c)),c},interval2.ceil=function(p){return i(p=new Date(p-1)),c(p,1),i(p),p},interval2.round=function(i){var c=interval2(i),p=interval2.ceil(i);return i-c0))return w;do{w.push(k=new Date(+p)),c(p,_),i(p)}while(k=c)for(;i(c),!p(c);)c.setTime(c-1)}),(function(i,b){if(i>=i)if(b<0)for(;++b<=0;)for(;c(i,-1),!p(i););else for(;--b>=0;)for(;c(i,1),!p(i););}))},p&&(interval2.count=function(c,b){return In.setTime(+c),Bn.setTime(+b),i(In),i(Bn),Math.floor(p(In,Bn))},interval2.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?interval2.filter(b?function(c){return b(c)%i==0}:function(c){return interval2.count(0,c)%i==0}):interval2:null}),interval2}var Fn=newInterval((function(){}),(function(i,c){i.setTime(+i+c)}),(function(i,c){return c-i}));Fn.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?newInterval((function(c){c.setTime(Math.floor(c/i)*i)}),(function(c,p){c.setTime(+c+p*i)}),(function(c,p){return(p-c)/i})):Fn:null};const $n=Fn;Fn.range;const Rn=1e3,Pn=6e4,Yn=36e5,jn=864e5,zn=6048e5,Wn=2592e6,Un=31536e6;var Hn=newInterval((function(i){i.setTime(i-i.getMilliseconds())}),(function(i,c){i.setTime(+i+c*Rn)}),(function(i,c){return(c-i)/Rn}),(function(i){return i.getUTCSeconds()}));const qn=Hn;Hn.range;var Vn=newInterval((function(i){i.setTime(i-i.getMilliseconds()-i.getSeconds()*Rn)}),(function(i,c){i.setTime(+i+c*Pn)}),(function(i,c){return(c-i)/Pn}),(function(i){return i.getMinutes()}));const Gn=Vn;Vn.range;var Xn=newInterval((function(i){i.setTime(i-i.getMilliseconds()-i.getSeconds()*Rn-i.getMinutes()*Pn)}),(function(i,c){i.setTime(+i+c*Yn)}),(function(i,c){return(c-i)/Yn}),(function(i){return i.getHours()}));const Zn=Xn;Xn.range;var Kn=newInterval((i=>i.setHours(0,0,0,0)),((i,c)=>i.setDate(i.getDate()+c)),((i,c)=>(c-i-(c.getTimezoneOffset()-i.getTimezoneOffset())*Pn)/jn),(i=>i.getDate()-1));const Qn=Kn;function weekday(i){return newInterval((function(c){c.setDate(c.getDate()-(c.getDay()+7-i)%7),c.setHours(0,0,0,0)}),(function(i,c){i.setDate(i.getDate()+7*c)}),(function(i,c){return(c-i-(c.getTimezoneOffset()-i.getTimezoneOffset())*Pn)/zn}))}Kn.range;var Jn=weekday(0),tr=weekday(1),er=weekday(2),nr=weekday(3),rr=weekday(4),ir=weekday(5),ar=weekday(6);Jn.range,tr.range,er.range,nr.range,rr.range,ir.range,ar.range;var sr=newInterval((function(i){i.setDate(1),i.setHours(0,0,0,0)}),(function(i,c){i.setMonth(i.getMonth()+c)}),(function(i,c){return c.getMonth()-i.getMonth()+12*(c.getFullYear()-i.getFullYear())}),(function(i){return i.getMonth()}));const or=sr;sr.range;var lr=newInterval((function(i){i.setMonth(0,1),i.setHours(0,0,0,0)}),(function(i,c){i.setFullYear(i.getFullYear()+c)}),(function(i,c){return c.getFullYear()-i.getFullYear()}),(function(i){return i.getFullYear()}));lr.every=function(i){return isFinite(i=Math.floor(i))&&i>0?newInterval((function(c){c.setFullYear(Math.floor(c.getFullYear()/i)*i),c.setMonth(0,1),c.setHours(0,0,0,0)}),(function(c,p){c.setFullYear(c.getFullYear()+p*i)})):null};const cr=lr;lr.range;var hr=newInterval((function(i){i.setUTCSeconds(0,0)}),(function(i,c){i.setTime(+i+c*Pn)}),(function(i,c){return(c-i)/Pn}),(function(i){return i.getUTCMinutes()}));const ur=hr;hr.range;var dr=newInterval((function(i){i.setUTCMinutes(0,0,0)}),(function(i,c){i.setTime(+i+c*Yn)}),(function(i,c){return(c-i)/Yn}),(function(i){return i.getUTCHours()}));const pr=dr;dr.range;var fr=newInterval((function(i){i.setUTCHours(0,0,0,0)}),(function(i,c){i.setUTCDate(i.getUTCDate()+c)}),(function(i,c){return(c-i)/jn}),(function(i){return i.getUTCDate()-1}));const gr=fr;function utcWeekday(i){return newInterval((function(c){c.setUTCDate(c.getUTCDate()-(c.getUTCDay()+7-i)%7),c.setUTCHours(0,0,0,0)}),(function(i,c){i.setUTCDate(i.getUTCDate()+7*c)}),(function(i,c){return(c-i)/zn}))}fr.range;var yr=utcWeekday(0),mr=utcWeekday(1),br=utcWeekday(2),_r=utcWeekday(3),xr=utcWeekday(4),vr=utcWeekday(5),kr=utcWeekday(6);yr.range,mr.range,br.range,_r.range,xr.range,vr.range,kr.range;var wr=newInterval((function(i){i.setUTCDate(1),i.setUTCHours(0,0,0,0)}),(function(i,c){i.setUTCMonth(i.getUTCMonth()+c)}),(function(i,c){return c.getUTCMonth()-i.getUTCMonth()+12*(c.getUTCFullYear()-i.getUTCFullYear())}),(function(i){return i.getUTCMonth()}));const Tr=wr;wr.range;var Cr=newInterval((function(i){i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)}),(function(i,c){i.setUTCFullYear(i.getUTCFullYear()+c)}),(function(i,c){return c.getUTCFullYear()-i.getUTCFullYear()}),(function(i){return i.getUTCFullYear()}));Cr.every=function(i){return isFinite(i=Math.floor(i))&&i>0?newInterval((function(c){c.setUTCFullYear(Math.floor(c.getUTCFullYear()/i)*i),c.setUTCMonth(0,1),c.setUTCHours(0,0,0,0)}),(function(c,p){c.setUTCFullYear(c.getUTCFullYear()+p*i)})):null};const Sr=Cr;function ticker(i,c,p,b,_,k){const w=[[qn,1,Rn],[qn,5,5e3],[qn,15,15e3],[qn,30,3e4],[k,1,Pn],[k,5,3e5],[k,15,9e5],[k,30,18e5],[_,1,Yn],[_,3,108e5],[_,6,216e5],[_,12,432e5],[b,1,jn],[b,2,1728e5],[p,1,zn],[c,1,Wn],[c,3,7776e6],[i,1,Un]];function tickInterval2(c,p,b){const _=Math.abs(p-c)/b,k=bisector((([,,i])=>i)).right(w,_);if(k===w.length)return i.every(tickStep(c/Un,p/Un,b));if(0===k)return $n.every(Math.max(tickStep(c,p,b),1));const[T,S]=w[_/w[k-1][2][i.toLowerCase(),c])))}function parseWeekdayNumberSunday(i,c,p){var b=Nr.exec(c.slice(p,p+1));return b?(i.w=+b[0],p+b[0].length):-1}function parseWeekdayNumberMonday(i,c,p){var b=Nr.exec(c.slice(p,p+1));return b?(i.u=+b[0],p+b[0].length):-1}function parseWeekNumberSunday(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.U=+b[0],p+b[0].length):-1}function parseWeekNumberISO(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.V=+b[0],p+b[0].length):-1}function parseWeekNumberMonday(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.W=+b[0],p+b[0].length):-1}function parseFullYear(i,c,p){var b=Nr.exec(c.slice(p,p+4));return b?(i.y=+b[0],p+b[0].length):-1}function parseYear(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.y=+b[0]+(+b[0]>68?1900:2e3),p+b[0].length):-1}function parseZone(i,c,p){var b=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(c.slice(p,p+6));return b?(i.Z=b[1]?0:-(b[2]+(b[3]||"00")),p+b[0].length):-1}function parseQuarter(i,c,p){var b=Nr.exec(c.slice(p,p+1));return b?(i.q=3*b[0]-3,p+b[0].length):-1}function parseMonthNumber(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.m=b[0]-1,p+b[0].length):-1}function parseDayOfMonth(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.d=+b[0],p+b[0].length):-1}function parseDayOfYear(i,c,p){var b=Nr.exec(c.slice(p,p+3));return b?(i.m=0,i.d=+b[0],p+b[0].length):-1}function parseHour24(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.H=+b[0],p+b[0].length):-1}function parseMinutes(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.M=+b[0],p+b[0].length):-1}function parseSeconds(i,c,p){var b=Nr.exec(c.slice(p,p+2));return b?(i.S=+b[0],p+b[0].length):-1}function parseMilliseconds(i,c,p){var b=Nr.exec(c.slice(p,p+3));return b?(i.L=+b[0],p+b[0].length):-1}function parseMicroseconds(i,c,p){var b=Nr.exec(c.slice(p,p+6));return b?(i.L=Math.floor(b[0]/1e3),p+b[0].length):-1}function parseLiteralPercent(i,c,p){var b=Mr.exec(c.slice(p,p+1));return b?p+b[0].length:-1}function parseUnixTimestamp(i,c,p){var b=Nr.exec(c.slice(p));return b?(i.Q=+b[0],p+b[0].length):-1}function parseUnixTimestampSeconds(i,c,p){var b=Nr.exec(c.slice(p));return b?(i.s=+b[0],p+b[0].length):-1}function formatDayOfMonth(i,c){return pad(i.getDate(),c,2)}function formatHour24(i,c){return pad(i.getHours(),c,2)}function formatHour12(i,c){return pad(i.getHours()%12||12,c,2)}function formatDayOfYear(i,c){return pad(1+Qn.count(cr(i),i),c,3)}function formatMilliseconds(i,c){return pad(i.getMilliseconds(),c,3)}function formatMicroseconds(i,c){return formatMilliseconds(i,c)+"000"}function formatMonthNumber(i,c){return pad(i.getMonth()+1,c,2)}function formatMinutes(i,c){return pad(i.getMinutes(),c,2)}function formatSeconds(i,c){return pad(i.getSeconds(),c,2)}function formatWeekdayNumberMonday(i){var c=i.getDay();return 0===c?7:c}function formatWeekNumberSunday(i,c){return pad(Jn.count(cr(i)-1,i),c,2)}function dISO(i){var c=i.getDay();return c>=4||0===c?rr(i):rr.ceil(i)}function formatWeekNumberISO(i,c){return i=dISO(i),pad(rr.count(cr(i),i)+(4===cr(i).getDay()),c,2)}function formatWeekdayNumberSunday(i){return i.getDay()}function formatWeekNumberMonday(i,c){return pad(tr.count(cr(i)-1,i),c,2)}function formatYear(i,c){return pad(i.getFullYear()%100,c,2)}function formatYearISO(i,c){return pad((i=dISO(i)).getFullYear()%100,c,2)}function formatFullYear(i,c){return pad(i.getFullYear()%1e4,c,4)}function formatFullYearISO(i,c){var p=i.getDay();return pad((i=p>=4||0===p?rr(i):rr.ceil(i)).getFullYear()%1e4,c,4)}function formatZone(i){var c=i.getTimezoneOffset();return(c>0?"-":(c*=-1,"+"))+pad(c/60|0,"0",2)+pad(c%60,"0",2)}function formatUTCDayOfMonth(i,c){return pad(i.getUTCDate(),c,2)}function formatUTCHour24(i,c){return pad(i.getUTCHours(),c,2)}function formatUTCHour12(i,c){return pad(i.getUTCHours()%12||12,c,2)}function formatUTCDayOfYear(i,c){return pad(1+gr.count(Sr(i),i),c,3)}function formatUTCMilliseconds(i,c){return pad(i.getUTCMilliseconds(),c,3)}function formatUTCMicroseconds(i,c){return formatUTCMilliseconds(i,c)+"000"}function formatUTCMonthNumber(i,c){return pad(i.getUTCMonth()+1,c,2)}function formatUTCMinutes(i,c){return pad(i.getUTCMinutes(),c,2)}function formatUTCSeconds(i,c){return pad(i.getUTCSeconds(),c,2)}function formatUTCWeekdayNumberMonday(i){var c=i.getUTCDay();return 0===c?7:c}function formatUTCWeekNumberSunday(i,c){return pad(yr.count(Sr(i)-1,i),c,2)}function UTCdISO(i){var c=i.getUTCDay();return c>=4||0===c?xr(i):xr.ceil(i)}function formatUTCWeekNumberISO(i,c){return i=UTCdISO(i),pad(xr.count(Sr(i),i)+(4===Sr(i).getUTCDay()),c,2)}function formatUTCWeekdayNumberSunday(i){return i.getUTCDay()}function formatUTCWeekNumberMonday(i,c){return pad(mr.count(Sr(i)-1,i),c,2)}function formatUTCYear(i,c){return pad(i.getUTCFullYear()%100,c,2)}function formatUTCYearISO(i,c){return pad((i=UTCdISO(i)).getUTCFullYear()%100,c,2)}function formatUTCFullYear(i,c){return pad(i.getUTCFullYear()%1e4,c,4)}function formatUTCFullYearISO(i,c){var p=i.getUTCDay();return pad((i=p>=4||0===p?xr(i):xr.ceil(i)).getUTCFullYear()%1e4,c,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(i){return+i}function formatUnixTimestampSeconds(i){return Math.floor(+i/1e3)}function date(i){return new Date(i)}function number(i){return i instanceof Date?+i:+new Date(+i)}function calendar(i,c,p,b,_,k,w,T,S,O){var N=continuous(),R=N.invert,Y=N.domain,j=O(".%L"),z=O(":%S"),U=O("%I:%M"),H=O("%I %p"),Z=O("%a %d"),K=O("%b %d"),J=O("%B"),tt=O("%Y");function tickFormat2(i){return(S(i)=12)]},q:function formatQuarter(i){return 1+~~(i.getMonth()/3)},Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatSeconds,u:formatWeekdayNumberMonday,U:formatWeekNumberSunday,V:formatWeekNumberISO,w:formatWeekdayNumberSunday,W:formatWeekNumberMonday,x:null,X:null,y:formatYear,Y:formatFullYear,Z:formatZone,"%":formatLiteralPercent},tt={a:function formatUTCShortWeekday(i){return w[i.getUTCDay()]},A:function formatUTCWeekday(i){return k[i.getUTCDay()]},b:function formatUTCShortMonth(i){return S[i.getUTCMonth()]},B:function formatUTCMonth(i){return T[i.getUTCMonth()]},c:null,d:formatUTCDayOfMonth,e:formatUTCDayOfMonth,f:formatUTCMicroseconds,g:formatUTCYearISO,G:formatUTCFullYearISO,H:formatUTCHour24,I:formatUTCHour12,j:formatUTCDayOfYear,L:formatUTCMilliseconds,m:formatUTCMonthNumber,M:formatUTCMinutes,p:function formatUTCPeriod(i){return _[+(i.getUTCHours()>=12)]},q:function formatUTCQuarter(i){return 1+~~(i.getUTCMonth()/3)},Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatUTCSeconds,u:formatUTCWeekdayNumberMonday,U:formatUTCWeekNumberSunday,V:formatUTCWeekNumberISO,w:formatUTCWeekdayNumberSunday,W:formatUTCWeekNumberMonday,x:null,X:null,y:formatUTCYear,Y:formatUTCFullYear,Z:formatUTCZone,"%":formatLiteralPercent},et={a:function parseShortWeekday(i,c,p){var b=j.exec(c.slice(p));return b?(i.w=z.get(b[0].toLowerCase()),p+b[0].length):-1},A:function parseWeekday(i,c,p){var b=R.exec(c.slice(p));return b?(i.w=Y.get(b[0].toLowerCase()),p+b[0].length):-1},b:function parseShortMonth(i,c,p){var b=Z.exec(c.slice(p));return b?(i.m=K.get(b[0].toLowerCase()),p+b[0].length):-1},B:function parseMonth(i,c,p){var b=U.exec(c.slice(p));return b?(i.m=H.get(b[0].toLowerCase()),p+b[0].length):-1},c:function parseLocaleDateTime(i,p,b){return parseSpecifier(i,c,p,b)},d:parseDayOfMonth,e:parseDayOfMonth,f:parseMicroseconds,g:parseYear,G:parseFullYear,H:parseHour24,I:parseHour24,j:parseDayOfYear,L:parseMilliseconds,m:parseMonthNumber,M:parseMinutes,p:function parsePeriod(i,c,p){var b=O.exec(c.slice(p));return b?(i.p=N.get(b[0].toLowerCase()),p+b[0].length):-1},q:parseQuarter,Q:parseUnixTimestamp,s:parseUnixTimestampSeconds,S:parseSeconds,u:parseWeekdayNumberMonday,U:parseWeekNumberSunday,V:parseWeekNumberISO,w:parseWeekdayNumberSunday,W:parseWeekNumberMonday,x:function parseLocaleDate(i,c,b){return parseSpecifier(i,p,c,b)},X:function parseLocaleTime(i,c,p){return parseSpecifier(i,b,c,p)},y:parseYear,Y:parseFullYear,Z:parseZone,"%":parseLiteralPercent};function newFormat(i,c){return function(p){var b,_,k,w=[],T=-1,S=0,O=i.length;for(p instanceof Date||(p=new Date(+p));++T53)return null;"w"in k||(k.w=1),"Z"in k?(_=(b=utcDate(newDate(k.y,0,1))).getUTCDay(),b=_>4||0===_?mr.ceil(b):mr(b),b=gr.offset(b,7*(k.V-1)),k.y=b.getUTCFullYear(),k.m=b.getUTCMonth(),k.d=b.getUTCDate()+(k.w+6)%7):(_=(b=localDate(newDate(k.y,0,1))).getDay(),b=_>4||0===_?tr.ceil(b):tr(b),b=Qn.offset(b,7*(k.V-1)),k.y=b.getFullYear(),k.m=b.getMonth(),k.d=b.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),_="Z"in k?utcDate(newDate(k.y,0,1)).getUTCDay():localDate(newDate(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+7*k.W-(_+5)%7:k.w+7*k.U-(_+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,utcDate(k)):localDate(k)}}function parseSpecifier(i,c,p,b){for(var _,k,w=0,T=c.length,S=p.length;w=S)return-1;if(37===(_=c.charCodeAt(w++))){if(_=c.charAt(w++),!(k=et[_ in Or?c.charAt(w++):_])||(b=k(i,p,b))<0)return-1}else if(_!=p.charCodeAt(b++))return-1}return b}return J.x=newFormat(p,J),J.X=newFormat(b,J),J.c=newFormat(c,J),tt.x=newFormat(p,tt),tt.X=newFormat(b,tt),tt.c=newFormat(c,tt),{format:function(i){var c=newFormat(i+="",J);return c.toString=function(){return i},c},parse:function(i){var c=newParse(i+="",!1);return c.toString=function(){return i},c},utcFormat:function(i){var c=newFormat(i+="",tt);return c.toString=function(){return i},c},utcParse:function(i){var c=newParse(i+="",!0);return c.toString=function(){return i},c}}}(i),Dr=Lr.format,Lr.parse,Lr.utcFormat,Lr.utcParse,Lr}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Br=Math.abs,Fr=Math.atan2,$r=Math.cos,Rr=Math.max,Pr=Math.min,Yr=Math.sin,jr=Math.sqrt,zr=1e-12,Wr=Math.PI,Ur=Wr/2,Hr=2*Wr;function acos(i){return i>1?0:i<-1?Wr:Math.acos(i)}function asin(i){return i>=1?Ur:i<=-1?-Ur:Math.asin(i)}function arcInnerRadius(i){return i.innerRadius}function arcOuterRadius(i){return i.outerRadius}function arcStartAngle(i){return i.startAngle}function arcEndAngle(i){return i.endAngle}function arcPadAngle(i){return i&&i.padAngle}function intersect$1(i,c,p,b,_,k,w,T){var S=p-i,O=b-c,N=w-_,R=T-k,Y=R*S-N*O;if(!(Y*Ywt*wt+Lt*Lt&&(ut=gt,pt=yt),{cx:ut,cy:pt,x01:-N,y01:-R,x11:ut*(_/et-1),y11:pt*(_/et-1)}}function d3arc(){var i=arcInnerRadius,c=arcOuterRadius,p=constant$1(0),b=null,_=arcStartAngle,k=arcEndAngle,w=arcPadAngle,T=null;function arc(){var S,O,N=+i.apply(this,arguments),R=+c.apply(this,arguments),Y=_.apply(this,arguments)-Ur,j=k.apply(this,arguments)-Ur,z=Br(j-Y),U=j>Y;if(T||(T=S=path()),Rzr)if(z>Hr-zr)T.moveTo(R*$r(Y),R*Yr(Y)),T.arc(0,0,R,Y,j,!U),N>zr&&(T.moveTo(N*$r(j),N*Yr(j)),T.arc(0,0,N,j,Y,U));else{var H,Z,K=Y,J=j,tt=Y,et=j,at=z,ot=z,ut=w.apply(this,arguments)/2,pt=ut>zr&&(b?+b.apply(this,arguments):jr(N*N+R*R)),gt=Pr(Br(R-N)/2,+p.apply(this,arguments)),yt=gt,vt=gt;if(pt>zr){var kt=asin(pt/N*Yr(ut)),wt=asin(pt/R*Yr(ut));(at-=2*kt)>zr?(tt+=kt*=U?1:-1,et-=kt):(at=0,tt=et=(Y+j)/2),(ot-=2*wt)>zr?(K+=wt*=U?1:-1,J-=wt):(ot=0,K=J=(Y+j)/2)}var Lt=R*$r(K),Dt=R*Yr(K),Mt=N*$r(et),It=N*Yr(et);if(gt>zr){var jt,Wt=R*$r(J),te=R*Yr(J),ee=N*$r(tt),ne=N*Yr(tt);if(zzr?vt>zr?(H=cornerTangents(ee,ne,Lt,Dt,R,vt,U),Z=cornerTangents(Wt,te,Mt,It,R,vt,U),T.moveTo(H.cx+H.x01,H.cy+H.y01),vtzr&&at>zr?yt>zr?(H=cornerTangents(Mt,It,Wt,te,N,-yt,U),Z=cornerTangents(Lt,Dt,ee,ne,N,-yt,U),T.lineTo(H.cx+H.x01,H.cy+H.y01),yti?1:c>=i?0:NaN}function identity$1(i){return i}function noop$1(){}function point$2(i,c,p){i._context.bezierCurveTo((2*i._x0+i._x1)/3,(2*i._y0+i._y1)/3,(i._x0+2*i._x1)/3,(i._y0+2*i._y1)/3,(i._x0+4*i._x1+c)/6,(i._y0+4*i._y1+p)/6)}function Basis(i){this._context=i}function curveBasis(i){return new Basis(i)}function BasisClosed(i){this._context=i}function BasisOpen(i){this._context=i}function LinearClosed(i){this._context=i}function sign(i){return i<0?-1:1}function slope3(i,c,p){var b=i._x1-i._x0,_=c-i._x1,k=(i._y1-i._y0)/(b||_<0&&-0),w=(p-i._y1)/(_||b<0&&-0),T=(k*_+w*b)/(b+_);return(sign(k)+sign(w))*Math.min(Math.abs(k),Math.abs(w),.5*Math.abs(T))||0}function slope2(i,c){var p=i._x1-i._x0;return p?(3*(i._y1-i._y0)/p-c)/2:c}function point$1(i,c,p){var b=i._x0,_=i._y0,k=i._x1,w=i._y1,T=(k-b)/3;i._context.bezierCurveTo(b+T,_+T*c,k-T,w-T*p,k,w)}function MonotoneX(i){this._context=i}function MonotoneY(i){this._context=new ReflectContext(i)}function ReflectContext(i){this._context=i}function Natural(i){this._context=i}function controlPoints(i){var c,p,b=i.length-1,_=new Array(b),k=new Array(b),w=new Array(b);for(_[0]=0,k[0]=2,w[0]=i[0]+2*i[1],c=1;c=0;--c)_[c]=(w[c]-_[c+1])/k[c];for(k[b-1]=(i[b]+_[b-1])/2,c=0;ci.length)&&(c=i.length);for(var p=0,b=new Array(c);p=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(i,c){switch(i=+i,c=+c,this._point){case 0:this._point=1,this._line?this._context.lineTo(i,c):this._context.moveTo(i,c);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,c),this._context.lineTo(i,c);else{var p=this._x*(1-this._t)+i*this._t;this._context.lineTo(p,this._y),this._context.lineTo(p,c)}}this._x=i,this._y=c}},Transform.prototype={constructor:Transform,scale:function(i){return 1===i?this:new Transform(this.k*i,this.x,this.y)},translate:function(i,c){return 0===i&0===c?this:new Transform(this.k,this.x+this.k*i,this.y+this.k*c)},apply:function(i){return[i[0]*this.k+this.x,i[1]*this.k+this.y]},applyX:function(i){return i*this.k+this.x},applyY:function(i){return i*this.k+this.y},invert:function(i){return[(i[0]-this.x)/this.k,(i[1]-this.y)/this.k]},invertX:function(i){return(i-this.x)/this.k},invertY:function(i){return(i-this.y)/this.k},rescaleX:function(i){return i.copy().domain(i.range().map(this.invertX,this).map(i.invert,i))},rescaleY:function(i){return i.copy().domain(i.range().map(this.invertY,this).map(i.invert,i))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Transform(1,0,0),Transform.prototype;var qr=Object.hasOwnProperty,Vr=Object.setPrototypeOf,Gr=Object.isFrozen,Xr=Object.getPrototypeOf,Zr=Object.getOwnPropertyDescriptor,Kr=Object.freeze,Qr=Object.seal,Jr=Object.create,ti="undefined"!=typeof Reflect&&Reflect,ei=ti.apply,ni=ti.construct;ei||(ei=function apply2(i,c,p){return i.apply(c,p)}),Kr||(Kr=function freeze2(i){return i}),Qr||(Qr=function seal2(i){return i}),ni||(ni=function construct2(i,c){return _construct(i,_toConsumableArray(c))});var ri=unapply(Array.prototype.forEach),ii=unapply(Array.prototype.pop),ai=unapply(Array.prototype.push),si=unapply(String.prototype.toLowerCase),oi=unapply(String.prototype.toString),li=unapply(String.prototype.match),ci=unapply(String.prototype.replace),hi=unapply(String.prototype.indexOf),ui=unapply(String.prototype.trim),di=unapply(RegExp.prototype.test),pi=function unconstruct(i){return function(){for(var c=arguments.length,p=new Array(c),b=0;b1?p-1:0),_=1;_/gm),Ei=Qr(/\${[\w\W]*}/gm),Ai=Qr(/^data-[\-\w.\u00B7-\uFFFF]/),Li=Qr(/^aria-[\-\w]+$/),Di=Qr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oi=Qr(/^(?:\w+script|data):/i),Ni=Qr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Mi=Qr(/^html$/i),Ii=function getGlobal2(){return"undefined"==typeof window?null:window},Bi=function _createTrustedTypesPolicy2(i,c){if("object"!==_typeof(i)||"function"!=typeof i.createPolicy)return null;var p=null,b="data-tt-policy-suffix";c.currentScript&&c.currentScript.hasAttribute(b)&&(p=c.currentScript.getAttribute(b));var _="dompurify"+(p?"#"+p:"");try{return i.createPolicy(_,{createHTML:function createHTML(i){return i},createScriptURL:function createScriptURL(i){return i}})}catch(i){return console.warn("TrustedTypes policy "+_+" could not be created."),null}};var Fi=function createDOMPurify(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ii(),c=function DOMPurify2(i){return createDOMPurify(i)};if(c.version="2.4.1",c.removed=[],!i||!i.document||9!==i.document.nodeType)return c.isSupported=!1,c;var p=i.document,b=i.document,_=i.DocumentFragment,k=i.HTMLTemplateElement,w=i.Node,T=i.Element,S=i.NodeFilter,O=i.NamedNodeMap,N=void 0===O?i.NamedNodeMap||i.MozNamedAttrMap:O,R=i.HTMLFormElement,Y=i.DOMParser,j=i.trustedTypes,z=T.prototype,U=lookupGetter(z,"cloneNode"),H=lookupGetter(z,"nextSibling"),Z=lookupGetter(z,"childNodes"),K=lookupGetter(z,"parentNode");if("function"==typeof k){var J=b.createElement("template");J.content&&J.content.ownerDocument&&(b=J.content.ownerDocument)}var tt=Bi(j,p),et=tt?tt.createHTML(""):"",at=b,ot=at.implementation,ut=at.createNodeIterator,pt=at.createDocumentFragment,gt=at.getElementsByTagName,yt=p.importNode,vt={};try{vt=clone$2(b).documentMode?b.documentMode:{}}catch(i){}var kt={};c.isSupported="function"==typeof K&&ot&&void 0!==ot.createHTMLDocument&&9!==vt;var wt,Lt,Dt=Ci,Mt=Si,It=Ei,jt=Ai,Wt=Li,te=Oi,ee=Ni,ne=Di,re=null,ie=addToSet({},[].concat(_toConsumableArray(fi),_toConsumableArray(gi),_toConsumableArray(yi),_toConsumableArray(bi),_toConsumableArray(xi))),se=null,oe=addToSet({},[].concat(_toConsumableArray(vi),_toConsumableArray(ki),_toConsumableArray(wi),_toConsumableArray(Ti))),le=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pe=null,ge=null,ye=!0,me=!0,be=!1,_e=!1,xe=!1,ve=!1,ke=!1,we=!1,Ce=!1,Se=!1,Le=!0,De=!1,Ne="user-content-",Me=!0,Ie=!1,Fe={},Re=null,Pe=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ye=null,Ue=addToSet({},["audio","video","img","source","image","track"]),He=null,Xe=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml",en=Je,ln=!1,_n=null,xn=addToSet({},[Ke,Qe,Je],oi),Cn=["application/xhtml+xml","text/html"],Sn="text/html",En=null,An=b.createElement("form"),Ln=function isRegexOrFunction2(i){return i instanceof RegExp||i instanceof Function},Dn=function _parseConfig2(i){En&&En===i||(i&&"object"===_typeof(i)||(i={}),i=clone$2(i),wt=wt=-1===Cn.indexOf(i.PARSER_MEDIA_TYPE)?Sn:i.PARSER_MEDIA_TYPE,Lt="application/xhtml+xml"===wt?oi:si,re="ALLOWED_TAGS"in i?addToSet({},i.ALLOWED_TAGS,Lt):ie,se="ALLOWED_ATTR"in i?addToSet({},i.ALLOWED_ATTR,Lt):oe,_n="ALLOWED_NAMESPACES"in i?addToSet({},i.ALLOWED_NAMESPACES,oi):xn,He="ADD_URI_SAFE_ATTR"in i?addToSet(clone$2(Xe),i.ADD_URI_SAFE_ATTR,Lt):Xe,Ye="ADD_DATA_URI_TAGS"in i?addToSet(clone$2(Ue),i.ADD_DATA_URI_TAGS,Lt):Ue,Re="FORBID_CONTENTS"in i?addToSet({},i.FORBID_CONTENTS,Lt):Pe,pe="FORBID_TAGS"in i?addToSet({},i.FORBID_TAGS,Lt):{},ge="FORBID_ATTR"in i?addToSet({},i.FORBID_ATTR,Lt):{},Fe="USE_PROFILES"in i&&i.USE_PROFILES,ye=!1!==i.ALLOW_ARIA_ATTR,me=!1!==i.ALLOW_DATA_ATTR,be=i.ALLOW_UNKNOWN_PROTOCOLS||!1,_e=i.SAFE_FOR_TEMPLATES||!1,xe=i.WHOLE_DOCUMENT||!1,we=i.RETURN_DOM||!1,Ce=i.RETURN_DOM_FRAGMENT||!1,Se=i.RETURN_TRUSTED_TYPE||!1,ke=i.FORCE_BODY||!1,Le=!1!==i.SANITIZE_DOM,De=i.SANITIZE_NAMED_PROPS||!1,Me=!1!==i.KEEP_CONTENT,Ie=i.IN_PLACE||!1,ne=i.ALLOWED_URI_REGEXP||ne,en=i.NAMESPACE||Je,i.CUSTOM_ELEMENT_HANDLING&&Ln(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=i.CUSTOM_ELEMENT_HANDLING.tagNameCheck),i.CUSTOM_ELEMENT_HANDLING&&Ln(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),i.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(le.allowCustomizedBuiltInElements=i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(me=!1),Ce&&(we=!0),Fe&&(re=addToSet({},_toConsumableArray(xi)),se=[],!0===Fe.html&&(addToSet(re,fi),addToSet(se,vi)),!0===Fe.svg&&(addToSet(re,gi),addToSet(se,ki),addToSet(se,Ti)),!0===Fe.svgFilters&&(addToSet(re,yi),addToSet(se,ki),addToSet(se,Ti)),!0===Fe.mathMl&&(addToSet(re,bi),addToSet(se,wi),addToSet(se,Ti))),i.ADD_TAGS&&(re===ie&&(re=clone$2(re)),addToSet(re,i.ADD_TAGS,Lt)),i.ADD_ATTR&&(se===oe&&(se=clone$2(se)),addToSet(se,i.ADD_ATTR,Lt)),i.ADD_URI_SAFE_ATTR&&addToSet(He,i.ADD_URI_SAFE_ATTR,Lt),i.FORBID_CONTENTS&&(Re===Pe&&(Re=clone$2(Re)),addToSet(Re,i.FORBID_CONTENTS,Lt)),Me&&(re["#text"]=!0),xe&&addToSet(re,["html","head","body"]),re.table&&(addToSet(re,["tbody"]),delete pe.tbody),Kr&&Kr(i),En=i)},On=addToSet({},["mi","mo","mn","ms","mtext"]),Mn=addToSet({},["foreignobject","desc","title","annotation-xml"]),In=addToSet({},["title","style","font","a","script"]),Bn=addToSet({},gi);addToSet(Bn,yi),addToSet(Bn,mi);var Fn=addToSet({},bi);addToSet(Fn,_i);var $n=function _checkValidNamespace2(i){var c=K(i);c&&c.tagName||(c={namespaceURI:en,tagName:"template"});var p=si(i.tagName),b=si(c.tagName);return!!_n[i.namespaceURI]&&(i.namespaceURI===Qe?c.namespaceURI===Je?"svg"===p:c.namespaceURI===Ke?"svg"===p&&("annotation-xml"===b||On[b]):Boolean(Bn[p]):i.namespaceURI===Ke?c.namespaceURI===Je?"math"===p:c.namespaceURI===Qe?"math"===p&&Mn[b]:Boolean(Fn[p]):i.namespaceURI===Je?!(c.namespaceURI===Qe&&!Mn[b])&&(!(c.namespaceURI===Ke&&!On[b])&&(!Fn[p]&&(In[p]||!Bn[p]))):!("application/xhtml+xml"!==wt||!_n[i.namespaceURI]))},Rn=function _forceRemove2(i){ai(c.removed,{element:i});try{i.parentNode.removeChild(i)}catch(c){try{i.outerHTML=et}catch(c){i.remove()}}},Pn=function _removeAttribute2(i,p){try{ai(c.removed,{attribute:p.getAttributeNode(i),from:p})}catch(i){ai(c.removed,{attribute:null,from:p})}if(p.removeAttribute(i),"is"===i&&!se[i])if(we||Ce)try{Rn(p)}catch(i){}else try{p.setAttribute(i,"")}catch(i){}},Yn=function _initDocument2(i){var c,p;if(ke)i=" "+i;else{var _=li(i,/^[\r\n\t ]+/);p=_&&_[0]}"application/xhtml+xml"===wt&&en===Je&&(i='
'+i+"");var k=tt?tt.createHTML(i):i;if(en===Je)try{c=(new Y).parseFromString(k,wt)}catch(i){}if(!c||!c.documentElement){c=ot.createDocument(en,"template",null);try{c.documentElement.innerHTML=ln?"":k}catch(i){}}var w=c.body||c.documentElement;return i&&p&&w.insertBefore(b.createTextNode(p),w.childNodes[0]||null),en===Je?gt.call(c,xe?"html":"body")[0]:xe?c.documentElement:w},jn=function _createIterator2(i){return ut.call(i.ownerDocument||i,i,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT,null,!1)},zn=function _isClobbered2(i){return i instanceof R&&("string"!=typeof i.nodeName||"string"!=typeof i.textContent||"function"!=typeof i.removeChild||!(i.attributes instanceof N)||"function"!=typeof i.removeAttribute||"function"!=typeof i.setAttribute||"string"!=typeof i.namespaceURI||"function"!=typeof i.insertBefore||"function"!=typeof i.hasChildNodes)},Wn=function _isNode2(i){return"object"===_typeof(w)?i instanceof w:i&&"object"===_typeof(i)&&"number"==typeof i.nodeType&&"string"==typeof i.nodeName},Un=function _executeHook2(i,p,b){kt[i]&&ri(kt[i],(function(i){i.call(c,p,b,En)}))},Hn=function _sanitizeElements2(i){var p;if(Un("beforeSanitizeElements",i,null),zn(i))return Rn(i),!0;if(di(/[\u0080-\uFFFF]/,i.nodeName))return Rn(i),!0;var b=Lt(i.nodeName);if(Un("uponSanitizeElement",i,{tagName:b,allowedTags:re}),i.hasChildNodes()&&!Wn(i.firstElementChild)&&(!Wn(i.content)||!Wn(i.content.firstElementChild))&&di(/<[/\w]/g,i.innerHTML)&&di(/<[/\w]/g,i.textContent))return Rn(i),!0;if("select"===b&&di(/=0;--w)_.insertBefore(U(k[w],!0),H(i))}return Rn(i),!0}return i instanceof T&&!$n(i)?(Rn(i),!0):"noscript"!==b&&"noembed"!==b||!di(/<\/no(script|embed)/i,i.innerHTML)?(_e&&3===i.nodeType&&(p=i.textContent,p=ci(p,Dt," "),p=ci(p,Mt," "),p=ci(p,It," "),i.textContent!==p&&(ai(c.removed,{element:i.cloneNode()}),i.textContent=p)),Un("afterSanitizeElements",i,null),!1):(Rn(i),!0)},qn=function _isValidAttribute2(i,c,p){if(Le&&("id"===c||"name"===c)&&(p in b||p in An))return!1;if(me&&!ge[c]&&di(jt,c));else if(ye&&di(Wt,c));else if(!se[c]||ge[c]){if(!(Vn(i)&&(le.tagNameCheck instanceof RegExp&&di(le.tagNameCheck,i)||le.tagNameCheck instanceof Function&&le.tagNameCheck(i))&&(le.attributeNameCheck instanceof RegExp&&di(le.attributeNameCheck,c)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(c))||"is"===c&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&di(le.tagNameCheck,p)||le.tagNameCheck instanceof Function&&le.tagNameCheck(p))))return!1}else if(He[c]);else if(di(ne,ci(p,ee,"")));else if("src"!==c&&"xlink:href"!==c&&"href"!==c||"script"===i||0!==hi(p,"data:")||!Ye[i]){if(be&&!di(te,ci(p,ee,"")));else if(p)return!1}else;return!0},Vn=function _basicCustomElementTest2(i){return i.indexOf("-")>0},Gn=function _sanitizeAttributes2(i){var p,b,_,k;Un("beforeSanitizeAttributes",i,null);var w=i.attributes;if(w){var T={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se};for(k=w.length;k--;){var S=p=w[k],O=S.name,N=S.namespaceURI;if(b="value"===O?p.value:ui(p.value),_=Lt(O),T.attrName=_,T.attrValue=b,T.keepAttr=!0,T.forceKeepAttr=void 0,Un("uponSanitizeAttribute",i,T),b=T.attrValue,!T.forceKeepAttr&&(Pn(O,i),T.keepAttr))if(di(/\/>/i,b))Pn(O,i);else{_e&&(b=ci(b,Dt," "),b=ci(b,Mt," "),b=ci(b,It," "));var R=Lt(i.nodeName);if(qn(R,_,b)){if(!De||"id"!==_&&"name"!==_||(Pn(O,i),b=Ne+b),tt&&"object"===_typeof(j)&&"function"==typeof j.getAttributeType)if(N);else switch(j.getAttributeType(R,_)){case"TrustedHTML":b=tt.createHTML(b);break;case"TrustedScriptURL":b=tt.createScriptURL(b)}try{N?i.setAttributeNS(N,O,b):i.setAttribute(O,b),ii(c.removed)}catch(i){}}}}Un("afterSanitizeAttributes",i,null)}},Xn=function _sanitizeShadowDOM2(i){var c,p=jn(i);for(Un("beforeSanitizeShadowDOM",i,null);c=p.nextNode();)Un("uponSanitizeShadowNode",c,null),Hn(c)||(c.content instanceof _&&_sanitizeShadowDOM2(c.content),Gn(c));Un("afterSanitizeShadowDOM",i,null)};return c.sanitize=function(b){var k,T,S,O,N,R=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ln=!b)&&(b="\x3c!--\x3e"),"string"!=typeof b&&!Wn(b)){if("function"!=typeof b.toString)throw pi("toString is not a function");if("string"!=typeof(b=b.toString()))throw pi("dirty is not a string, aborting")}if(!c.isSupported){if("object"===_typeof(i.toStaticHTML)||"function"==typeof i.toStaticHTML){if("string"==typeof b)return i.toStaticHTML(b);if(Wn(b))return i.toStaticHTML(b.outerHTML)}return b}if(ve||Dn(R),c.removed=[],"string"==typeof b&&(Ie=!1),Ie){if(b.nodeName){var Y=Lt(b.nodeName);if(!re[Y]||pe[Y])throw pi("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof w)1===(T=(k=Yn("\x3c!----\x3e")).ownerDocument.importNode(b,!0)).nodeType&&"BODY"===T.nodeName||"HTML"===T.nodeName?k=T:k.appendChild(T);else{if(!we&&!_e&&!xe&&-1===b.indexOf("<"))return tt&&Se?tt.createHTML(b):b;if(!(k=Yn(b)))return we?null:Se?et:""}k&&ke&&Rn(k.firstChild);for(var j=jn(Ie?b:k);S=j.nextNode();)3===S.nodeType&&S===O||Hn(S)||(S.content instanceof _&&Xn(S.content),Gn(S),O=S);if(O=null,Ie)return b;if(we){if(Ce)for(N=pt.call(k.ownerDocument);k.firstChild;)N.appendChild(k.firstChild);else N=k;return se.shadowroot&&(N=yt.call(p,N,!0)),N}var z=xe?k.outerHTML:k.innerHTML;return xe&&re["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&di(Mi,k.ownerDocument.doctype.name)&&(z="\n"+z),_e&&(z=ci(z,Dt," "),z=ci(z,Mt," "),z=ci(z,It," ")),tt&&Se?tt.createHTML(z):z},c.setConfig=function(i){Dn(i),ve=!0},c.clearConfig=function(){En=null,ve=!1},c.isValidAttribute=function(i,c,p){En||Dn({});var b=Lt(i),_=Lt(c);return qn(b,_,p)},c.addHook=function(i,c){"function"==typeof c&&(kt[i]=kt[i]||[],ai(kt[i],c))},c.removeHook=function(i){if(kt[i])return ii(kt[i])},c.removeHooks=function(i){kt[i]&&(kt[i]=[])},c.removeAllHooks=function(){kt={}},c}();const removeScript=i=>Fi.sanitize(i),sanitizeMore=(i,c)=>{var p;if(!1!==(null==(p=c.flowchart)?void 0:p.htmlLabels)){const p=c.securityLevel;"antiscript"===p||"strict"===p?i=removeScript(i):"loose"!==p&&(i=(i=(i=breakToPlaceholder(i)).replace(//g,">")).replace(/=/g,"="),i=placeholderToBreak(i))}return i},sanitizeText$5=(i,c)=>i?i=c.dompurifyConfig?Fi.sanitize(sanitizeMore(i,c),c.dompurifyConfig).toString():Fi.sanitize(sanitizeMore(i,c),{FORBID_TAGS:["style"]}).toString():i,$i=/ /gi,placeholderToBreak=i=>i.replace(/#br#/g," "),breakToPlaceholder=i=>i.replace($i,"#br#"),evaluate=i=>!1!==i&&!["false","null","0"].includes(String(i).trim().toLowerCase()),parseGenericTypes=function(i){let c=i;return i.includes("~")?(c=c.replace(/~([^~].*)/,"<$1"),c=c.replace(/~([^~]*)$/,">$1"),parseGenericTypes(c)):c},Ri={getRows:i=>{if(!i)return[""];return breakToPlaceholder(i).replace(/\\n/g,"#br#").split("#br#")},sanitizeText:sanitizeText$5,sanitizeTextOrArray:(i,c)=>"string"==typeof i?sanitizeText$5(i,c):i.flat().map((i=>sanitizeText$5(i,c))),hasBreaks:i=>$i.test(i),splitBreaks:i=>i.split($i),lineBreakRegex:$i,removeScript:removeScript,getUrl:i=>{let c="";return i&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replaceAll(/\(/g,"\\("),c=c.replaceAll(/\)/g,"\\)")),c},evaluate:evaluate},Pi={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:i=>i>=255?255:i<0?0:i,g:i=>i>=255?255:i<0?0:i,b:i=>i>=255?255:i<0?0:i,h:i=>i%360,s:i=>i>=100?100:i<0?0:i,l:i=>i>=100?100:i<0?0:i,a:i=>i>=1?1:i<0?0:i},toLinear:i=>{const c=i/255;return i>.03928?Math.pow((c+.055)/1.055,2.4):c/12.92},hue2rgb:(i,c,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<1/6?i+6*(c-i)*p:p<.5?c:p<2/3?i+(c-i)*(2/3-p)*6:i),hsl2rgb:({h:i,s:c,l:p},b)=>{if(!c)return 2.55*p;i/=360,c/=100;const _=(p/=100)<.5?p*(1+c):p+c-p*c,k=2*p-_;switch(b){case"r":return 255*Pi.hue2rgb(k,_,i+1/3);case"g":return 255*Pi.hue2rgb(k,_,i);case"b":return 255*Pi.hue2rgb(k,_,i-1/3)}},rgb2hsl:({r:i,g:c,b:p},b)=>{i/=255,c/=255,p/=255;const _=Math.max(i,c,p),k=Math.min(i,c,p),w=(_+k)/2;if("l"===b)return 100*w;if(_===k)return 0;const T=_-k;if("s"===b)return 100*(w>.5?T/(2-_-k):T/(_+k));switch(_){case i:return 60*((c-p)/T+(cc>p?Math.min(c,Math.max(p,i)):Math.min(p,Math.max(c,i)),round:i=>Math.round(1e10*i)/1e10},unit:{dec2hex:i=>{const c=Math.round(i).toString(16);return c.length>1?c:`0${c}`}}},ji={};for(let i=0;i<=255;i++)ji[i]=Yi.unit.dec2hex(i);const zi=0,Wi=1,Ui=2;const Hi=class Type{constructor(){this.type=zi}get(){return this.type}set(i){if(this.type&&this.type!==i)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=i}reset(){this.type=zi}is(i){return this.type===i}};const qi=new class Channels{constructor(i,c){this.color=c,this.changed=!1,this.data=i,this.type=new Hi}set(i,c){return this.color=c,this.changed=!1,this.data=i,this.type.type=zi,this}_ensureHSL(){const i=this.data,{h:c,s:p,l:b}=i;void 0===c&&(i.h=Yi.channel.rgb2hsl(i,"h")),void 0===p&&(i.s=Yi.channel.rgb2hsl(i,"s")),void 0===b&&(i.l=Yi.channel.rgb2hsl(i,"l"))}_ensureRGB(){const i=this.data,{r:c,g:p,b:b}=i;void 0===c&&(i.r=Yi.channel.hsl2rgb(i,"r")),void 0===p&&(i.g=Yi.channel.hsl2rgb(i,"g")),void 0===b&&(i.b=Yi.channel.hsl2rgb(i,"b"))}get r(){const i=this.data,c=i.r;return this.type.is(Ui)||void 0===c?(this._ensureHSL(),Yi.channel.hsl2rgb(i,"r")):c}get g(){const i=this.data,c=i.g;return this.type.is(Ui)||void 0===c?(this._ensureHSL(),Yi.channel.hsl2rgb(i,"g")):c}get b(){const i=this.data,c=i.b;return this.type.is(Ui)||void 0===c?(this._ensureHSL(),Yi.channel.hsl2rgb(i,"b")):c}get h(){const i=this.data,c=i.h;return this.type.is(Wi)||void 0===c?(this._ensureRGB(),Yi.channel.rgb2hsl(i,"h")):c}get s(){const i=this.data,c=i.s;return this.type.is(Wi)||void 0===c?(this._ensureRGB(),Yi.channel.rgb2hsl(i,"s")):c}get l(){const i=this.data,c=i.l;return this.type.is(Wi)||void 0===c?(this._ensureRGB(),Yi.channel.rgb2hsl(i,"l")):c}get a(){return this.data.a}set r(i){this.type.set(Wi),this.changed=!0,this.data.r=i}set g(i){this.type.set(Wi),this.changed=!0,this.data.g=i}set b(i){this.type.set(Wi),this.changed=!0,this.data.b=i}set h(i){this.type.set(Ui),this.changed=!0,this.data.h=i}set s(i){this.type.set(Ui),this.changed=!0,this.data.s=i}set l(i){this.type.set(Ui),this.changed=!0,this.data.l=i}set a(i){this.changed=!0,this.data.a=i}}({r:0,g:0,b:0,a:0},"transparent"),Vi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(35!==i.charCodeAt(0))return;const c=i.match(Vi.re);if(!c)return;const p=c[1],b=parseInt(p,16),_=p.length,k=_%4==0,w=_>4,T=w?1:17,S=w?8:4,O=k?0:-1,N=w?255:15;return qi.set({r:(b>>S*(O+3)&N)*T,g:(b>>S*(O+2)&N)*T,b:(b>>S*(O+1)&N)*T,a:k?(b&N)*T/255:1},i)},stringify:i=>{const{r:c,g:p,b:b,a:_}=i;return _<1?`#${ji[Math.round(c)]}${ji[Math.round(p)]}${ji[Math.round(b)]}${ji[Math.round(255*_)]}`:`#${ji[Math.round(c)]}${ji[Math.round(p)]}${ji[Math.round(b)]}`}},Gi=Vi,Xi={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:i=>{const c=i.match(Xi.hueRe);if(c){const[,i,p]=c;switch(p){case"grad":return Yi.channel.clamp.h(.9*parseFloat(i));case"rad":return Yi.channel.clamp.h(180*parseFloat(i)/Math.PI);case"turn":return Yi.channel.clamp.h(360*parseFloat(i))}}return Yi.channel.clamp.h(parseFloat(i))},parse:i=>{const c=i.charCodeAt(0);if(104!==c&&72!==c)return;const p=i.match(Xi.re);if(!p)return;const[,b,_,k,w,T]=p;return qi.set({h:Xi._hue2deg(b),s:Yi.channel.clamp.s(parseFloat(_)),l:Yi.channel.clamp.l(parseFloat(k)),a:w?Yi.channel.clamp.a(T?parseFloat(w)/100:parseFloat(w)):1},i)},stringify:i=>{const{h:c,s:p,l:b,a:_}=i;return _<1?`hsla(${Yi.lang.round(c)}, ${Yi.lang.round(p)}%, ${Yi.lang.round(b)}%, ${_})`:`hsl(${Yi.lang.round(c)}, ${Yi.lang.round(p)}%, ${Yi.lang.round(b)}%)`}},Zi=Xi,Ki={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:i=>{i=i.toLowerCase();const c=Ki.colors[i];if(c)return Gi.parse(c)},stringify:i=>{const c=Gi.stringify(i);for(const i in Ki.colors)if(Ki.colors[i]===c)return i}},Qi=Ki,Ji={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:i=>{const c=i.charCodeAt(0);if(114!==c&&82!==c)return;const p=i.match(Ji.re);if(!p)return;const[,b,_,k,w,T,S,O,N]=p;return qi.set({r:Yi.channel.clamp.r(_?2.55*parseFloat(b):parseFloat(b)),g:Yi.channel.clamp.g(w?2.55*parseFloat(k):parseFloat(k)),b:Yi.channel.clamp.b(S?2.55*parseFloat(T):parseFloat(T)),a:O?Yi.channel.clamp.a(N?parseFloat(O)/100:parseFloat(O)):1},i)},stringify:i=>{const{r:c,g:p,b:b,a:_}=i;return _<1?`rgba(${Yi.lang.round(c)}, ${Yi.lang.round(p)}, ${Yi.lang.round(b)}, ${Yi.lang.round(_)})`:`rgb(${Yi.lang.round(c)}, ${Yi.lang.round(p)}, ${Yi.lang.round(b)})`}},ta=Ji,ea={format:{keyword:Qi,hex:Gi,rgb:ta,rgba:ta,hsl:Zi,hsla:Zi},parse:i=>{if("string"!=typeof i)return i;const c=Gi.parse(i)||ta.parse(i)||Zi.parse(i)||Qi.parse(i);if(c)return c;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(Ui)||void 0===i.data.r?Zi.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?ta.stringify(i):Gi.stringify(i)},change$1=(i,c)=>{const p=ea.parse(i);for(const i in c)p[i]=Yi.channel.clamp[i](c[i]);return ea.stringify(p)},rgba$1=(i,c,p=0,b=1)=>{if("number"!=typeof i)return change$1(i,{a:c});const _=qi.set({r:Yi.channel.clamp.r(i),g:Yi.channel.clamp.g(c),b:Yi.channel.clamp.b(p),a:Yi.channel.clamp.a(b)});return ea.stringify(_)},adjustChannel$1=(i,c,p)=>{const b=ea.parse(i),_=b[c],k=Yi.channel.clamp[c](_+p);return _!==k&&(b[c]=k),ea.stringify(b)},lighten$1=(i,c)=>adjustChannel$1(i,"l",c),darken$1=(i,c)=>adjustChannel$1(i,"l",-c),adjust$2=(i,c)=>{const p=ea.parse(i),b={};for(const i in c)c[i]&&(b[i]=p[i]+c[i]);return change$1(i,b)},mix$1=(i,c,p=50)=>{const{r:b,g:_,b:k,a:w}=ea.parse(i),{r:T,g:S,b:O,a:N}=ea.parse(c),R=p/100,Y=2*R-1,j=w-N,z=((Y*j==-1?Y:(Y+j)/(1+Y*j))+1)/2,U=1-z;return rgba$1(b*z+T*U,_*z+S*U,k*z+O*U,w*R+N*(1-R))},invert$1=(i,c=100)=>{const p=ea.parse(i);return p.r=255-p.r,p.g=255-p.g,p.b=255-p.b,mix$1(p,i,c)},mkBorder=(i,c)=>adjust$2(i,c?{s:-40,l:10}:{s:-40,l:-10}),na="#ffffff",ra="#f2f2f2";class Theme$4{constructor(){this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust$2(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust$2(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert$1(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert$1(this.tertiaryColor),this.lineColor=this.lineColor||invert$1(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?darken$1(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||darken$1(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||invert$1(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||lighten$1(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i{this[c]=i[c]})),this.updateColors(),c.forEach((c=>{this[c]=i[c]}))}}class Theme$3{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=lighten$1(this.primaryColor,16),this.tertiaryColor=adjust$2(this.primaryColor,{h:-160}),this.primaryBorderColor=invert$1(this.background),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=lighten$1(invert$1("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=rgba$1(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=darken$1("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=rgba$1(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=rgba$1(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=lighten$1(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=lighten$1(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=lighten$1(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=adjust$2(this.primaryColor,{h:64}),this.fillType3=adjust$2(this.secondaryColor,{h:64}),this.fillType4=adjust$2(this.primaryColor,{h:-64}),this.fillType5=adjust$2(this.secondaryColor,{h:-64}),this.fillType6=adjust$2(this.primaryColor,{h:128}),this.fillType7=adjust$2(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330});for(let i=0;i{this[c]=i[c]})),this.updateColors(),c.forEach((c=>{this[c]=i[c]}))}}class Theme$2{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=adjust$2(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=adjust$2(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=rgba$1(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken$1(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken$1(this.tertiaryColor,40);for(let i=0;i{this[c]=i[c]})),this.updateColors(),c.forEach((c=>{this[c]=i[c]}))}}class Theme$1{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=lighten$1("#cde498",10),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.primaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||adjust$2(this.primaryColor,{h:30}),this.cScale4=this.cScale4||adjust$2(this.primaryColor,{h:60}),this.cScale5=this.cScale5||adjust$2(this.primaryColor,{h:90}),this.cScale6=this.cScale6||adjust$2(this.primaryColor,{h:120}),this.cScale7=this.cScale7||adjust$2(this.primaryColor,{h:150}),this.cScale8=this.cScale8||adjust$2(this.primaryColor,{h:210}),this.cScale9=this.cScale9||adjust$2(this.primaryColor,{h:270}),this.cScale10=this.cScale10||adjust$2(this.primaryColor,{h:300}),this.cScale11=this.cScale11||adjust$2(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||darken$1(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||darken$1(this.tertiaryColor,40);for(let i=0;i{this[c]=i[c]})),this.updateColors(),c.forEach((c=>{this[c]=i[c]}))}}class Theme{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=lighten$1(this.contrast,55),this.background="#ffffff",this.tertiaryColor=adjust$2(this.primaryColor,{h:-160}),this.primaryBorderColor=mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mkBorder(this.tertiaryColor,this.darkMode),this.primaryTextColor=invert$1(this.primaryColor),this.secondaryTextColor=invert$1(this.secondaryColor),this.tertiaryTextColor=invert$1(this.tertiaryColor),this.lineColor=invert$1(this.background),this.textColor=invert$1(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=lighten$1(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let i=0;i{this[c]=i[c]})),this.updateColors(),c.forEach((c=>{this[c]=i[c]}))}}const ia={base:{getThemeVariables:i=>{const c=new Theme$4;return c.calculate(i),c}},dark:{getThemeVariables:i=>{const c=new Theme$3;return c.calculate(i),c}},default:{getThemeVariables:i=>{const c=new Theme$2;return c.calculate(i),c}},forest:{getThemeVariables:i=>{const c=new Theme$1;return c.calculate(i),c}},neutral:{getThemeVariables:i=>{const c=new Theme;return c.calculate(i),c}}},aa={theme:"default",themeVariables:ia.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};aa.class&&(aa.class.arrowMarkerAbsolute=aa.arrowMarkerAbsolute),aa.gitGraph&&(aa.gitGraph.arrowMarkerAbsolute=aa.arrowMarkerAbsolute);const keyify=(i,c="")=>Object.keys(i).reduce(((p,b)=>Array.isArray(i[b])?p:"object"==typeof i[b]&&null!==i[b]?[...p,c+b,...keyify(i[b],"")]:[...p,c+b]),[]),sa=keyify(aa,""),oa=aa;
-/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
-function isNothing(i){return null==i}var la={isNothing:isNothing,isObject:function isObject$1(i){return"object"==typeof i&&null!==i},toArray:function toArray(i){return Array.isArray(i)?i:isNothing(i)?[]:[i]},repeat:function repeat(i,c){var p,b="";for(p=0;pT&&(c=b-T+(k=" ... ").length),p-b>T&&(p=b+T-(w=" ...").length),{str:k+i.slice(c,p).replace(/\t/g,"→")+w,pos:b-c+k.length}}function padStart(i,c){return la.repeat(" ",c-i.length)+i}var ha=function makeSnippet(i,c){if(c=Object.create(c||null),!i.buffer)return null;c.maxLength||(c.maxLength=79),"number"!=typeof c.indent&&(c.indent=1),"number"!=typeof c.linesBefore&&(c.linesBefore=3),"number"!=typeof c.linesAfter&&(c.linesAfter=2);for(var p,b=/\r?\n|\r|\0/g,_=[0],k=[],w=-1;p=b.exec(i.buffer);)k.push(p.index),_.push(p.index+p[0].length),i.position<=p.index&&w<0&&(w=_.length-2);w<0&&(w=_.length-1);var T,S,O="",N=Math.min(i.line+c.linesAfter,k.length).toString().length,R=c.maxLength-(c.indent+N+3);for(T=1;T<=c.linesBefore&&!(w-T<0);T++)S=getLine(i.buffer,_[w-T],k[w-T],i.position-(_[w]-_[w-T]),R),O=la.repeat(" ",c.indent)+padStart((i.line-T+1).toString(),N)+" | "+S.str+"\n"+O;for(S=getLine(i.buffer,_[w],k[w],i.position,R),O+=la.repeat(" ",c.indent)+padStart((i.line+1).toString(),N)+" | "+S.str+"\n",O+=la.repeat("-",c.indent+N+3+S.pos)+"^\n",T=1;T<=c.linesAfter&&!(w+T>=k.length);T++)S=getLine(i.buffer,_[w+T],k[w+T],i.position-(_[w]-_[w+T]),R),O+=la.repeat(" ",c.indent)+padStart((i.line+T+1).toString(),N)+" | "+S.str+"\n";return O.replace(/\n$/,"")},ua=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],da=["scalar","sequence","mapping"];var pa=function Type$1(i,c){if(c=c||{},Object.keys(c).forEach((function(c){if(-1===ua.indexOf(c))throw new ca('Unknown option "'+c+'" is met in definition of "'+i+'" YAML type.')})),this.options=c,this.tag=i,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(i){return i},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=function compileStyleAliases(i){var c={};return null!==i&&Object.keys(i).forEach((function(p){i[p].forEach((function(i){c[String(i)]=p}))})),c}(c.styleAliases||null),-1===da.indexOf(this.kind))throw new ca('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')};function compileList(i,c){var p=[];return i[c].forEach((function(i){var c=p.length;p.forEach((function(p,b){p.tag===i.tag&&p.kind===i.kind&&p.multi===i.multi&&(c=b)})),p[c]=i})),p}function Schema$1(i){return this.extend(i)}Schema$1.prototype.extend=function extend2(i){var c=[],p=[];if(i instanceof pa)p.push(i);else if(Array.isArray(i))p=p.concat(i);else{if(!i||!Array.isArray(i.implicit)&&!Array.isArray(i.explicit))throw new ca("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.implicit&&(c=c.concat(i.implicit)),i.explicit&&(p=p.concat(i.explicit))}c.forEach((function(i){if(!(i instanceof pa))throw new ca("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&"scalar"!==i.loadKind)throw new ca("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new ca("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),p.forEach((function(i){if(!(i instanceof pa))throw new ca("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var b=Object.create(Schema$1.prototype);return b.implicit=(this.implicit||[]).concat(c),b.explicit=(this.explicit||[]).concat(p),b.compiledImplicit=compileList(b,"implicit"),b.compiledExplicit=compileList(b,"explicit"),b.compiledTypeMap=function compileMap(){var i,c,p={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(i){i.multi?(p.multi[i.kind].push(i),p.multi.fallback.push(i)):p[i.kind][i.tag]=p.fallback[i.tag]=i}for(i=0,c=arguments.length;i=0?"0b"+i.toString(2):"-0b"+i.toString(2).slice(1)},octal:function(i){return i>=0?"0o"+i.toString(8):"-0o"+i.toString(8).slice(1)},decimal:function(i){return i.toString(10)},hexadecimal:function(i){return i>=0?"0x"+i.toString(16).toUpperCase():"-0x"+i.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ba=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var _a=/^[-+]?[0-9]+e/;var xa=new pa("tag:yaml.org,2002:float",{kind:"scalar",resolve:function resolveYamlFloat(i){return null!==i&&!(!ba.test(i)||"_"===i[i.length-1])},construct:function constructYamlFloat(i){var c,p;return p="-"===(c=i.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(c[0])>=0&&(c=c.slice(1)),".inf"===c?1===p?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===c?NaN:p*parseFloat(c,10)},predicate:function isFloat(i){return"[object Number]"===Object.prototype.toString.call(i)&&(i%1!=0||la.isNegativeZero(i))},represent:function representYamlFloat(i,c){var p;if(isNaN(i))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===i)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===i)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(la.isNegativeZero(i))return"-0.0";return p=i.toString(10),_a.test(p)?p.replace("e",".e"):p},defaultStyle:"lowercase"}),va=fa.extend({implicit:[ga,ya,ma,xa]}),ka=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),wa=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Ta=new pa("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function resolveYamlTimestamp(i){return null!==i&&(null!==ka.exec(i)||null!==wa.exec(i))},construct:function constructYamlTimestamp(i){var c,p,b,_,k,w,T,S,O=0,N=null;if(null===(c=ka.exec(i))&&(c=wa.exec(i)),null===c)throw new Error("Date resolve error");if(p=+c[1],b=+c[2]-1,_=+c[3],!c[4])return new Date(Date.UTC(p,b,_));if(k=+c[4],w=+c[5],T=+c[6],c[7]){for(O=c[7].slice(0,3);O.length<3;)O+="0";O=+O}return c[9]&&(N=6e4*(60*+c[10]+ +(c[11]||0)),"-"===c[9]&&(N=-N)),S=new Date(Date.UTC(p,b,_,k,w,T,O)),N&&S.setTime(S.getTime()-N),S},instanceOf:Date,represent:function representYamlTimestamp(i){return i.toISOString()}});var Ca=new pa("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function resolveYamlMerge(i){return"<<"===i||null===i}}),Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Ea=new pa("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function resolveYamlBinary(i){if(null===i)return!1;var c,p,b=0,_=i.length,k=Sa;for(p=0;p<_;p++)if(!((c=k.indexOf(i.charAt(p)))>64)){if(c<0)return!1;b+=6}return b%8==0},construct:function constructYamlBinary(i){var c,p,b=i.replace(/[\r\n=]/g,""),_=b.length,k=Sa,w=0,T=[];for(c=0;c<_;c++)c%4==0&&c&&(T.push(w>>16&255),T.push(w>>8&255),T.push(255&w)),w=w<<6|k.indexOf(b.charAt(c));return 0===(p=_%4*6)?(T.push(w>>16&255),T.push(w>>8&255),T.push(255&w)):18===p?(T.push(w>>10&255),T.push(w>>2&255)):12===p&&T.push(w>>4&255),new Uint8Array(T)},predicate:function isBinary(i){return"[object Uint8Array]"===Object.prototype.toString.call(i)},represent:function representYamlBinary(i){var c,p,b="",_=0,k=i.length,w=Sa;for(c=0;c>18&63],b+=w[_>>12&63],b+=w[_>>6&63],b+=w[63&_]),_=(_<<8)+i[c];return 0===(p=k%3)?(b+=w[_>>18&63],b+=w[_>>12&63],b+=w[_>>6&63],b+=w[63&_]):2===p?(b+=w[_>>10&63],b+=w[_>>4&63],b+=w[_<<2&63],b+=w[64]):1===p&&(b+=w[_>>2&63],b+=w[_<<4&63],b+=w[64],b+=w[64]),b}}),Aa=Object.prototype.hasOwnProperty,La=Object.prototype.toString;var Da=new pa("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function resolveYamlOmap(i){if(null===i)return!0;var c,p,b,_,k,w=[],T=i;for(c=0,p=T.length;c>10),56320+(i-65536&1023))}for(var za=new Array(256),Wa=new Array(256),Ua=0;Ua<256;Ua++)za[Ua]=simpleEscapeSequence(Ua)?1:0,Wa[Ua]=simpleEscapeSequence(Ua);function State$1(i,c){this.input=i,this.filename=c.filename||null,this.schema=c.schema||Ba,this.onWarning=c.onWarning||null,this.legacy=c.legacy||!1,this.json=c.json||!1,this.listener=c.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=i.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(i,c){var p={name:i.filename,buffer:i.input.slice(0,-1),position:i.position,line:i.line,column:i.position-i.lineStart};return p.snippet=ha(p),new ca(c,p)}function throwError(i,c){throw generateError(i,c)}function throwWarning(i,c){i.onWarning&&i.onWarning.call(null,generateError(i,c))}var Ha={YAML:function handleYamlDirective(i,c,p){var b,_,k;null!==i.version&&throwError(i,"duplication of %YAML directive"),1!==p.length&&throwError(i,"YAML directive accepts exactly one argument"),null===(b=/^([0-9]+)\.([0-9]+)$/.exec(p[0]))&&throwError(i,"ill-formed argument of the YAML directive"),_=parseInt(b[1],10),k=parseInt(b[2],10),1!==_&&throwError(i,"unacceptable YAML version of the document"),i.version=p[0],i.checkLineBreaks=k<2,1!==k&&2!==k&&throwWarning(i,"unsupported YAML version of the document")},TAG:function handleTagDirective(i,c,p){var b,_;2!==p.length&&throwError(i,"TAG directive accepts exactly two arguments"),b=p[0],_=p[1],Ya.test(b)||throwError(i,"ill-formed tag handle (first argument) of the TAG directive"),Fa.call(i.tagMap,b)&&throwError(i,'there is a previously declared suffix for "'+b+'" tag handle'),ja.test(_)||throwError(i,"ill-formed tag prefix (second argument) of the TAG directive");try{_=decodeURIComponent(_)}catch(c){throwError(i,"tag prefix is malformed: "+_)}i.tagMap[b]=_}};function captureSegment(i,c,p,b){var _,k,w,T;if(c
1&&(i.result+=la.repeat("\n",c-1))}function readBlockSequence(i,c){var p,b,_=i.tag,k=i.anchor,w=[],T=!1;if(-1!==i.firstTabInLine)return!1;for(null!==i.anchor&&(i.anchorMap[i.anchor]=w),b=i.input.charCodeAt(i.position);0!==b&&(-1!==i.firstTabInLine&&(i.position=i.firstTabInLine,throwError(i,"tab characters must not be used in indentation")),45===b)&&is_WS_OR_EOL(i.input.charCodeAt(i.position+1));)if(T=!0,i.position++,skipSeparationSpace(i,!0,-1)&&i.lineIndent<=c)w.push(null),b=i.input.charCodeAt(i.position);else if(p=i.line,composeNode(i,c,3,!1,!0),w.push(i.result),skipSeparationSpace(i,!0,-1),b=i.input.charCodeAt(i.position),(i.line===p||i.lineIndent>c)&&0!==b)throwError(i,"bad indentation of a sequence entry");else if(i.lineIndentc?z=1:i.lineIndent===c?z=0:i.lineIndentc?z=1:i.lineIndent===c?z=0:i.lineIndentc)&&(Z&&(w=i.line,T=i.lineStart,S=i.position),composeNode(i,c,4,!0,_)&&(Z?U=i.result:H=i.result),Z||(storeMappingPair(i,Y,j,z,U,H,w,T,S),z=U=H=null),skipSeparationSpace(i,!0,-1),O=i.input.charCodeAt(i.position)),(i.line===k||i.lineIndent>c)&&0!==O)throwError(i,"bad indentation of a mapping entry");else if(i.lineIndent=0))break;0===_?throwError(i,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?throwError(i,"repeat of an indentation width identifier"):(N=c+_-1,O=!0)}if(is_WHITE_SPACE(k)){do{k=i.input.charCodeAt(++i.position)}while(is_WHITE_SPACE(k));if(35===k)do{k=i.input.charCodeAt(++i.position)}while(!is_EOL(k)&&0!==k)}for(;0!==k;){for(readLineBreak(i),i.lineIndent=0,k=i.input.charCodeAt(i.position);(!O||i.lineIndentN&&(N=i.lineIndent),is_EOL(k))R++;else{if(i.lineIndent0){for(_=w,k=0;_>0;_--)(w=fromHexCode(T=i.input.charCodeAt(++i.position)))>=0?k=(k<<4)+w:throwError(i,"expected hexadecimal character");i.result+=charFromCodepoint(k),i.position++}else throwError(i,"unknown escape sequence");p=b=i.position}else is_EOL(T)?(captureSegment(i,p,b,!0),writeFoldedLines(i,skipSeparationSpace(i,!1,c)),p=b=i.position):i.position===i.lineStart&&testDocumentSeparator(i)?throwError(i,"unexpected end of the document within a double quoted scalar"):(i.position++,b=i.position)}throwError(i,"unexpected end of the stream within a double quoted scalar")}(i,Y)?H=!0:!function readAlias(i){var c,p,b;if(42!==(b=i.input.charCodeAt(i.position)))return!1;for(b=i.input.charCodeAt(++i.position),c=i.position;0!==b&&!is_WS_OR_EOL(b)&&!is_FLOW_INDICATOR(b);)b=i.input.charCodeAt(++i.position);return i.position===c&&throwError(i,"name of an alias node must contain at least one character"),p=i.input.slice(c,i.position),Fa.call(i.anchorMap,p)||throwError(i,'unidentified alias "'+p+'"'),i.result=i.anchorMap[p],skipSeparationSpace(i,!0,-1),!0}(i)?function readPlainScalar(i,c,p){var b,_,k,w,T,S,O,N,R=i.kind,Y=i.result;if(is_WS_OR_EOL(N=i.input.charCodeAt(i.position))||is_FLOW_INDICATOR(N)||35===N||38===N||42===N||33===N||124===N||62===N||39===N||34===N||37===N||64===N||96===N)return!1;if((63===N||45===N)&&(is_WS_OR_EOL(b=i.input.charCodeAt(i.position+1))||p&&is_FLOW_INDICATOR(b)))return!1;for(i.kind="scalar",i.result="",_=k=i.position,w=!1;0!==N;){if(58===N){if(is_WS_OR_EOL(b=i.input.charCodeAt(i.position+1))||p&&is_FLOW_INDICATOR(b))break}else if(35===N){if(is_WS_OR_EOL(i.input.charCodeAt(i.position-1)))break}else{if(i.position===i.lineStart&&testDocumentSeparator(i)||p&&is_FLOW_INDICATOR(N))break;if(is_EOL(N)){if(T=i.line,S=i.lineStart,O=i.lineIndent,skipSeparationSpace(i,!1,-1),i.lineIndent>=c){w=!0,N=i.input.charCodeAt(i.position);continue}i.position=k,i.line=T,i.lineStart=S,i.lineIndent=O;break}}w&&(captureSegment(i,_,k,!1),writeFoldedLines(i,i.line-T),_=k=i.position,w=!1),is_WHITE_SPACE(N)||(k=i.position+1),N=i.input.charCodeAt(++i.position)}return captureSegment(i,_,k,!1),!!i.result||(i.kind=R,i.result=Y,!1)}(i,Y,1===p)&&(H=!0,null===i.tag&&(i.tag="?")):(H=!0,null===i.tag&&null===i.anchor||throwError(i,"alias node should not have any properties")),null!==i.anchor&&(i.anchorMap[i.anchor]=i.result)):0===z&&(H=T&&readBlockSequence(i,j))),null===i.tag)null!==i.anchor&&(i.anchorMap[i.anchor]=i.result);else if("?"===i.tag){for(null!==i.result&&"scalar"!==i.kind&&throwError(i,'unacceptable node kind for !> tag; it should be "scalar", not "'+i.kind+'"'),S=0,O=i.implicitTypes.length;S"),null!==i.result&&R.kind!==i.kind&&throwError(i,"unacceptable node kind for !<"+i.tag+'> tag; it should be "'+R.kind+'", not "'+i.kind+'"'),R.resolve(i.result,i.tag)?(i.result=R.construct(i.result,i.tag),null!==i.anchor&&(i.anchorMap[i.anchor]=i.result)):throwError(i,"cannot resolve a node with !<"+i.tag+"> explicit tag")}return null!==i.listener&&i.listener("close",i),null!==i.tag||null!==i.anchor||H}function readDocument(i){var c,p,b,_,k=i.position,w=!1;for(i.version=null,i.checkLineBreaks=i.legacy,i.tagMap=Object.create(null),i.anchorMap=Object.create(null);0!==(_=i.input.charCodeAt(i.position))&&(skipSeparationSpace(i,!0,-1),_=i.input.charCodeAt(i.position),!(i.lineIndent>0||37!==_));){for(w=!0,_=i.input.charCodeAt(++i.position),c=i.position;0!==_&&!is_WS_OR_EOL(_);)_=i.input.charCodeAt(++i.position);for(b=[],(p=i.input.slice(c,i.position)).length<1&&throwError(i,"directive name must not be less than one character in length");0!==_;){for(;is_WHITE_SPACE(_);)_=i.input.charCodeAt(++i.position);if(35===_){do{_=i.input.charCodeAt(++i.position)}while(0!==_&&!is_EOL(_));break}if(is_EOL(_))break;for(c=i.position;0!==_&&!is_WS_OR_EOL(_);)_=i.input.charCodeAt(++i.position);b.push(i.input.slice(c,i.position))}0!==_&&readLineBreak(i),Fa.call(Ha,p)?Ha[p](i,p,b):throwWarning(i,'unknown document directive "'+p+'"')}skipSeparationSpace(i,!0,-1),0===i.lineIndent&&45===i.input.charCodeAt(i.position)&&45===i.input.charCodeAt(i.position+1)&&45===i.input.charCodeAt(i.position+2)?(i.position+=3,skipSeparationSpace(i,!0,-1)):w&&throwError(i,"directives end mark is expected"),composeNode(i,i.lineIndent-1,4,!1,!0),skipSeparationSpace(i,!0,-1),i.checkLineBreaks&&Ra.test(i.input.slice(k,i.position))&&throwWarning(i,"non-ASCII line breaks are interpreted as content"),i.documents.push(i.result),i.position===i.lineStart&&testDocumentSeparator(i)?46===i.input.charCodeAt(i.position)&&(i.position+=3,skipSeparationSpace(i,!0,-1)):i.position{if(Ka[i])throw new Error(`Detector with key ${i} already exists`);Ka[i]={detector:c,loader:p},k.debug(`Detector with key ${i} added${p?" with loader":""}`)},assignWithDepth=function(i,c,p){const{depth:b,clobber:_}=Object.assign({depth:2,clobber:!1},p);return Array.isArray(c)&&!Array.isArray(i)?(c.forEach((c=>assignWithDepth(i,c,p))),i):Array.isArray(c)&&Array.isArray(i)?(c.forEach((c=>{i.includes(c)||i.push(c)})),i):void 0===i||b<=0?null!=i&&"object"==typeof i&&"object"==typeof c?Object.assign(i,c):c:(void 0!==c&&"object"==typeof i&&"object"==typeof c&&Object.keys(c).forEach((p=>{"object"!=typeof c[p]||void 0!==i[p]&&"object"!=typeof i[p]?(_||"object"!=typeof i[p]&&"object"!=typeof c[p])&&(i[p]=c[p]):(void 0===i[p]&&(i[p]=Array.isArray(c[p])?[]:{}),i[p]=assignWithDepth(i[p],c[p],{depth:b-1,clobber:_}))})),i)},Qa=assignWithDepth;const Ja="object"==typeof global&&global&&global.Object===Object&&global;var ts="object"==typeof self&&self&&self.Object===Object&&self;const es=Ja||ts||Function("return this")();const ns=es.Symbol;var rs=Object.prototype,is=rs.hasOwnProperty,as=rs.toString,ss=ns?ns.toStringTag:void 0;var os=Object.prototype.toString;var ls=ns?ns.toStringTag:void 0;function baseGetTag(i){return null==i?void 0===i?"[object Undefined]":"[object Null]":ls&&ls in Object(i)?function getRawTag(i){var c=is.call(i,ss),p=i[ss];try{i[ss]=void 0;var b=!0}catch(i){}var _=as.call(i);return b&&(c?i[ss]=p:delete i[ss]),_}(i):function objectToString(i){return os.call(i)}(i)}function isObject(i){var c=typeof i;return null!=i&&("object"==c||"function"==c)}function isFunction(i){if(!isObject(i))return!1;var c=baseGetTag(i);return"[object Function]"==c||"[object GeneratorFunction]"==c||"[object AsyncFunction]"==c||"[object Proxy]"==c}const cs=es["__core-js_shared__"];var hs,us=(hs=/[^.]+$/.exec(cs&&cs.keys&&cs.keys.IE_PROTO||""))?"Symbol(src)_1."+hs:"";var ds=Function.prototype.toString;function toSource(i){if(null!=i){try{return ds.call(i)}catch(i){}try{return i+""}catch(i){}}return""}var ps=/^\[object .+?Constructor\]$/,fs=Function.prototype,gs=Object.prototype,ys=fs.toString,ms=gs.hasOwnProperty,bs=RegExp("^"+ys.call(ms).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(i){return!(!isObject(i)||function isMasked(i){return!!us&&us in i}(i))&&(isFunction(i)?bs:ps).test(toSource(i))}function getNative(i,c){var p=function getValue(i,c){return null==i?void 0:i[c]}(i,c);return baseIsNative(p)?p:void 0}const _s=getNative(Object,"create");var xs=Object.prototype.hasOwnProperty;var vs=Object.prototype.hasOwnProperty;function Hash(i){var c=-1,p=null==i?0:i.length;for(this.clear();++c-1},ListCache.prototype.set=function listCacheSet(i,c){var p=this.__data__,b=assocIndexOf(p,i);return b<0?(++this.size,p.push([i,c])):p[b][1]=c,this};const ws=getNative(es,"Map");function getMapData(i,c){var p=i.__data__;return function isKeyable(i){var c=typeof i;return"string"==c||"number"==c||"symbol"==c||"boolean"==c?"__proto__"!==i:null===i}(c)?p["string"==typeof c?"string":"hash"]:p.map}function MapCache(i){var c=-1,p=null==i?0:i.length;for(this.clear();++c
(Es++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Es);const random=i=>function makeid(i){let c="";const p="0123456789abcdef",b=p.length;for(let _=0;_{if(!i)return i;if(p=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:" "},p),Ri.lineBreakRegex.test(i))return i;const b=i.split(" "),_=[];let k="";return b.forEach(((i,w)=>{const T=calculateTextWidth(`${i} `,p),S=calculateTextWidth(k,p);if(T>c){const{hyphenatedStrings:b,remainingWord:w}=Ls(i,c,"-",p);_.push(k,...b),k=w}else S+T>=c?(_.push(k),k=i):k=[k,i].filter(Boolean).join(" ");w+1===b.length&&_.push(k)})),_.filter((i=>""!==i)).join(p.joinWith)}),((i,c,p)=>`${i}${c}${p.fontSize}${p.fontWeight}${p.fontFamily}${p.joinWith}`)),Ls=memoize(((i,c,p="-",b)=>{b=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},b);const _=[...i],k=[];let w="";return _.forEach(((i,T)=>{const S=`${w}${i}`;if(calculateTextWidth(S,b)>=c){const i=T+1,c=_.length===i,b=`${S}${p}`;k.push(c?S:b),w=""}else w=S})),{hyphenatedStrings:k,remainingWord:w}}),((i,c,p="-",b)=>`${i}${c}${p}${b.fontSize}${b.fontWeight}${b.fontFamily}`));function calculateTextHeight(i,c){return c=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},c),Ds(i,c).height}function calculateTextWidth(i,c){return c=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},c),Ds(i,c).width}const Ds=memoize(((i,c)=>{c=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},c);const{fontSize:p,fontFamily:b,fontWeight:_}=c;if(!i)return{width:0,height:0};const k=["sans-serif",b],w=i.split(Ri.lineBreakRegex),T=[],S=select("body");if(!S.remove)return{width:0,height:0,lineHeight:0};const O=S.append("svg");for(const i of k){let c=0;const b={width:0,height:0,lineHeight:0};for(const k of w){const w={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};w.text=k;const T=drawSimpleText(O,w).style("font-size",p).style("font-weight",_).style("font-family",i),S=(T._groups||T)[0][0].getBBox();b.width=Math.round(Math.max(b.width,S.width)),c=Math.round(S.height),b.height+=c,b.lineHeight=Math.round(Math.max(b.lineHeight,c))}T.push(b)}O.remove();return T[isNaN(T[1].height)||isNaN(T[1].width)||isNaN(T[1].lineHeight)||T[0].height>T[1].height&&T[0].width>T[1].width&&T[0].lineHeight>T[1].lineHeight?0:1]}),((i,c)=>`${i}${c.fontSize}${c.fontWeight}${c.fontFamily}`));let Os;const directiveSanitizer=i=>{if(k.debug("directiveSanitizer called with",i),"object"==typeof i&&(i.length?i.forEach((i=>directiveSanitizer(i))):Object.keys(i).forEach((c=>{k.debug("Checking key",c),c.startsWith("__")&&(k.debug("sanitize deleting __ option",c),delete i[c]),c.includes("proto")&&(k.debug("sanitize deleting proto option",c),delete i[c]),c.includes("constr")&&(k.debug("sanitize deleting constr option",c),delete i[c]),c.includes("themeCSS")&&(k.debug("sanitizing themeCss option"),i[c]=sanitizeCss(i[c])),c.includes("fontFamily")&&(k.debug("sanitizing fontFamily option"),i[c]=sanitizeCss(i[c])),c.includes("altFontFamily")&&(k.debug("sanitizing altFontFamily option"),i[c]=sanitizeCss(i[c])),sa.includes(c)?"object"==typeof i[c]&&(k.debug("sanitize deleting object",c),directiveSanitizer(i[c])):(k.debug("sanitize deleting option",c),delete i[c])}))),i.themeVariables){const c=Object.keys(i.themeVariables);for(const p of c){const c=i.themeVariables[p];c&&c.match&&!c.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[p]="")}}k.debug("After sanitization",i)},sanitizeCss=i=>{let c=0,p=0;for(const b of i){if(c
i.args));directiveSanitizer(i),b=Qa(b,[...i])}else b=p.args;if(b){let p=detectType(i,c);["config"].forEach((i=>{void 0!==b[i]&&("flowchart-v2"===p&&(p="flowchart"),b[p]=b[i],delete b[i])}))}return b},detectDirective:detectDirective,isSubstringInArray:function(i,c){for(const[p,b]of c.entries())if(b.match(i))return p;return-1},interpolateToCurve:interpolateToCurve,calcLabelPosition:function calcLabelPosition(i){return 1===i.length?i[0]:function traverseEdge(i){let c,p=0;i.forEach((i=>{p+=distance(i,c),c=i}));let b,_=p/2;return c=void 0,i.forEach((i=>{if(c&&!b){const p=distance(i,c);if(p<_)_-=p;else{const k=_/p;k<=0&&(b=c),k>=1&&(b={x:i.x,y:i.y}),k>0&&k<1&&(b={x:(1-k)*c.x+k*i.x,y:(1-k)*c.y+k*i.y})}}c=i})),b}(i)},calcCardinalityPosition:(i,c,p)=>{let b;k.info(`our points ${JSON.stringify(c)}`),c[0]!==p&&(c=c.reverse());let _,w=25;b=void 0,c.forEach((i=>{if(b&&!_){const c=distance(i,b);if(c=1&&(_={x:i.x,y:i.y}),p>0&&p<1&&(_={x:(1-p)*b.x+p*i.x,y:(1-p)*b.y+p*i.y})}}b=i}));const T=i?10:5,S=Math.atan2(c[0].y-_.y,c[0].x-_.x),O={x:0,y:0};return O.x=Math.sin(S)*T+(c[0].x+_.x)/2,O.y=-Math.cos(S)*T+(c[0].y+_.y)/2,O},calcTerminalLabelPosition:function calcTerminalLabelPosition(i,c,p){let b,_=JSON.parse(JSON.stringify(p));k.info("our points",_),"start_left"!==c&&"start_right"!==c&&(_=_.reverse()),_.forEach((i=>{b=i}));let w,T=25+i;b=void 0,_.forEach((i=>{if(b&&!w){const c=distance(i,b);if(c=1&&(w={x:i.x,y:i.y}),p>0&&p<1&&(w={x:(1-p)*b.x+p*i.x,y:(1-p)*b.y+p*i.y})}}b=i}));const S=10+.5*i,O=Math.atan2(_[0].y-w.y,_[0].x-w.x),N={x:0,y:0};return N.x=Math.sin(O)*S+(_[0].x+w.x)/2,N.y=-Math.cos(O)*S+(_[0].y+w.y)/2,"start_left"===c&&(N.x=Math.sin(O+Math.PI)*S+(_[0].x+w.x)/2,N.y=-Math.cos(O+Math.PI)*S+(_[0].y+w.y)/2),"end_right"===c&&(N.x=Math.sin(O-Math.PI)*S+(_[0].x+w.x)/2-5,N.y=-Math.cos(O-Math.PI)*S+(_[0].y+w.y)/2-5),"end_left"===c&&(N.x=Math.sin(O)*S+(_[0].x+w.x)/2-5,N.y=-Math.cos(O)*S+(_[0].y+w.y)/2-5),N},formatUrl:function formatUrl(i,c){const p=i.trim();if(p)return"loose"!==c.securityLevel?T(p):p},getStylesFromArray:getStylesFromArray,generateId:generateId$1,random:random,runFunc:(i,...c)=>{const p=i.split("."),b=p.length-1,_=p[b];let k=window;for(let i=0;i{if(!b)return;const _=i.node().getBBox();i.append("text").text(b).attr("x",_.x+_.width/2).attr("y",-p).attr("class",c)}};var Ms="comm",Is="rule",Bs="decl",Fs=Math.abs,$s=String.fromCharCode;function trim(i){return i.trim()}function replace(i,c,p){return i.replace(c,p)}function indexof(i,c){return i.indexOf(c)}function charat(i,c){return 0|i.charCodeAt(c)}function substr(i,c,p){return i.slice(c,p)}function strlen(i){return i.length}function sizeof(i){return i.length}function append(i,c){return c.push(i),i}var Rs=1,Ps=1,Ys=0,js=0,zs=0,Ws="";function node(i,c,p,b,_,k,w){return{value:i,root:c,parent:p,type:b,props:_,children:k,line:Rs,column:Ps,length:w,return:""}}function next(){return zs=js2||token(zs)>3?"":" "}function escaping(i,c){for(;--c&&next()&&!(zs<48||zs>102||zs>57&&zs<65||zs>70&&zs<97););return slice(i,caret()+(c<6&&32==peek()&&32==next()))}function delimiter(i){for(;next();)switch(zs){case i:return js;case 34:case 39:34!==i&&39!==i&&delimiter(zs);break;case 40:41===i&&delimiter(i);break;case 92:next()}return js}function commenter(i,c){for(;next()&&i+zs!==57&&(i+zs!==84||47!==peek()););return"/*"+slice(c,js-1)+"*"+$s(47===i?i:next())}function identifier(i){for(;!token(peek());)next();return slice(i,js)}function compile(i){return function dealloc(i){return Ws="",i}(parse$2("",null,null,null,[""],i=function alloc(i){return Rs=Ps=1,Ys=strlen(Ws=i),js=0,[]}(i),0,[0],i))}function parse$2(i,c,p,b,_,k,w,T,S){for(var O=0,N=0,R=w,Y=0,j=0,z=0,U=1,H=1,Z=1,K=0,J="",tt=_,et=k,at=b,ot=J;H;)switch(z=K,K=next()){case 40:if(108!=z&&58==charat(ot,R-1)){-1!=indexof(ot+=replace(delimit(K),"&","&\f"),"&\f")&&(Z=-1);break}case 34:case 39:case 91:ot+=delimit(K);break;case 9:case 10:case 13:case 32:ot+=whitespace(z);break;case 92:ot+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),c,p),S);break;default:ot+="/"}break;case 123*U:T[O++]=strlen(ot)*Z;case 125*U:case 59:case 0:switch(K){case 0:case 125:H=0;case 59+N:j>0&&strlen(ot)-R&&append(j>32?declaration(ot+";",b,p,R-1):declaration(replace(ot," ","")+";",b,p,R-2),S);break;case 59:ot+=";";default:if(append(at=ruleset(ot,c,p,O,N,_,T,J,tt=[],et=[],R),k),123===K)if(0===N)parse$2(ot,c,at,at,tt,k,R,T,et);else switch(Y){case 100:case 109:case 115:parse$2(i,at,at,b&&append(ruleset(i,at,at,0,0,_,T,J,_,tt=[],R),et),_,et,R,T,b?tt:et);break;default:parse$2(ot,at,at,at,[""],et,0,T,et)}}O=N=j=0,U=Z=1,J=ot="",R=w;break;case 58:R=1+strlen(ot),j=z;default:if(U<1)if(123==K)--U;else if(125==K&&0==U++&&125==(zs=js>0?charat(Ws,--js):0,Ps--,10===zs&&(Ps=1,Rs--),zs))continue;switch(ot+=$s(K),K*U){case 38:Z=N>0?1:(ot+="\f",-1);break;case 44:T[O++]=(strlen(ot)-1)*Z,Z=1;break;case 64:45===peek()&&(ot+=delimit(next())),Y=peek(),N=R=strlen(J=ot+=identifier(caret())),K++;break;case 45:45===z&&2==strlen(ot)&&(U=0)}}return k}function ruleset(i,c,p,b,_,k,w,T,S,O,N){for(var R=_-1,Y=0===_?k:[""],j=sizeof(Y),z=0,U=0,H=0;z0?Y[Z]+" "+K:replace(K,/&\f/g,Y[Z])))&&(S[H++]=J);return node(i,c,p,0===_?Is:T,S,O,N)}function comment(i,c,p){return node(i,c,p,Ms,$s(function char(){return zs}()),substr(i,2,-2),0)}function declaration(i,c,p,b){return node(i,c,p,Bs,substr(i,0,b),substr(i,b+1,-1),b)}function serialize(i,c){for(var p="",b=sizeof(i),_=0;_{let p=Qa({},i),b={};for(const i of c)sanitize(i),b=Qa(b,i);if(p=Qa(p,b),b.theme&&b.theme in ia){const i=Qa({},qs),c=Qa(i.themeVariables||{},b.themeVariables);p.theme&&p.theme in ia&&(p.themeVariables=ia[p.theme].getThemeVariables(c))}return Xs=p,checkConfig(Xs),Xs},getSiteConfig=()=>Qa({},Vs),setConfig=i=>(checkConfig(i),Qa(Xs,i),getConfig$1()),getConfig$1=()=>Qa({},Xs),sanitize=i=>{var c;["secure",...null!=(c=Vs.secure)?c:[]].forEach((c=>{void 0!==i[c]&&(k.debug(`Denied attempt to modify a secure key ${c}`,i[c]),delete i[c])})),Object.keys(i).forEach((c=>{0===c.indexOf("__")&&delete i[c]})),Object.keys(i).forEach((c=>{"string"==typeof i[c]&&(i[c].includes("<")||i[c].includes(">")||i[c].includes("url(data:"))&&delete i[c],"object"==typeof i[c]&&sanitize(i[c])}))},addDirective=i=>{i.fontFamily&&(i.themeVariables&&i.themeVariables.fontFamily||(i.themeVariables={fontFamily:i.fontFamily})),Gs.push(i),updateCurrentConfig(Vs,Gs)},reset=(i=Vs)=>{Gs=[],updateCurrentConfig(i,Gs)};var Zs=(i=>(i.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",i))(Zs||{});const Ks={},checkConfig=i=>{var c;i&&((i.lazyLoadedDiagrams||i.loadExternalDiagramsAtStartup)&&(Ks[c="LAZY_LOAD_DEPRECATED"]||(k.warn(Zs[c]),Ks[c]=!0)))},configureSvgSize=function(i,c,p,b){const _=function(i,c,p){let b=new Map;return p?(b.set("width","100%"),b.set("style",`max-width: ${c}px;`)):(b.set("height",i),b.set("width",c)),b}(c,p,b);!function(i,c){for(let p of c)i.attr(p[0],p[1])}(i,_)},setupGraphViewbox$1=function(i,c,p,b){const _=c.node().getBBox(),w=_.width,T=_.height;k.info(`SVG bounds: ${w}x${T}`,_);let S=0,O=0;k.info(`Graph bounds: ${S}x${O}`,i),S=w+2*p,O=T+2*p,k.info(`Calculated bounds: ${S}x${O}`),configureSvgSize(c,O,S,b);const N=`${_.x-p} ${_.y-p} ${_.width+2*p} ${_.height+2*p}`;c.attr("viewBox",N)},classStyles=i=>`g.classGroup text {\n fill: ${i.nodeBorder};\n fill: ${i.classText};\n stroke: none;\n font-family: ${i.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${i.classText};\n}\n.edgeLabel .label rect {\n fill: ${i.mainBkg};\n}\n.label text {\n fill: ${i.classText};\n}\n.edgeLabel .label span {\n background: ${i.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${i.mainBkg};\n stroke: ${i.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${i.nodeBorder};\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${i.mainBkg};\n stroke: ${i.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${i.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${i.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${i.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${i.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${i.lineColor} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${i.lineColor} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${i.lineColor} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${i.lineColor} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ${i.mainBkg} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ${i.mainBkg} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ${i.mainBkg} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ${i.mainBkg} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${i.mainBkg} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${i.mainBkg} !important;\n stroke: ${i.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${i.textColor};\n}\n`,erStyles=i=>`\n .entityBox {\n fill: ${i.mainBkg};\n stroke: ${i.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${i.attributeBackgroundColorOdd};\n stroke: ${i.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${i.attributeBackgroundColorEven};\n stroke: ${i.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${i.tertiaryColor};\n opacity: 0.7;\n background-color: ${i.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${i.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${i.textColor};\n } \n`,errorStyles=()=>"",flowStyles=i=>`.label {\n font-family: ${i.fontFamily};\n color: ${i.nodeTextColor||i.textColor};\n }\n .cluster-label text {\n fill: ${i.titleColor};\n }\n .cluster-label span {\n color: ${i.titleColor};\n }\n\n .label text,span {\n fill: ${i.nodeTextColor||i.textColor};\n color: ${i.nodeTextColor||i.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${i.mainBkg};\n stroke: ${i.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${i.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${i.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${i.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${i.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${i.edgeLabelBackground};\n fill: ${i.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${i.clusterBkg};\n stroke: ${i.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${i.titleColor};\n }\n\n .cluster span {\n color: ${i.titleColor};\n }\n /* .cluster div {\n color: ${i.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${i.fontFamily};\n font-size: 12px;\n background: ${i.tertiaryColor};\n border: 1px solid ${i.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${i.textColor};\n }\n`,ganttStyles=i=>`\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: ${i.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${i.sectionBkgColor};\n }\n\n .section2 {\n fill: ${i.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${i.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${i.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${i.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${i.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${i.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ${i.ganttFontSize};\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${i.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ${i.fontFamily};\n fill: ${i.textColor};\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${i.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ${i.ganttFontSize};\n // }\n\n .taskTextOutsideRight {\n fill: ${i.taskTextDarkColor};\n text-anchor: start;\n // font-size: ${i.ganttFontSize};\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ${i.taskTextDarkColor};\n text-anchor: end;\n // font-size: ${i.ganttFontSize};\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ${i.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${i.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${i.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${i.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${i.taskBkgColor};\n stroke: ${i.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${i.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${i.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${i.activeTaskBkgColor};\n stroke: ${i.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${i.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${i.doneTaskBorderColor};\n fill: ${i.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${i.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${i.critBorderColor};\n fill: ${i.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${i.critBorderColor};\n fill: ${i.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${i.critBorderColor};\n fill: ${i.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${i.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${i.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${i.textColor} ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n`,infoStyles=()=>"",pieStyles=i=>`\n .pieCircle{\n stroke: ${i.pieStrokeColor};\n stroke-width : ${i.pieStrokeWidth};\n opacity : ${i.pieOpacity};\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${i.pieTitleTextSize};\n fill: ${i.pieTitleTextColor};\n font-family: ${i.fontFamily};\n }\n .slice {\n font-family: ${i.fontFamily};\n fill: ${i.pieSectionTextColor};\n font-size:${i.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${i.pieLegendTextColor};\n font-family: ${i.fontFamily};\n font-size: ${i.pieLegendTextSize};\n }\n`,requirementStyles=i=>`\n\n marker {\n fill: ${i.relationColor};\n stroke: ${i.relationColor};\n }\n\n marker.cross {\n stroke: ${i.lineColor};\n }\n\n svg {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n }\n\n .reqBox {\n fill: ${i.requirementBackground};\n fill-opacity: 100%;\n stroke: ${i.requirementBorderColor};\n stroke-width: ${i.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${i.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${i.relationLabelBackground};\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ${i.requirementBorderColor};\n stroke-width: ${i.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${i.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${i.relationLabelColor};\n }\n\n`,sequenceStyles=i=>`.actor {\n stroke: ${i.actorBorder};\n fill: ${i.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${i.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${i.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${i.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${i.signalColor};\n }\n\n #arrowhead path {\n fill: ${i.signalColor};\n stroke: ${i.signalColor};\n }\n\n .sequenceNumber {\n fill: ${i.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${i.signalColor};\n }\n\n #crosshead path {\n fill: ${i.signalColor};\n stroke: ${i.signalColor};\n }\n\n .messageText {\n fill: ${i.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${i.labelBoxBorderColor};\n fill: ${i.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${i.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${i.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${i.labelBoxBorderColor};\n fill: ${i.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${i.noteBorderColor};\n fill: ${i.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${i.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${i.activationBkgColor};\n stroke: ${i.activationBorderColor};\n }\n\n .activation1 {\n fill: ${i.activationBkgColor};\n stroke: ${i.activationBorderColor};\n }\n\n .activation2 {\n fill: ${i.activationBkgColor};\n stroke: ${i.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${i.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${i.actorBorder};\n fill: ${i.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${i.actorBorder};\n fill: ${i.actorBkg};\n stroke-width: 2px;\n }\n`,stateStyles=i=>`\ndefs #statediagram-barbEnd {\n fill: ${i.transitionColor};\n stroke: ${i.transitionColor};\n }\ng.stateGroup text {\n fill: ${i.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${i.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${i.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${i.mainBkg};\n stroke: ${i.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${i.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${i.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${i.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${i.noteBorderColor};\n fill: ${i.noteBkgColor};\n\n text {\n fill: ${i.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${i.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${i.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${i.transitionLabelColor||i.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${i.transitionLabelColor||i.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${i.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${i.specialStateColor};\n stroke: ${i.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${i.specialStateColor};\n stroke: ${i.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${i.innerEndBackground};\n stroke: ${i.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${i.compositeBackground||i.background};\n // stroke: ${i.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${i.stateBkg||i.mainBkg};\n stroke: ${i.stateBorder||i.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${i.mainBkg};\n stroke: ${i.stateBorder||i.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${i.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${i.compositeTitleBackground};\n stroke: ${i.stateBorder||i.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${i.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${i.stateBorder||i.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${i.compositeBackground||i.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${i.altBackground?i.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${i.altBackground?i.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${i.noteBkgColor};\n stroke: ${i.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${i.noteBkgColor};\n stroke: ${i.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${i.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${i.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${i.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${i.lineColor};\n stroke: ${i.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${i.textColor};\n}\n`,journeyStyles=i=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${i.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${i.textColor}\n }\n\n .legend {\n fill: ${i.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${i.textColor}\n }\n\n .face {\n ${i.faceColor?`fill: ${i.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${i.mainBkg};\n stroke: ${i.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${i.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${i.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${i.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${i.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${i.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${i.tertiaryColor};\n border: 1px solid ${i.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${i.fillType0?`fill: ${i.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${i.fillType0?`fill: ${i.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${i.fillType0?`fill: ${i.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${i.fillType0?`fill: ${i.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${i.fillType0?`fill: ${i.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${i.fillType0?`fill: ${i.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${i.fillType0?`fill: ${i.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${i.fillType0?`fill: ${i.fillType7}`:""};\n }\n\n .actor-0 {\n ${i.actor0?`fill: ${i.actor0}`:""};\n }\n .actor-1 {\n ${i.actor1?`fill: ${i.actor1}`:""};\n }\n .actor-2 {\n ${i.actor2?`fill: ${i.actor2}`:""};\n }\n .actor-3 {\n ${i.actor3?`fill: ${i.actor3}`:""};\n }\n .actor-4 {\n ${i.actor4?`fill: ${i.actor4}`:""};\n }\n .actor-5 {\n ${i.actor5?`fill: ${i.actor5}`:""};\n }\n`,c4Styles=i=>`.person {\n stroke: ${i.personBorder};\n fill: ${i.personBkg};\n }\n`,Qs={flowchart:flowStyles,"flowchart-v2":flowStyles,sequence:sequenceStyles,gantt:ganttStyles,classDiagram:classStyles,"classDiagram-v2":classStyles,class:classStyles,stateDiagram:stateStyles,state:stateStyles,info:infoStyles,pie:pieStyles,er:erStyles,error:errorStyles,journey:journeyStyles,requirement:requirementStyles,c4:c4Styles},getStyles$2=(i,c,p)=>{let b="";return i in Qs&&Qs[i]?b=Qs[i](p):k.warn(`No theme found for ${i}`),` & {\n font-family: ${p.fontFamily};\n font-size: ${p.fontSize};\n fill: ${p.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${p.errorBkgColor};\n }\n & .error-text {\n fill: ${p.errorTextColor};\n stroke: ${p.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${p.lineColor};\n stroke: ${p.lineColor};\n }\n & .marker.cross {\n stroke: ${p.lineColor};\n }\n\n & svg {\n font-family: ${p.fontFamily};\n font-size: ${p.fontSize};\n }\n\n ${b}\n\n ${c}\n`},Js=k,to=setLogLevel$1,eo=getConfig$1,sanitizeText$4=i=>sanitizeText$5(i,eo()),no=setupGraphViewbox$1,ro={},registerDiagram=(i,c,p)=>{if(ro[i])throw new Error(`Diagram ${i} already registered.`);var b,_;ro[i]=c,p&&addDetector(i,p),b=i,_=c.styles,Qs[b]=_,c.injectUtils&&c.injectUtils(Js,to,eo,sanitizeText$4,no)},getDiagram=i=>{if(i in ro)return ro[i];throw new Error(`Diagram ${i} not found.`)};var io=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,4],c=[1,7],p=[1,5],b=[1,9],_=[1,6],k=[2,6],w=[1,16],T=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],S=[8,14,20,22,24,25,27,29,32,37,40],O=[8,13,14,20,22,24,25,27,29,32,37,40],N=[1,26],R=[6,8,14,50,55],Y=[8,14,55],j=[1,53],z=[1,52],U=[8,14,30,33,35,38,55],H=[1,67],Z=[1,68],K=[1,69],J=[8,14,33,35,42,55],tt={trace:function trace(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 3:return k[T];case 4:return k[T-1];case 5:return b.setDirection(k[T-3]),k[T-1];case 7:b.setOptions(k[T-1]),this.$=k[T];break;case 8:k[T-1]+=k[T],this.$=k[T-1];break;case 10:this.$=[];break;case 11:k[T-1].push(k[T]),this.$=k[T-1];break;case 12:this.$=k[T-1];break;case 17:this.$=k[T].trim(),b.setAccTitle(this.$);break;case 18:case 19:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 20:b.addSection(k[T].substr(8)),this.$=k[T].substr(8);break;case 22:b.checkout(k[T]);break;case 23:b.branch(k[T]);break;case 24:b.branch(k[T-2],k[T]);break;case 25:b.cherryPick(k[T],"",void 0);break;case 26:b.cherryPick(k[T-2],"",k[T]);break;case 27:case 29:b.cherryPick(k[T-2],"","");break;case 28:b.cherryPick(k[T],"",k[T-2]);break;case 30:b.merge(k[T],"","","");break;case 31:b.merge(k[T-2],k[T],"","");break;case 32:b.merge(k[T-2],"",k[T],"");break;case 33:b.merge(k[T-2],"","",k[T]);break;case 34:b.merge(k[T-4],k[T],"",k[T-2]);break;case 35:b.merge(k[T-4],"",k[T],k[T-2]);break;case 36:b.merge(k[T-4],"",k[T-2],k[T]);break;case 37:b.merge(k[T-4],k[T-2],k[T],"");break;case 38:b.merge(k[T-4],k[T-2],"",k[T]);break;case 39:b.merge(k[T-4],k[T],k[T-2],"");break;case 40:b.merge(k[T-6],k[T-4],k[T-2],k[T]);break;case 41:b.merge(k[T-6],k[T],k[T-4],k[T-2]);break;case 42:b.merge(k[T-6],k[T-4],k[T],k[T-2]);break;case 43:b.merge(k[T-6],k[T-2],k[T-4],k[T]);break;case 44:b.merge(k[T-6],k[T],k[T-2],k[T-4]);break;case 45:b.merge(k[T-6],k[T-2],k[T],k[T-4]);break;case 46:b.commit(k[T]);break;case 47:b.commit("","",b.commitType.NORMAL,k[T]);break;case 48:b.commit("","",k[T],"");break;case 49:b.commit("","",k[T],k[T-2]);break;case 50:b.commit("","",k[T-2],k[T]);break;case 51:b.commit("",k[T],b.commitType.NORMAL,"");break;case 52:b.commit("",k[T-2],b.commitType.NORMAL,k[T]);break;case 53:b.commit("",k[T],b.commitType.NORMAL,k[T-2]);break;case 54:b.commit("",k[T-2],k[T],"");break;case 55:b.commit("",k[T],k[T-2],"");break;case 56:b.commit("",k[T-4],k[T-2],k[T]);break;case 57:b.commit("",k[T-4],k[T],k[T-2]);break;case 58:b.commit("",k[T-2],k[T-4],k[T]);break;case 59:b.commit("",k[T],k[T-4],k[T-2]);break;case 60:b.commit("",k[T],k[T-2],k[T-4]);break;case 61:b.commit("",k[T-2],k[T],k[T-4]);break;case 62:b.commit(k[T],"",b.commitType.NORMAL,"");break;case 63:b.commit(k[T],"",b.commitType.NORMAL,k[T-2]);break;case 64:b.commit(k[T-2],"",b.commitType.NORMAL,k[T]);break;case 65:b.commit(k[T-2],"",k[T],"");break;case 66:b.commit(k[T],"",k[T-2],"");break;case 67:b.commit(k[T],k[T-2],b.commitType.NORMAL,"");break;case 68:b.commit(k[T-2],k[T],b.commitType.NORMAL,"");break;case 69:b.commit(k[T-4],"",k[T-2],k[T]);break;case 70:b.commit(k[T-4],"",k[T],k[T-2]);break;case 71:b.commit(k[T-2],"",k[T-4],k[T]);break;case 72:b.commit(k[T],"",k[T-4],k[T-2]);break;case 73:b.commit(k[T],"",k[T-2],k[T-4]);break;case 74:b.commit(k[T-2],"",k[T],k[T-4]);break;case 75:b.commit(k[T-4],k[T],k[T-2],"");break;case 76:b.commit(k[T-4],k[T-2],k[T],"");break;case 77:b.commit(k[T-2],k[T],k[T-4],"");break;case 78:b.commit(k[T],k[T-2],k[T-4],"");break;case 79:b.commit(k[T],k[T-4],k[T-2],"");break;case 80:b.commit(k[T-2],k[T-4],k[T],"");break;case 81:b.commit(k[T-4],k[T],b.commitType.NORMAL,k[T-2]);break;case 82:b.commit(k[T-4],k[T-2],b.commitType.NORMAL,k[T]);break;case 83:b.commit(k[T-2],k[T],b.commitType.NORMAL,k[T-4]);break;case 84:b.commit(k[T],k[T-2],b.commitType.NORMAL,k[T-4]);break;case 85:b.commit(k[T],k[T-4],b.commitType.NORMAL,k[T-2]);break;case 86:b.commit(k[T-2],k[T-4],b.commitType.NORMAL,k[T]);break;case 87:b.commit(k[T-6],k[T-4],k[T-2],k[T]);break;case 88:b.commit(k[T-6],k[T-4],k[T],k[T-2]);break;case 89:b.commit(k[T-6],k[T-2],k[T-4],k[T]);break;case 90:b.commit(k[T-6],k[T],k[T-4],k[T-2]);break;case 91:b.commit(k[T-6],k[T-2],k[T],k[T-4]);break;case 92:b.commit(k[T-6],k[T],k[T-2],k[T-4]);break;case 93:b.commit(k[T-4],k[T-6],k[T-2],k[T]);break;case 94:b.commit(k[T-4],k[T-6],k[T],k[T-2]);break;case 95:b.commit(k[T-2],k[T-6],k[T-4],k[T]);break;case 96:b.commit(k[T],k[T-6],k[T-4],k[T-2]);break;case 97:b.commit(k[T-2],k[T-6],k[T],k[T-4]);break;case 98:b.commit(k[T],k[T-6],k[T-2],k[T-4]);break;case 99:b.commit(k[T],k[T-4],k[T-2],k[T-6]);break;case 100:b.commit(k[T-2],k[T-4],k[T],k[T-6]);break;case 101:b.commit(k[T],k[T-2],k[T-4],k[T-6]);break;case 102:b.commit(k[T-2],k[T],k[T-4],k[T-6]);break;case 103:b.commit(k[T-4],k[T-2],k[T],k[T-6]);break;case 104:b.commit(k[T-4],k[T],k[T-2],k[T-6]);break;case 105:b.commit(k[T-2],k[T-4],k[T-6],k[T]);break;case 106:b.commit(k[T],k[T-4],k[T-6],k[T-2]);break;case 107:b.commit(k[T-2],k[T],k[T-6],k[T-4]);break;case 108:b.commit(k[T],k[T-2],k[T-6],k[T-4]);break;case 109:b.commit(k[T-4],k[T-2],k[T-6],k[T]);break;case 110:b.commit(k[T-4],k[T],k[T-6],k[T-2]);break;case 111:this.$="";break;case 112:this.$=k[T];break;case 113:this.$=b.commitType.NORMAL;break;case 114:this.$=b.commitType.REVERSE;break;case 115:this.$=b.commitType.HIGHLIGHT;break;case 118:b.parseDirective("%%{","open_directive");break;case 119:b.parseDirective(k[T],"type_directive");break;case 120:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 121:b.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:i,8:c,14:p,46:8,50:b,55:_},{1:[3]},{3:10,4:2,5:3,6:i,8:c,14:p,46:8,50:b,55:_},{3:11,4:2,5:3,6:i,8:c,14:p,46:8,50:b,55:_},{7:12,8:k,9:[1,13],10:[1,14],11:15,14:w},o(T,[2,124]),o(T,[2,125]),o(T,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:k,11:15,14:w},{9:[1,21]},o(S,[2,10],{12:22,13:[1,23]}),o(O,[2,9]),{9:[1,25],48:24,53:N},o([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:k,11:15,14:w},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},o(O,[2,8]),o(R,[2,116]),{49:45,52:[1,46]},o(R,[2,121]),{1:[2,4]},{8:[1,47]},o(S,[2,11]),{4:48,8:c,14:p,55:_},o(S,[2,13]),o(Y,[2,14]),o(Y,[2,15]),o(Y,[2,16]),{21:[1,49]},{23:[1,50]},o(Y,[2,19]),o(Y,[2,20]),o(Y,[2,21]),{28:51,34:j,54:z},o(Y,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:j,54:z},{33:[1,61],35:[1,62]},{28:63,34:j,54:z},{48:64,53:N},{53:[2,120]},{1:[2,5]},o(S,[2,12]),o(Y,[2,17]),o(Y,[2,18]),o(Y,[2,22]),o(U,[2,122]),o(U,[2,123]),o(Y,[2,46]),{34:[1,65]},{39:66,43:H,44:Z,45:K},{34:[1,70]},{34:[1,71]},o(Y,[2,112]),o(Y,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},o(Y,[2,23],{30:[1,78]}),o(R,[2,117]),o(Y,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),o(Y,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),o(J,[2,113]),o(J,[2,114]),o(J,[2,115]),o(Y,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),o(Y,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:H,44:Z,45:K},{34:[1,93]},o(Y,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:H,44:Z,45:K},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:H,44:Z,45:K},{34:[1,106]},{34:[1,107]},{39:108,43:H,44:Z,45:K},{34:[1,109]},o(Y,[2,31],{35:[1,111],38:[1,110]}),o(Y,[2,32],{33:[1,113],35:[1,112]}),o(Y,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},o(Y,[2,24]),o(Y,[2,49],{33:[1,120],42:[1,121]}),o(Y,[2,53],{38:[1,122],42:[1,123]}),o(Y,[2,63],{33:[1,125],38:[1,124]}),o(Y,[2,50],{33:[1,126],42:[1,127]}),o(Y,[2,55],{35:[1,128],42:[1,129]}),o(Y,[2,66],{33:[1,131],35:[1,130]}),o(Y,[2,52],{38:[1,132],42:[1,133]}),o(Y,[2,54],{35:[1,134],42:[1,135]}),o(Y,[2,67],{35:[1,137],38:[1,136]}),o(Y,[2,64],{33:[1,139],38:[1,138]}),o(Y,[2,65],{33:[1,141],35:[1,140]}),o(Y,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:H,44:Z,45:K},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:H,44:Z,45:K},o(Y,[2,26]),o(Y,[2,27]),o(Y,[2,28]),o(Y,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:H,44:Z,45:K},{34:[1,153]},{39:154,43:H,44:Z,45:K},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:H,44:Z,45:K},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:H,44:Z,45:K},{34:[1,167]},{39:168,43:H,44:Z,45:K},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:H,44:Z,45:K},{34:[1,173]},o(Y,[2,37],{35:[1,174]}),o(Y,[2,38],{38:[1,175]}),o(Y,[2,36],{33:[1,176]}),o(Y,[2,39],{35:[1,177]}),o(Y,[2,34],{38:[1,178]}),o(Y,[2,35],{33:[1,179]}),o(Y,[2,60],{42:[1,180]}),o(Y,[2,73],{33:[1,181]}),o(Y,[2,61],{42:[1,182]}),o(Y,[2,84],{38:[1,183]}),o(Y,[2,74],{33:[1,184]}),o(Y,[2,83],{38:[1,185]}),o(Y,[2,59],{42:[1,186]}),o(Y,[2,72],{33:[1,187]}),o(Y,[2,58],{42:[1,188]}),o(Y,[2,78],{35:[1,189]}),o(Y,[2,71],{33:[1,190]}),o(Y,[2,77],{35:[1,191]}),o(Y,[2,57],{42:[1,192]}),o(Y,[2,85],{38:[1,193]}),o(Y,[2,56],{42:[1,194]}),o(Y,[2,79],{35:[1,195]}),o(Y,[2,80],{35:[1,196]}),o(Y,[2,86],{38:[1,197]}),o(Y,[2,70],{33:[1,198]}),o(Y,[2,81],{38:[1,199]}),o(Y,[2,69],{33:[1,200]}),o(Y,[2,75],{35:[1,201]}),o(Y,[2,76],{35:[1,202]}),o(Y,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:H,44:Z,45:K},{34:[1,206]},{34:[1,207]},{39:208,43:H,44:Z,45:K},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:H,44:Z,45:K},{34:[1,214]},{39:215,43:H,44:Z,45:K},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:H,44:Z,45:K},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:H,44:Z,45:K},{34:[1,228]},{39:229,43:H,44:Z,45:K},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:H,44:Z,45:K},o(Y,[2,40]),o(Y,[2,42]),o(Y,[2,41]),o(Y,[2,43]),o(Y,[2,45]),o(Y,[2,44]),o(Y,[2,101]),o(Y,[2,102]),o(Y,[2,99]),o(Y,[2,100]),o(Y,[2,104]),o(Y,[2,103]),o(Y,[2,108]),o(Y,[2,107]),o(Y,[2,106]),o(Y,[2,105]),o(Y,[2,110]),o(Y,[2,109]),o(Y,[2,98]),o(Y,[2,97]),o(Y,[2,96]),o(Y,[2,95]),o(Y,[2,93]),o(Y,[2,94]),o(Y,[2,92]),o(Y,[2,91]),o(Y,[2,90]),o(Y,[2,89]),o(Y,[2,87]),o(Y,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},et={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 38:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};function Parser(){this.yy={}}return tt.lexer=et,Parser.prototype=tt,tt.Parser=Parser,new Parser}();io.parser=io;const ao=io,gitGraphDetector=i=>null!==i.match(/^\s*gitGraph/);let so="",oo="",lo="";const sanitizeText$3=i=>sanitizeText$5(i,getConfig$1()),clear$g=function(){so="",lo="",oo=""},setAccTitle=function(i){so=sanitizeText$3(i).replace(/^\s+/g,"")},getAccTitle=function(){return so||oo},setAccDescription=function(i){lo=sanitizeText$3(i).replace(/\n\s+/g,"\n")},getAccDescription=function(){return lo},setDiagramTitle=function(i){oo=sanitizeText$3(i)},getDiagramTitle=function(){return oo};let co=getConfig$1().gitGraph.mainBranchName,ho=getConfig$1().gitGraph.mainBranchOrder,uo={},po=null,fo={};fo[co]={name:co,order:ho};let go={};go[co]=po;let yo=co,mo="LR",bo=0;function getId(){return random({length:7})}let _o={};const checkout=function(i){if(i=Ri.sanitizeText(i,getConfig$1()),void 0===go[i]){let c=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+i+'")');throw c.hash={text:"checkout "+i,token:"checkout "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+i+'"']},c}{yo=i;const c=go[yo];po=uo[c]}};function upsert(i,c,p){const b=i.indexOf(c);-1===b?i.push(p):i.splice(b,1,p)}function prettyPrintCommitHistory(i){const c=i.reduce(((i,c)=>i.seq>c.seq?i:c),i[0]);let p="";i.forEach((function(i){p+=i===c?"\t*":"\t|"}));const b=[p,c.id,c.seq];for(let i in go)go[i]===c.id&&b.push(i);if(k.debug(b.join(" ")),c.parents&&2==c.parents.length){const p=uo[c.parents[0]];upsert(i,c,p),i.push(uo[c.parents[1]])}else{if(0==c.parents.length)return;{const p=uo[c.parents];upsert(i,c,p)}}prettyPrintCommitHistory(i=function uniqBy(i,c){const p=Object.create(null);return i.reduce(((i,b)=>{const _=c(b);return p[_]||(p[_]=!0,i.push(b)),i}),[])}(i,(i=>i.id)))}const getCommitsArray=function(){const i=Object.keys(uo).map((function(i){return uo[i]}));return i.forEach((function(i){k.debug(i.id)})),i.sort(((i,c)=>i.seq-c.seq)),i},xo={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},vo={parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().gitGraph,setDirection:function(i){mo=i},setOptions:function(i){k.debug("options str",i),i=(i=i&&i.trim())||"{}";try{_o=JSON.parse(i)}catch(i){k.error("error while parsing gitGraph options",i.message)}},getOptions:function(){return _o},commit:function(i,c,p,b){k.debug("Entering commit:",i,c,p,b),c=Ri.sanitizeText(c,getConfig$1()),i=Ri.sanitizeText(i,getConfig$1()),b=Ri.sanitizeText(b,getConfig$1());const _={id:c||bo+"-"+getId(),message:i,seq:bo++,type:p||xo.NORMAL,tag:b||"",parents:null==po?[]:[po.id],branch:yo};po=_,uo[_.id]=_,go[yo]=_.id,k.debug("in pushCommit "+_.id)},branch:function(i,c){if(i=Ri.sanitizeText(i,getConfig$1()),void 0!==go[i]){let c=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+i+'")');throw c.hash={text:"branch "+i,token:"branch "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+i+'"']},c}go[i]=null!=po?po.id:null,fo[i]={name:i,order:c?parseInt(c,10):null},checkout(i),k.debug("in createBranch")},merge:function(i,c,p,b){i=Ri.sanitizeText(i,getConfig$1()),c=Ri.sanitizeText(c,getConfig$1());const _=uo[go[yo]],w=uo[go[i]];if(yo===i){let c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},c}if(void 0===_||!_){let c=new Error('Incorrect usage of "merge". Current branch ('+yo+")has no commits");throw c.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},c}if(void 0===go[i]){let c=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") does not exist");throw c.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+i]},c}if(void 0===w||!w){let c=new Error('Incorrect usage of "merge". Branch to be merged ('+i+") has no commits");throw c.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},c}if(_===w){let c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:"merge "+i,token:"merge "+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},c}if(c&&void 0!==uo[c]){let _=new Error('Incorrect usage of "merge". Commit with id:'+c+" already exists, use different custom Id");throw _.hash={text:"merge "+i+c+p+b,token:"merge "+i+c+p+b,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+i+" "+c+"_UNIQUE "+p+" "+b]},_}const T={id:c||bo+"-"+getId(),message:"merged branch "+i+" into "+yo,seq:bo++,parents:[null==po?null:po.id,go[i]],branch:yo,type:xo.MERGE,customType:p,customId:!!c,tag:b||""};po=T,uo[T.id]=T,go[yo]=T.id,k.debug(go),k.debug("in mergeBranch")},cherryPick:function(i,c,p){if(k.debug("Entering cherryPick:",i,c,p),i=Ri.sanitizeText(i,getConfig$1()),c=Ri.sanitizeText(c,getConfig$1()),p=Ri.sanitizeText(p,getConfig$1()),!i||void 0===uo[i]){let p=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw p.hash={text:"cherryPick "+i+" "+c,token:"cherryPick "+i+" "+c,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},p}let b=uo[i],_=b.branch;if(b.type===xo.MERGE){let p=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw p.hash={text:"cherryPick "+i+" "+c,token:"cherryPick "+i+" "+c,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},p}if(!c||void 0===uo[c]){if(_===yo){let p=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw p.hash={text:"cherryPick "+i+" "+c,token:"cherryPick "+i+" "+c,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},p}const w=uo[go[yo]];if(void 0===w||!w){let p=new Error('Incorrect usage of "cherry-pick". Current branch ('+yo+")has no commits");throw p.hash={text:"cherryPick "+i+" "+c,token:"cherryPick "+i+" "+c,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},p}const T={id:bo+"-"+getId(),message:"cherry-picked "+b+" into "+yo,seq:bo++,parents:[null==po?null:po.id,b.id],branch:yo,type:xo.CHERRY_PICK,tag:null!=p?p:"cherry-pick:"+b.id};po=T,uo[T.id]=T,go[yo]=T.id,k.debug(go),k.debug("in cherryPick")}},checkout:checkout,prettyPrint:function(){k.debug(uo);prettyPrintCommitHistory([getCommitsArray()[0]])},clear:function(){uo={},po=null;let i=getConfig$1().gitGraph.mainBranchName,c=getConfig$1().gitGraph.mainBranchOrder;go={},go[i]=null,fo={},fo[i]={name:i,order:c},yo=i,bo=0,clear$g()},getBranchesAsObjArray:function(){return Object.values(fo).map(((i,c)=>null!==i.order?i:{...i,order:parseFloat(`0.${c}`,10)})).sort(((i,c)=>i.order-c.order)).map((({name:i})=>({name:i})))},getBranches:function(){return go},getCommits:function(){return uo},getCommitsArray:getCommitsArray,getCurrentBranch:function(){return yo},getDirection:function(){return mo},getHead:function(){return po},setAccTitle:setAccTitle,getAccTitle:getAccTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,commitType:xo};let ko={};const wo=0,To=1,Co=2,So=3,Eo=4;let Ao={},Lo={},Do=[],Oo=0;const drawCommits=(i,c,p)=>{const b=eo().gitGraph,_=i.append("g").attr("class","commit-bullets"),k=i.append("g").attr("class","commit-labels");let w=0;Object.keys(c).sort(((i,p)=>c[i].seq-c[p].seq)).forEach((i=>{const T=c[i],S=Ao[T.branch].pos,O=w+10;if(p){let i,c=void 0!==T.customType&&""!==T.customType?T.customType:T.type;switch(c){case wo:i="commit-normal";break;case To:i="commit-reverse";break;case Co:i="commit-highlight";break;case So:i="commit-merge";break;case Eo:i="commit-cherry-pick";break;default:i="commit-normal"}if(c===Co){const c=_.append("rect");c.attr("x",O-10),c.attr("y",S-10),c.attr("height",20),c.attr("width",20),c.attr("class",`commit ${T.id} commit-highlight${Ao[T.branch].index%8} ${i}-outer`),_.append("rect").attr("x",O-6).attr("y",S-6).attr("height",12).attr("width",12).attr("class",`commit ${T.id} commit${Ao[T.branch].index%8} ${i}-inner`)}else if(c===Eo)_.append("circle").attr("cx",O).attr("cy",S).attr("r",10).attr("class",`commit ${T.id} ${i}`),_.append("circle").attr("cx",O-3).attr("cy",S+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${T.id} ${i}`),_.append("circle").attr("cx",O+3).attr("cy",S+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${T.id} ${i}`),_.append("line").attr("x1",O+3).attr("y1",S+1).attr("x2",O).attr("y2",S-5).attr("stroke","#fff").attr("class",`commit ${T.id} ${i}`),_.append("line").attr("x1",O-3).attr("y1",S+1).attr("x2",O).attr("y2",S-5).attr("stroke","#fff").attr("class",`commit ${T.id} ${i}`);else{const p=_.append("circle");if(p.attr("cx",O),p.attr("cy",S),p.attr("r",T.type===So?9:10),p.attr("class",`commit ${T.id} commit${Ao[T.branch].index%8}`),c===So){const c=_.append("circle");c.attr("cx",O),c.attr("cy",S),c.attr("r",6),c.attr("class",`commit ${i} ${T.id} commit${Ao[T.branch].index%8}`)}if(c===To){_.append("path").attr("d",`M ${O-5},${S-5}L${O+5},${S+5}M${O-5},${S+5}L${O+5},${S-5}`).attr("class",`commit ${i} ${T.id} commit${Ao[T.branch].index%8}`)}}}if(Lo[T.id]={x:w+10,y:S},p){const i=4,c=2;if(T.type!==Eo&&(T.customId&&T.type===So||T.type!==So)&&b.showCommitLabel){const i=k.append("g"),p=i.insert("rect").attr("class","commit-label-bkg"),_=i.append("text").attr("x",w).attr("y",S+25).attr("class","commit-label").text(T.id);let O=_.node().getBBox();if(p.attr("x",w+10-O.width/2-c).attr("y",S+13.5).attr("width",O.width+2*c).attr("height",O.height+2*c),_.attr("x",w+10-O.width/2),b.rotateCommitLabel){let c=-7.5-(O.width+10)/25*9.5,p=10+O.width/25*8.5;i.attr("transform","translate("+c+", "+p+") rotate("+"-45, "+w+", "+S+")")}}if(T.tag){const p=k.insert("polygon"),b=k.append("circle"),_=k.append("text").attr("y",S-16).attr("class","tag-label").text(T.tag);let O=_.node().getBBox();_.attr("x",w+10-O.width/2);const N=O.height/2,R=S-19.2;p.attr("class","tag-label-bkg").attr("points",`\n ${w-O.width/2-i/2},${R+c}\n ${w-O.width/2-i/2},${R-c}\n ${w+10-O.width/2-i},${R-N-c}\n ${w+10+O.width/2+i},${R-N-c}\n ${w+10+O.width/2+i},${R+N+c}\n ${w+10-O.width/2-i},${R+N+c}`),b.attr("cx",w-O.width/2+i/2).attr("cy",R).attr("r",1.5).attr("class","tag-hole")}}w+=50,w>Oo&&(Oo=w)}))},findLane=(i,c,p=0)=>{const b=i+Math.abs(i-c)/2;if(p>5)return b;if(Do.every((i=>Math.abs(i-b)>=10)))return Do.push(b),b;const _=Math.abs(i-c);return findLane(i,c-_/5,p+1)},drawArrow=(i,c,p,b)=>{const _=Lo[c.id],k=Lo[p.id],w=((i,c,p)=>Object.keys(p).filter((b=>p[b].branch===c.branch&&p[b].seq>i.seq&&p[b].seq0)(c,p,b);let T,S="",O="",N=0,R=0,Y=Ao[p.branch].index;if(w){S="A 10 10, 0, 0, 0,",O="A 10 10, 0, 0, 1,",N=10,R=10,Y=Ao[p.branch].index;const i=_.yk.y&&(S="A 20 20, 0, 0, 0,",N=20,R=20,Y=Ao[c.branch].index,T=`M ${_.x} ${_.y} L ${k.x-N} ${_.y} ${S} ${k.x} ${_.y-R} L ${k.x} ${k.y}`),_.y===k.y&&(Y=Ao[c.branch].index,T=`M ${_.x} ${_.y} L ${_.x} ${k.y-N} ${S} ${_.x+R} ${k.y} L ${k.x} ${k.y}`);i.append("path").attr("d",T).attr("class","arrow arrow"+Y%8)},drawBranches=(i,c)=>{const p=eo().gitGraph,b=i.append("g");c.forEach(((i,c)=>{const _=c%8,k=Ao[i.name].pos,w=b.append("line");w.attr("x1",0),w.attr("y1",k),w.attr("x2",Oo),w.attr("y2",k),w.attr("class","branch branch"+_),Do.push(k);const T=(i=>{const c=document.createElementNS("http://www.w3.org/2000/svg","text");let p=[];p="string"==typeof i?i.split(/\\n|\n| /gi):Array.isArray(i)?i:[];for(const i of p){const p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","0"),p.setAttribute("class","row"),p.textContent=i.trim(),c.appendChild(p)}return c})(i.name),S=b.insert("rect"),O=b.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+_);O.node().appendChild(T);let N=T.getBBox();S.attr("class","branchLabelBkg label"+_).attr("rx",4).attr("ry",4).attr("x",-N.width-4-(!0===p.rotateCommitLabel?30:0)).attr("y",-N.height/2+8).attr("width",N.width+18).attr("height",N.height+4),O.attr("transform","translate("+(-N.width-14-(!0===p.rotateCommitLabel?30:0))+", "+(k-N.height/2-1)+")"),S.attr("transform","translate(-19, "+(k-N.height/2)+")")}))},No={draw:function(i,c,p,b){var _;Ao={},Lo={},ko={},Oo=0,Do=[];const w=eo(),T=w.gitGraph;k.debug("in gitgraph renderer",i+"\n","id:",c,p),ko=b.db.getCommits();const S=b.db.getBranchesAsObjArray();let O=0;S.forEach(((i,c)=>{Ao[i.name]={pos:O,index:c},O+=50+(T.rotateCommitLabel?40:0)}));const N=select(`[id="${c}"]`);drawCommits(N,ko,!1),T.showBranches&&drawBranches(N,S),((i,c)=>{const p=i.append("g").attr("class","commit-arrows");Object.keys(c).forEach((i=>{const b=c[i];b.parents&&b.parents.length>0&&b.parents.forEach((i=>{drawArrow(p,c[i],b,c)}))}))})(N,ko),drawCommits(N,ko,!0),Ns.insertTitle(N,"gitTitleText",T.titleTopMargin,b.db.getDiagramTitle()),no(void 0,N,T.diagramPadding,null!=(_=T.useMaxWidth)?_:w.useMaxWidth)}},gitGraphStyles=i=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((c=>`\n .branch-label${c} { fill: ${i["gitBranchLabel"+c]}; }\n .commit${c} { stroke: ${i["git"+c]}; fill: ${i["git"+c]}; }\n .commit-highlight${c} { stroke: ${i["gitInv"+c]}; fill: ${i["gitInv"+c]}; }\n .label${c} { fill: ${i["git"+c]}; }\n .arrow${c} { stroke: ${i["git"+c]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${i.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${i.commitLabelFontSize}; fill: ${i.commitLabelColor};}\n .commit-label-bkg { font-size: ${i.commitLabelFontSize}; fill: ${i.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${i.tagLabelFontSize}; fill: ${i.tagLabelColor};}\n .tag-label-bkg { fill: ${i.tagLabelBackground}; stroke: ${i.tagLabelBorder}; }\n .tag-hole { fill: ${i.textColor}; }\n\n .commit-merge {\n stroke: ${i.primaryColor};\n fill: ${i.primaryColor};\n }\n .commit-reverse {\n stroke: ${i.primaryColor};\n fill: ${i.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${i.primaryColor};\n fill: ${i.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${i.textColor};\n }\n }\n`;var Mo=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,6],p=[1,7],b=[1,8],_=[1,9],k=[1,16],w=[1,11],T=[1,12],S=[1,13],O=[1,14],N=[1,15],R=[1,27],Y=[1,33],j=[1,34],z=[1,35],U=[1,36],H=[1,37],Z=[1,72],K=[1,73],J=[1,74],tt=[1,75],et=[1,76],at=[1,77],ot=[1,78],ut=[1,38],pt=[1,39],gt=[1,40],yt=[1,41],vt=[1,42],kt=[1,43],wt=[1,44],Lt=[1,45],Dt=[1,46],Mt=[1,47],It=[1,48],jt=[1,49],Wt=[1,50],te=[1,51],ee=[1,52],ne=[1,53],re=[1,54],ie=[1,55],se=[1,56],oe=[1,57],le=[1,59],pe=[1,60],ge=[1,61],ye=[1,62],me=[1,63],be=[1,64],_e=[1,65],xe=[1,66],ve=[1,67],ke=[1,68],we=[1,69],Ce=[24,52],Se=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],Le=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],De=[1,94],Ne=[1,95],Me=[1,96],Ie=[1,97],Fe=[15,24,52],Re=[7,8,9,10,18,22,25,26,27,28],Pe=[15,24,43,52],Ye=[15,24,43,52,86,87,89,90],Ue=[15,43],He=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],Xe={trace:function trace(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 4:b.setDirection("TB");break;case 5:b.setDirection("BT");break;case 6:b.setDirection("RL");break;case 7:b.setDirection("LR");break;case 11:b.parseDirective("%%{","open_directive");break;case 12:break;case 13:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 14:b.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:b.setC4Type(k[T-3]);break;case 26:b.setTitle(k[T].substring(6)),this.$=k[T].substring(6);break;case 27:b.setAccDescription(k[T].substring(15)),this.$=k[T].substring(15);break;case 28:this.$=k[T].trim(),b.setTitle(this.$);break;case 29:case 30:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 35:case 36:k[T].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...k[T]),this.$=k[T];break;case 37:b.addPersonOrSystemBoundary(...k[T]),this.$=k[T];break;case 38:k[T].splice(2,0,"CONTAINER"),b.addContainerBoundary(...k[T]),this.$=k[T];break;case 39:b.addDeploymentNode("node",...k[T]),this.$=k[T];break;case 40:b.addDeploymentNode("nodeL",...k[T]),this.$=k[T];break;case 41:b.addDeploymentNode("nodeR",...k[T]),this.$=k[T];break;case 42:b.popBoundaryParseStack();break;case 46:b.addPersonOrSystem("person",...k[T]),this.$=k[T];break;case 47:b.addPersonOrSystem("external_person",...k[T]),this.$=k[T];break;case 48:b.addPersonOrSystem("system",...k[T]),this.$=k[T];break;case 49:b.addPersonOrSystem("system_db",...k[T]),this.$=k[T];break;case 50:b.addPersonOrSystem("system_queue",...k[T]),this.$=k[T];break;case 51:b.addPersonOrSystem("external_system",...k[T]),this.$=k[T];break;case 52:b.addPersonOrSystem("external_system_db",...k[T]),this.$=k[T];break;case 53:b.addPersonOrSystem("external_system_queue",...k[T]),this.$=k[T];break;case 54:b.addContainer("container",...k[T]),this.$=k[T];break;case 55:b.addContainer("container_db",...k[T]),this.$=k[T];break;case 56:b.addContainer("container_queue",...k[T]),this.$=k[T];break;case 57:b.addContainer("external_container",...k[T]),this.$=k[T];break;case 58:b.addContainer("external_container_db",...k[T]),this.$=k[T];break;case 59:b.addContainer("external_container_queue",...k[T]),this.$=k[T];break;case 60:b.addComponent("component",...k[T]),this.$=k[T];break;case 61:b.addComponent("component_db",...k[T]),this.$=k[T];break;case 62:b.addComponent("component_queue",...k[T]),this.$=k[T];break;case 63:b.addComponent("external_component",...k[T]),this.$=k[T];break;case 64:b.addComponent("external_component_db",...k[T]),this.$=k[T];break;case 65:b.addComponent("external_component_queue",...k[T]),this.$=k[T];break;case 67:b.addRel("rel",...k[T]),this.$=k[T];break;case 68:b.addRel("birel",...k[T]),this.$=k[T];break;case 69:b.addRel("rel_u",...k[T]),this.$=k[T];break;case 70:b.addRel("rel_d",...k[T]),this.$=k[T];break;case 71:b.addRel("rel_l",...k[T]),this.$=k[T];break;case 72:b.addRel("rel_r",...k[T]),this.$=k[T];break;case 73:b.addRel("rel_b",...k[T]),this.$=k[T];break;case 74:k[T].splice(0,1),b.addRel("rel",...k[T]),this.$=k[T];break;case 75:b.updateElStyle("update_el_style",...k[T]),this.$=k[T];break;case 76:b.updateRelStyle("update_rel_style",...k[T]),this.$=k[T];break;case 77:b.updateLayoutConfig("update_layout_config",...k[T]),this.$=k[T];break;case 78:this.$=[k[T]];break;case 79:k[T].unshift(k[T-1]),this.$=k[T];break;case 80:case 82:this.$=k[T].trim();break;case 81:let i={};i[k[T-1].trim()]=k[T].trim(),this.$=i;break;case 83:this.$=""}},table:[{3:1,4:2,5:3,6:4,7:i,8:p,9:b,10:_,11:5,12:10,18:k,22:w,25:T,26:S,27:O,28:N},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:i,8:p,9:b,10:_,11:5,12:10,18:k,22:w,25:T,26:S,27:O,28:N},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:R},o([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:Y,33:j,34:z,36:U,38:H,39:58,40:70,42:71,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,53:32,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we},{23:79,29:29,30:30,31:31,32:Y,33:j,34:z,36:U,38:H,39:58,40:70,42:71,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,53:32,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we},{23:80,29:29,30:30,31:31,32:Y,33:j,34:z,36:U,38:H,39:58,40:70,42:71,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,53:32,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we},{23:81,29:29,30:30,31:31,32:Y,33:j,34:z,36:U,38:H,39:58,40:70,42:71,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,53:32,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we},{23:82,29:29,30:30,31:31,32:Y,33:j,34:z,36:U,38:H,39:58,40:70,42:71,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,53:32,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},o(Ce,[2,20],{53:32,39:58,40:70,42:71,30:87,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we}),o(Ce,[2,21]),o(Se,[2,23],{15:[1,88]}),o(Ce,[2,43],{15:[1,89]}),o(Le,[2,26]),o(Le,[2,27]),{35:[1,90]},{37:[1,91]},o(Le,[2,30]),{45:92,85:93,86:De,87:Ne,89:Me,90:Ie},{45:98,85:93,86:De,87:Ne,89:Me,90:Ie},{45:99,85:93,86:De,87:Ne,89:Me,90:Ie},{45:100,85:93,86:De,87:Ne,89:Me,90:Ie},{45:101,85:93,86:De,87:Ne,89:Me,90:Ie},{45:102,85:93,86:De,87:Ne,89:Me,90:Ie},{45:103,85:93,86:De,87:Ne,89:Me,90:Ie},{45:104,85:93,86:De,87:Ne,89:Me,90:Ie},{45:105,85:93,86:De,87:Ne,89:Me,90:Ie},{45:106,85:93,86:De,87:Ne,89:Me,90:Ie},{45:107,85:93,86:De,87:Ne,89:Me,90:Ie},{45:108,85:93,86:De,87:Ne,89:Me,90:Ie},{45:109,85:93,86:De,87:Ne,89:Me,90:Ie},{45:110,85:93,86:De,87:Ne,89:Me,90:Ie},{45:111,85:93,86:De,87:Ne,89:Me,90:Ie},{45:112,85:93,86:De,87:Ne,89:Me,90:Ie},{45:113,85:93,86:De,87:Ne,89:Me,90:Ie},{45:114,85:93,86:De,87:Ne,89:Me,90:Ie},{45:115,85:93,86:De,87:Ne,89:Me,90:Ie},{45:116,85:93,86:De,87:Ne,89:Me,90:Ie},o(Fe,[2,66]),{45:117,85:93,86:De,87:Ne,89:Me,90:Ie},{45:118,85:93,86:De,87:Ne,89:Me,90:Ie},{45:119,85:93,86:De,87:Ne,89:Me,90:Ie},{45:120,85:93,86:De,87:Ne,89:Me,90:Ie},{45:121,85:93,86:De,87:Ne,89:Me,90:Ie},{45:122,85:93,86:De,87:Ne,89:Me,90:Ie},{45:123,85:93,86:De,87:Ne,89:Me,90:Ie},{45:124,85:93,86:De,87:Ne,89:Me,90:Ie},{45:125,85:93,86:De,87:Ne,89:Me,90:Ie},{45:126,85:93,86:De,87:Ne,89:Me,90:Ie},{45:127,85:93,86:De,87:Ne,89:Me,90:Ie},{30:128,39:58,40:70,42:71,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,53:32,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we},{15:[1,130],43:[1,129]},{45:131,85:93,86:De,87:Ne,89:Me,90:Ie},{45:132,85:93,86:De,87:Ne,89:Me,90:Ie},{45:133,85:93,86:De,87:Ne,89:Me,90:Ie},{45:134,85:93,86:De,87:Ne,89:Me,90:Ie},{45:135,85:93,86:De,87:Ne,89:Me,90:Ie},{45:136,85:93,86:De,87:Ne,89:Me,90:Ie},{45:137,85:93,86:De,87:Ne,89:Me,90:Ie},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},o(Re,[2,9]),{14:142,21:R},{21:[2,13]},{1:[2,15]},o(Ce,[2,22]),o(Se,[2,24],{31:31,29:143,32:Y,33:j,34:z,36:U,38:H}),o(Ce,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:Y,33:j,34:z,36:U,38:H,44:Z,46:K,47:J,48:tt,49:et,50:at,51:ot,54:ut,55:pt,56:gt,57:yt,58:vt,59:kt,60:wt,61:Lt,62:Dt,63:Mt,64:It,65:jt,66:Wt,67:te,68:ee,69:ne,70:re,71:ie,72:se,73:oe,74:le,75:pe,76:ge,77:ye,78:me,79:be,80:_e,81:xe,82:ve,83:ke,84:we}),o(Le,[2,28]),o(Le,[2,29]),o(Fe,[2,46]),o(Pe,[2,78],{85:93,45:145,86:De,87:Ne,89:Me,90:Ie}),o(Ye,[2,80]),{88:[1,146]},o(Ye,[2,82]),o(Ye,[2,83]),o(Fe,[2,47]),o(Fe,[2,48]),o(Fe,[2,49]),o(Fe,[2,50]),o(Fe,[2,51]),o(Fe,[2,52]),o(Fe,[2,53]),o(Fe,[2,54]),o(Fe,[2,55]),o(Fe,[2,56]),o(Fe,[2,57]),o(Fe,[2,58]),o(Fe,[2,59]),o(Fe,[2,60]),o(Fe,[2,61]),o(Fe,[2,62]),o(Fe,[2,63]),o(Fe,[2,64]),o(Fe,[2,65]),o(Fe,[2,67]),o(Fe,[2,68]),o(Fe,[2,69]),o(Fe,[2,70]),o(Fe,[2,71]),o(Fe,[2,72]),o(Fe,[2,73]),o(Fe,[2,74]),o(Fe,[2,75]),o(Fe,[2,76]),o(Fe,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},o(Ue,[2,35]),o(Ue,[2,36]),o(Ue,[2,37]),o(Ue,[2,38]),o(Ue,[2,39]),o(Ue,[2,40]),o(Ue,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},o(Se,[2,25]),o(Ce,[2,45]),o(Pe,[2,79]),o(Ye,[2,81]),o(Fe,[2,31]),o(Fe,[2,42]),o(He,[2,32]),o(He,[2,33],{15:[1,152]}),o(Re,[2,10]),o(He,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},Ke={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{},performAction:function anonymous(i,p,b,_){switch(b){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 78:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:case 21:case 75:break;case 19:c;break;case 20:return 15;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:case 58:return this.begin("rel_u"),76;case 59:case 60:return this.begin("rel_d"),77;case 61:case 62:return this.begin("rel_l"),78;case 63:case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:case 84:this.popState(),this.popState();break;case 74:case 76:return 90;case 77:this.begin("string");break;case 79:case 85:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};function Parser(){this.yy={}}return Xe.lexer=Ke,Parser.prototype=Xe,Xe.Parser=Parser,new Parser}();Mo.parser=Mo;const Io=Mo,c4Detector=i=>null!==i.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/);let Bo=[],Fo=[""],$o="global",Ro="",Po=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Yo=[],jo="",zo=!1,Wo=4,Uo=2;var Ho;const getC4ShapeArray=function(i){return null==i?Bo:Bo.filter((c=>c.parentBoundary===i))},autoWrap$1=function(){return zo},qo={addPersonOrSystem:function(i,c,p,b,_,k,w){if(null===c||null===p)return;let T={};const S=Bo.find((i=>i.alias===c));if(S&&c===S.alias?T=S:(T.alias=c,Bo.push(T)),T.label=null==p?{text:""}:{text:p},null==b)T.descr={text:""};else if("object"==typeof b){let[i,c]=Object.entries(b)[0];T[i]={text:c}}else T.descr={text:b};if("object"==typeof _){let[i,c]=Object.entries(_)[0];T[i]=c}else T.sprite=_;if("object"==typeof k){let[i,c]=Object.entries(k)[0];T[i]=c}else T.tags=k;if("object"==typeof w){let[i,c]=Object.entries(w)[0];T[i]=c}else T.link=w;T.typeC4Shape={text:i},T.parentBoundary=$o,T.wrap=autoWrap$1()},addPersonOrSystemBoundary:function(i,c,p,b,_){if(null===i||null===c)return;let k={};const w=Po.find((c=>c.alias===i));if(w&&i===w.alias?k=w:(k.alias=i,Po.push(k)),k.label=null==c?{text:""}:{text:c},null==p)k.type={text:"system"};else if("object"==typeof p){let[i,c]=Object.entries(p)[0];k[i]={text:c}}else k.type={text:p};if("object"==typeof b){let[i,c]=Object.entries(b)[0];k[i]=c}else k.tags=b;if("object"==typeof _){let[i,c]=Object.entries(_)[0];k[i]=c}else k.link=_;k.parentBoundary=$o,k.wrap=autoWrap$1(),Ro=$o,$o=i,Fo.push(Ro)},addContainer:function(i,c,p,b,_,k,w,T){if(null===c||null===p)return;let S={};const O=Bo.find((i=>i.alias===c));if(O&&c===O.alias?S=O:(S.alias=c,Bo.push(S)),S.label=null==p?{text:""}:{text:p},null==b)S.techn={text:""};else if("object"==typeof b){let[i,c]=Object.entries(b)[0];S[i]={text:c}}else S.techn={text:b};if(null==_)S.descr={text:""};else if("object"==typeof _){let[i,c]=Object.entries(_)[0];S[i]={text:c}}else S.descr={text:_};if("object"==typeof k){let[i,c]=Object.entries(k)[0];S[i]=c}else S.sprite=k;if("object"==typeof w){let[i,c]=Object.entries(w)[0];S[i]=c}else S.tags=w;if("object"==typeof T){let[i,c]=Object.entries(T)[0];S[i]=c}else S.link=T;S.wrap=autoWrap$1(),S.typeC4Shape={text:i},S.parentBoundary=$o},addContainerBoundary:function(i,c,p,b,_){if(null===i||null===c)return;let k={};const w=Po.find((c=>c.alias===i));if(w&&i===w.alias?k=w:(k.alias=i,Po.push(k)),k.label=null==c?{text:""}:{text:c},null==p)k.type={text:"container"};else if("object"==typeof p){let[i,c]=Object.entries(p)[0];k[i]={text:c}}else k.type={text:p};if("object"==typeof b){let[i,c]=Object.entries(b)[0];k[i]=c}else k.tags=b;if("object"==typeof _){let[i,c]=Object.entries(_)[0];k[i]=c}else k.link=_;k.parentBoundary=$o,k.wrap=autoWrap$1(),Ro=$o,$o=i,Fo.push(Ro)},addComponent:function(i,c,p,b,_,k,w,T){if(null===c||null===p)return;let S={};const O=Bo.find((i=>i.alias===c));if(O&&c===O.alias?S=O:(S.alias=c,Bo.push(S)),S.label=null==p?{text:""}:{text:p},null==b)S.techn={text:""};else if("object"==typeof b){let[i,c]=Object.entries(b)[0];S[i]={text:c}}else S.techn={text:b};if(null==_)S.descr={text:""};else if("object"==typeof _){let[i,c]=Object.entries(_)[0];S[i]={text:c}}else S.descr={text:_};if("object"==typeof k){let[i,c]=Object.entries(k)[0];S[i]=c}else S.sprite=k;if("object"==typeof w){let[i,c]=Object.entries(w)[0];S[i]=c}else S.tags=w;if("object"==typeof T){let[i,c]=Object.entries(T)[0];S[i]=c}else S.link=T;S.wrap=autoWrap$1(),S.typeC4Shape={text:i},S.parentBoundary=$o},addDeploymentNode:function(i,c,p,b,_,k,w,T){if(null===c||null===p)return;let S={};const O=Po.find((i=>i.alias===c));if(O&&c===O.alias?S=O:(S.alias=c,Po.push(S)),S.label=null==p?{text:""}:{text:p},null==b)S.type={text:"node"};else if("object"==typeof b){let[i,c]=Object.entries(b)[0];S[i]={text:c}}else S.type={text:b};if(null==_)S.descr={text:""};else if("object"==typeof _){let[i,c]=Object.entries(_)[0];S[i]={text:c}}else S.descr={text:_};if("object"==typeof w){let[i,c]=Object.entries(w)[0];S[i]=c}else S.tags=w;if("object"==typeof T){let[i,c]=Object.entries(T)[0];S[i]=c}else S.link=T;S.nodeType=i,S.parentBoundary=$o,S.wrap=autoWrap$1(),Ro=$o,$o=c,Fo.push(Ro)},popBoundaryParseStack:function(){$o=Ro,Fo.pop(),Ro=Fo.pop(),Fo.push(Ro)},addRel:function(i,c,p,b,_,k,w,T,S){if(null==i||null==c||null==p||null==b)return;let O={};const N=Yo.find((i=>i.from===c&&i.to===p));if(N?O=N:Yo.push(O),O.type=i,O.from=c,O.to=p,O.label={text:b},null==_)O.techn={text:""};else if("object"==typeof _){let[i,c]=Object.entries(_)[0];O[i]={text:c}}else O.techn={text:_};if(null==k)O.descr={text:""};else if("object"==typeof k){let[i,c]=Object.entries(k)[0];O[i]={text:c}}else O.descr={text:k};if("object"==typeof w){let[i,c]=Object.entries(w)[0];O[i]=c}else O.sprite=w;if("object"==typeof T){let[i,c]=Object.entries(T)[0];O[i]=c}else O.tags=T;if("object"==typeof S){let[i,c]=Object.entries(S)[0];O[i]=c}else O.link=S;O.wrap=autoWrap$1()},updateElStyle:function(i,c,p,b,_,k,w,T,S,O,N){let R=Bo.find((i=>i.alias===c));if(void 0!==R||(R=Po.find((i=>i.alias===c)),void 0!==R)){if(null!=p)if("object"==typeof p){let[i,c]=Object.entries(p)[0];R[i]=c}else R.bgColor=p;if(null!=b)if("object"==typeof b){let[i,c]=Object.entries(b)[0];R[i]=c}else R.fontColor=b;if(null!=_)if("object"==typeof _){let[i,c]=Object.entries(_)[0];R[i]=c}else R.borderColor=_;if(null!=k)if("object"==typeof k){let[i,c]=Object.entries(k)[0];R[i]=c}else R.shadowing=k;if(null!=w)if("object"==typeof w){let[i,c]=Object.entries(w)[0];R[i]=c}else R.shape=w;if(null!=T)if("object"==typeof T){let[i,c]=Object.entries(T)[0];R[i]=c}else R.sprite=T;if(null!=S)if("object"==typeof S){let[i,c]=Object.entries(S)[0];R[i]=c}else R.techn=S;if(null!=O)if("object"==typeof O){let[i,c]=Object.entries(O)[0];R[i]=c}else R.legendText=O;if(null!=N)if("object"==typeof N){let[i,c]=Object.entries(N)[0];R[i]=c}else R.legendSprite=N}},updateRelStyle:function(i,c,p,b,_,k,w){const T=Yo.find((i=>i.from===c&&i.to===p));if(void 0!==T){if(null!=b)if("object"==typeof b){let[i,c]=Object.entries(b)[0];T[i]=c}else T.textColor=b;if(null!=_)if("object"==typeof _){let[i,c]=Object.entries(_)[0];T[i]=c}else T.lineColor=_;if(null!=k)if("object"==typeof k){let[i,c]=Object.entries(k)[0];T[i]=parseInt(c)}else T.offsetX=parseInt(k);if(null!=w)if("object"==typeof w){let[i,c]=Object.entries(w)[0];T[i]=parseInt(c)}else T.offsetY=parseInt(w)}},updateLayoutConfig:function(i,c,p){let b=Wo,_=Uo;if("object"==typeof c){const i=Object.values(c)[0];b=parseInt(i)}else b=parseInt(c);if("object"==typeof p){const i=Object.values(p)[0];_=parseInt(i)}else _=parseInt(p);b>=1&&(Wo=b),_>=1&&(Uo=_)},autoWrap:autoWrap$1,setWrap:function(i){zo=i},getC4ShapeArray:getC4ShapeArray,getC4Shape:function(i){return Bo.find((c=>c.alias===i))},getC4ShapeKeys:function(i){return Object.keys(getC4ShapeArray(i))},getBoundarys:function(i){return null==i?Po:Po.filter((c=>c.parentBoundary===i))},getCurrentBoundaryParse:function(){return $o},getParentBoundaryParse:function(){return Ro},getRels:function(){return Yo},getTitle:function(){return jo},getC4Type:function(){return Ho},getC4ShapeInRow:function(){return Wo},getC4BoundaryInRow:function(){return Uo},setAccTitle:setAccTitle,getAccTitle:getAccTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription,parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().c4,clear:function(){Bo=[],Po=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ro="",$o="global",Fo=[""],Yo=[],Fo=[""],jo="",zo=!1,Wo=4,Uo=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(i){let c=sanitizeText$5(i,getConfig$1());jo=c},setC4Type:function(i){let c=sanitizeText$5(i,getConfig$1());Ho=c}},drawRect$2=function(i,c){const p=i.append("rect");if(p.attr("x",c.x),p.attr("y",c.y),p.attr("fill",c.fill),p.attr("stroke",c.stroke),p.attr("width",c.width),p.attr("height",c.height),p.attr("rx",c.rx),p.attr("ry",c.ry),"undefined"!==c.attrs&&null!==c.attrs)for(let i in c.attrs)p.attr(i,c.attrs[i]);return"undefined"!==c.class&&p.attr("class",c.class),p},drawImage$1=function(i,c,p,b,_,k){const w=i.append("image");w.attr("width",c),w.attr("height",p),w.attr("x",b),w.attr("y",_);let S=k.startsWith("data:image/png;base64")?k:T(k);w.attr("xlink:href",S)},getNoteRect$2=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},getC4ShapeFont=(i,c)=>({fontFamily:i[c+"FontFamily"],fontSize:i[c+"FontSize"],fontWeight:i[c+"FontWeight"]}),Vo=function(){function byText(i,c,p,b,_,k,w){_setTextAttrs(c.append("text").attr("x",p+_/2).attr("y",b+k/2+5).style("text-anchor","middle").text(i),w)}function byTspan(i,c,p,b,_,k,w,T){const{fontSize:S,fontFamily:O,fontWeight:N}=T,R=i.split(Ri.lineBreakRegex);for(let i=0;i>"),c.typeC4Shape.text){case"person":case"external_person":drawImage$1(T,48,48,c.x+c.width/2-24,c.y+c.image.Y,w)}let N=p[c.typeC4Shape.text+"Font"]();return N.fontWeight="bold",N.fontSize=N.fontSize+2,N.fontColor=k,Vo(p)(c.label.text,T,c.x,c.y+c.label.Y,c.width,c.height,{fill:k},N),N=p[c.typeC4Shape.text+"Font"](),N.fontColor=k,c.thchn&&""!==c.thchn.text?Vo(p)(c.thchn.text,T,c.x,c.y+c.thchn.Y,c.width,c.height,{fill:k,"font-style":"italic"},N):c.type&&""!==c.type.text&&Vo(p)(c.type.text,T,c.x,c.y+c.type.Y,c.width,c.height,{fill:k,"font-style":"italic"},N),c.descr&&""!==c.descr.text&&(N=p.personFont(),N.fontColor=k,Vo(p)(c.descr.text,T,c.x,c.y+c.descr.Y,c.width,c.height,{fill:k},N)),c.height},svgDraw$3_drawRels=(i,c,p)=>{const b=i.append("g");let _=0;for(let i of c){let c=i.textColor?i.textColor:"#444444",k=i.lineColor?i.lineColor:"#444444",w=i.offsetX?parseInt(i.offsetX):0,T=i.offsetY?parseInt(i.offsetY):0,S="";if(0===_){let c=b.append("line");c.attr("x1",i.startPoint.x),c.attr("y1",i.startPoint.y),c.attr("x2",i.endPoint.x),c.attr("y2",i.endPoint.y),c.attr("stroke-width","1"),c.attr("stroke",k),c.style("fill","none"),"rel_b"!==i.type&&c.attr("marker-end","url("+S+"#arrowhead)"),"birel"!==i.type&&"rel_b"!==i.type||c.attr("marker-start","url("+S+"#arrowend)"),_=-1}else{let c=b.append("path");c.attr("fill","none").attr("stroke-width","1").attr("stroke",k).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",i.startPoint.x).replaceAll("starty",i.startPoint.y).replaceAll("controlx",i.startPoint.x+(i.endPoint.x-i.startPoint.x)/2-(i.endPoint.x-i.startPoint.x)/4).replaceAll("controly",i.startPoint.y+(i.endPoint.y-i.startPoint.y)/2).replaceAll("stopx",i.endPoint.x).replaceAll("stopy",i.endPoint.y)),"rel_b"!==i.type&&c.attr("marker-end","url("+S+"#arrowhead)"),"birel"!==i.type&&"rel_b"!==i.type||c.attr("marker-start","url("+S+"#arrowend)")}let O=p.messageFont();Vo(p)(i.label.text,b,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+w,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+T,i.label.width,i.label.height,{fill:c},O),i.techn&&""!==i.techn.text&&(O=p.messageFont(),Vo(p)("["+i.techn.text+"]",b,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+w,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+p.messageFontSize+5+T,Math.max(i.label.width,i.techn.width),i.techn.height,{fill:c,"font-style":"italic"},O))}},svgDraw$3_insertArrowHead=function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},svgDraw$3_insertArrowEnd=function(i){i.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},svgDraw$3_insertArrowFilledHead=function(i){i.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},svgDraw$3_insertArrowCrossHead=function(i){const c=i.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);c.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),c.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},svgDraw$3_insertDatabaseIcon=function(i){i.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},svgDraw$3_insertComputerIcon=function(i){i.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},svgDraw$3_insertClockIcon=function(i){i.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")};let Go=0,Xo=0,Zo=4,Ko=2;Mo.yy=qo;let Qo={};class Bounds{constructor(i){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,setConf$a(i.db.getConfig())}setData(i,c,p,b){this.nextData.startx=this.data.startx=i,this.nextData.stopx=this.data.stopx=c,this.nextData.starty=this.data.starty=p,this.nextData.stopy=this.data.stopy=b}updateVal(i,c,p,b){void 0===i[c]?i[c]=p:i[c]=b(p,i[c])}insert(i){this.nextData.cnt=this.nextData.cnt+1;let c=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+i.margin:this.nextData.stopx+2*i.margin,p=c+i.width,b=this.nextData.starty+2*i.margin,_=b+i.height;(c>=this.data.widthLimit||p>=this.data.widthLimit||this.nextData.cnt>Zo)&&(c=this.nextData.startx+i.margin+Qo.nextLinePaddingX,b=this.nextData.stopy+2*i.margin,this.nextData.stopx=p=c+i.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=_=b+i.height,this.nextData.cnt=1),i.x=c,i.y=b,this.updateVal(this.data,"startx",c,Math.min),this.updateVal(this.data,"starty",b,Math.min),this.updateVal(this.data,"stopx",p,Math.max),this.updateVal(this.data,"stopy",_,Math.max),this.updateVal(this.nextData,"startx",c,Math.min),this.updateVal(this.nextData,"starty",b,Math.min),this.updateVal(this.nextData,"stopx",p,Math.max),this.updateVal(this.nextData,"stopy",_,Math.max)}init(i){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},setConf$a(i.db.getConfig())}bumpLastMargin(i){this.data.stopx+=i,this.data.stopy+=i}}const setConf$a=function(i){Qa(Qo,i),i.fontFamily&&(Qo.personFontFamily=Qo.systemFontFamily=Qo.messageFontFamily=i.fontFamily),i.fontSize&&(Qo.personFontSize=Qo.systemFontSize=Qo.messageFontSize=i.fontSize),i.fontWeight&&(Qo.personFontWeight=Qo.systemFontWeight=Qo.messageFontWeight=i.fontWeight)},c4ShapeFont=(i,c)=>({fontFamily:i[c+"FontFamily"],fontSize:i[c+"FontSize"],fontWeight:i[c+"FontWeight"]}),boundaryFont=i=>({fontFamily:i.boundaryFontFamily,fontSize:i.boundaryFontSize,fontWeight:i.boundaryFontWeight});function calcC4ShapeTextWH(i,c,p,b,_){if(!c[i].width)if(p)c[i].text=As(c[i].text,_,b),c[i].textLines=c[i].text.split(Ri.lineBreakRegex).length,c[i].width=_,c[i].height=calculateTextHeight(c[i].text,b);else{let p=c[i].text.split(Ri.lineBreakRegex);c[i].textLines=p.length;let _=0;c[i].height=0,c[i].width=0;for(const k of p)c[i].width=Math.max(calculateTextWidth(k,b),c[i].width),_=calculateTextHeight(k,b),c[i].height=c[i].height+_}}const drawBoundary=function(i,c,p){c.x=p.data.startx,c.y=p.data.starty,c.width=p.data.stopx-p.data.startx,c.height=p.data.stopy-p.data.starty,c.label.y=Qo.c4ShapeMargin-35;let b=c.wrap&&Qo.wrap,_=boundaryFont(Qo);_.fontSize=_.fontSize+2,_.fontWeight="bold",calcC4ShapeTextWH("label",c,b,_,calculateTextWidth(c.label.text,_)),svgDraw$3_drawBoundary(i,c,Qo)},drawC4ShapeArray=function(i,c,p,b){let _=0;for(const k of b){_=0;const b=p[k];let w=c4ShapeFont(Qo,b.typeC4Shape.text);switch(w.fontSize=w.fontSize-2,b.typeC4Shape.width=calculateTextWidth("<<"+b.typeC4Shape.text+">>",w),b.typeC4Shape.height=w.fontSize+2,b.typeC4Shape.Y=Qo.c4ShapePadding,_=b.typeC4Shape.Y+b.typeC4Shape.height-4,b.image={width:0,height:0,Y:0},b.typeC4Shape.text){case"person":case"external_person":b.image.width=48,b.image.height=48,b.image.Y=_,_=b.image.Y+b.image.height}b.sprite&&(b.image.width=48,b.image.height=48,b.image.Y=_,_=b.image.Y+b.image.height);let T=b.wrap&&Qo.wrap,S=Qo.width-2*Qo.c4ShapePadding,O=c4ShapeFont(Qo,b.typeC4Shape.text);if(O.fontSize=O.fontSize+2,O.fontWeight="bold",calcC4ShapeTextWH("label",b,T,O,S),b.label.Y=_+8,_=b.label.Y+b.label.height,b.type&&""!==b.type.text){b.type.text="["+b.type.text+"]",calcC4ShapeTextWH("type",b,T,c4ShapeFont(Qo,b.typeC4Shape.text),S),b.type.Y=_+5,_=b.type.Y+b.type.height}else if(b.techn&&""!==b.techn.text){b.techn.text="["+b.techn.text+"]",calcC4ShapeTextWH("techn",b,T,c4ShapeFont(Qo,b.techn.text),S),b.techn.Y=_+5,_=b.techn.Y+b.techn.height}let N=_,R=b.label.width;if(b.descr&&""!==b.descr.text){calcC4ShapeTextWH("descr",b,T,c4ShapeFont(Qo,b.typeC4Shape.text),S),b.descr.Y=_+20,_=b.descr.Y+b.descr.height,R=Math.max(b.label.width,b.descr.width),N=_-5*b.descr.textLines}R+=Qo.c4ShapePadding,b.width=Math.max(b.width||Qo.width,R,Qo.width),b.height=Math.max(b.height||Qo.height,N,Qo.height),b.margin=b.margin||Qo.c4ShapeMargin,i.insert(b),svgDraw$3_drawC4Shape(c,b,Qo)}i.bumpLastMargin(Qo.c4ShapeMargin)};class Point{constructor(i,c){this.x=i,this.y=c}}let getIntersectPoint=function(i,c){let p=i.x,b=i.y,_=c.x,k=c.y,w=p+i.width/2,T=b+i.height/2,S=Math.abs(p-_),O=Math.abs(b-k),N=O/S,R=i.height/i.width,Y=null;return b==k&&p<_?Y=new Point(p+i.width,T):b==k&&p>_?Y=new Point(p,T):p==_&&bk&&(Y=new Point(w,b)),p>_&&b=N?new Point(p,T+N*i.width/2):new Point(w-S/O*i.height/2,b+i.height):p<_&&b=N?new Point(p+i.width,T+N*i.width/2):new Point(w+S/O*i.height/2,b+i.height):p<_&&b>k?Y=R>=N?new Point(p+i.width,T-N*i.width/2):new Point(w+i.height/2*S/O,b):p>_&&b>k&&(Y=R>=N?new Point(p,T-i.width/2*N):new Point(w-i.height/2*S/O,b)),Y},getIntersectPoints=function(i,c){let p={x:0,y:0};p.x=c.x+c.width/2,p.y=c.y+c.height/2;let b=getIntersectPoint(i,p);return p.x=i.x+i.width/2,p.y=i.y+i.height/2,{startPoint:b,endPoint:getIntersectPoint(c,p)}};function drawInsideBoundary(i,c,p,b,_){let k=new Bounds(_);k.data.widthLimit=p.data.widthLimit/Math.min(Ko,b.length);for(let[w,T]of b.entries()){let b=0;T.image={width:0,height:0,Y:0},T.sprite&&(T.image.width=48,T.image.height=48,T.image.Y=b,b=T.image.Y+T.image.height);let S=T.wrap&&Qo.wrap,O=boundaryFont(Qo);if(O.fontSize=O.fontSize+2,O.fontWeight="bold",calcC4ShapeTextWH("label",T,S,O,k.data.widthLimit),T.label.Y=b+8,b=T.label.Y+T.label.height,T.type&&""!==T.type.text){T.type.text="["+T.type.text+"]",calcC4ShapeTextWH("type",T,S,boundaryFont(Qo),k.data.widthLimit),T.type.Y=b+5,b=T.type.Y+T.type.height}if(T.descr&&""!==T.descr.text){let i=boundaryFont(Qo);i.fontSize=i.fontSize-2,calcC4ShapeTextWH("descr",T,S,i,k.data.widthLimit),T.descr.Y=b+20,b=T.descr.Y+T.descr.height}if(0==w||w%Ko==0){let i=p.data.startx+Qo.diagramMarginX,c=p.data.stopy+Qo.diagramMarginY+b;k.setData(i,i,c,c)}else{let i=k.data.stopx!==k.data.startx?k.data.stopx+Qo.diagramMarginX:k.data.startx,c=k.data.starty;k.setData(i,i,c,c)}k.name=T.alias;let N=_.db.getC4ShapeArray(T.alias),R=_.db.getC4ShapeKeys(T.alias);R.length>0&&drawC4ShapeArray(k,i,N,R),c=T.alias;let Y=_.db.getBoundarys(c);Y.length>0&&drawInsideBoundary(i,c,k,Y,_),"global"!==T.alias&&drawBoundary(i,T,k),p.data.stopy=Math.max(k.data.stopy+Qo.c4ShapeMargin,p.data.stopy),p.data.stopx=Math.max(k.data.stopx+Qo.c4ShapeMargin,p.data.stopx),Go=Math.max(Go,p.data.stopx),Xo=Math.max(Xo,p.data.stopy)}}const Jo={drawPersonOrSystemArray:drawC4ShapeArray,drawBoundary:drawBoundary,setConf:setConf$a,draw:function(i,c,p,b){Qo=getConfig$1().c4;const _=getConfig$1().securityLevel;let w;"sandbox"===_&&(w=select("#i"+c));const T=select("sandbox"===_?w.nodes()[0].contentDocument.body:"body");let S=b.db;b.db.setWrap(Qo.wrap),Zo=S.getC4ShapeInRow(),Ko=S.getC4BoundaryInRow(),k.debug(`C:${JSON.stringify(Qo,null,2)}`);const O="sandbox"===_?T.select(`[id="${c}"]`):select(`[id="${c}"]`);svgDraw$3_insertComputerIcon(O),svgDraw$3_insertDatabaseIcon(O),svgDraw$3_insertClockIcon(O);let N=new Bounds(b);N.setData(Qo.diagramMarginX,Qo.diagramMarginX,Qo.diagramMarginY,Qo.diagramMarginY),N.data.widthLimit=screen.availWidth,Go=Qo.diagramMarginX,Xo=Qo.diagramMarginY;const R=b.db.getTitle();drawInsideBoundary(O,"",N,b.db.getBoundarys(""),b),svgDraw$3_insertArrowHead(O),svgDraw$3_insertArrowEnd(O),svgDraw$3_insertArrowCrossHead(O),svgDraw$3_insertArrowFilledHead(O),function(i,c,p,b){let _=0;for(let i of c){_+=1;let c=i.wrap&&Qo.wrap,w={fontFamily:(k=Qo).messageFontFamily,fontSize:k.messageFontSize,fontWeight:k.messageFontWeight};"C4Dynamic"===b.db.getC4Type()&&(i.label.text=_+": "+i.label.text);let T=calculateTextWidth(i.label.text,w);calcC4ShapeTextWH("label",i,c,w,T),i.techn&&""!==i.techn.text&&(T=calculateTextWidth(i.techn.text,w),calcC4ShapeTextWH("techn",i,c,w,T)),i.descr&&""!==i.descr.text&&(T=calculateTextWidth(i.descr.text,w),calcC4ShapeTextWH("descr",i,c,w,T));let S=p(i.from),O=p(i.to),N=getIntersectPoints(S,O);i.startPoint=N.startPoint,i.endPoint=N.endPoint}var k;svgDraw$3_drawRels(i,c,Qo)}(O,b.db.getRels(),b.db.getC4Shape,b),N.data.stopx=Go,N.data.stopy=Xo;const Y=N.data;let j=Y.stopy-Y.starty+2*Qo.diagramMarginY;const z=Y.stopx-Y.startx+2*Qo.diagramMarginX;R&&O.append("text").text(R).attr("x",(Y.stopx-Y.startx)/2-4*Qo.diagramMarginX).attr("y",Y.starty+Qo.diagramMarginY),configureSvgSize(O,j,z,Qo.useMaxWidth);const U=R?60:0;O.attr("viewBox",Y.startx-Qo.diagramMarginX+" -"+(Qo.diagramMarginY+U)+" "+z+" "+(j+U)),k.debug("models:",Y)}};var tl=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,3],c=[1,7],p=[1,8],b=[1,9],_=[1,10],k=[1,13],w=[1,12],T=[1,16,25],S=[1,20],O=[1,32],N=[1,33],R=[1,34],Y=[1,36],j=[1,39],z=[1,37],U=[1,38],H=[1,44],Z=[1,45],K=[1,40],J=[1,41],tt=[1,42],et=[1,43],at=[1,48],ot=[1,49],ut=[1,50],pt=[1,51],gt=[16,25],yt=[1,65],vt=[1,66],kt=[1,67],wt=[1,68],Lt=[1,69],Dt=[1,70],Mt=[1,71],It=[1,80],jt=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],Wt=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],te=[5,8,9,10,11,16,19,23,25],ee=[54,88,89,90,91],ne=[54,65,66,88,89,90,91],re=[54,60,61,62,63,64,88,89,90,91],ie=[16,25,32],se=[1,107],oe={trace:function trace(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 5:b.setDirection("TB");break;case 6:b.setDirection("BT");break;case 7:b.setDirection("RL");break;case 8:b.setDirection("LR");break;case 12:b.parseDirective("%%{","open_directive");break;case 13:b.parseDirective(k[T],"type_directive");break;case 14:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 15:b.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=k[T];break;case 22:this.$=k[T-1]+k[T];break;case 23:case 24:this.$=k[T-1]+"~"+k[T];break;case 25:b.addRelation(k[T]);break;case 26:k[T-1].title=b.cleanupLabel(k[T]),b.addRelation(k[T-1]);break;case 35:this.$=k[T].trim(),b.setAccTitle(this.$);break;case 36:case 37:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 38:b.addClass(k[T]);break;case 39:b.addClass(k[T-2]),b.setCssClass(k[T-2],k[T]);break;case 40:b.addClass(k[T-3]),b.addMembers(k[T-3],k[T-1]);break;case 41:b.addClass(k[T-5]),b.setCssClass(k[T-5],k[T-3]),b.addMembers(k[T-5],k[T-1]);break;case 42:b.addAnnotation(k[T],k[T-2]);break;case 43:this.$=[k[T]];break;case 44:k[T].push(k[T-1]),this.$=k[T];break;case 45:case 47:case 48:break;case 46:b.addMember(k[T-1],b.cleanupLabel(k[T]));break;case 49:this.$={id1:k[T-2],id2:k[T],relation:k[T-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:k[T-3],id2:k[T],relation:k[T-1],relationTitle1:k[T-2],relationTitle2:"none"};break;case 51:this.$={id1:k[T-3],id2:k[T],relation:k[T-2],relationTitle1:"none",relationTitle2:k[T-1]};break;case 52:this.$={id1:k[T-4],id2:k[T],relation:k[T-2],relationTitle1:k[T-3],relationTitle2:k[T-1]};break;case 53:b.addNote(k[T],k[T-1]);break;case 54:b.addNote(k[T]);break;case 55:this.$={type1:k[T-2],type2:k[T],lineType:k[T-1]};break;case 56:this.$={type1:"none",type2:k[T],lineType:k[T-1]};break;case 57:this.$={type1:k[T-1],type2:"none",lineType:k[T]};break;case 58:this.$={type1:"none",type2:"none",lineType:k[T]};break;case 59:this.$=b.relationType.AGGREGATION;break;case 60:this.$=b.relationType.EXTENSION;break;case 61:this.$=b.relationType.COMPOSITION;break;case 62:this.$=b.relationType.DEPENDENCY;break;case 63:this.$=b.relationType.LOLLIPOP;break;case 64:this.$=b.lineType.LINE;break;case 65:this.$=b.lineType.DOTTED_LINE;break;case 66:case 72:this.$=k[T-2],b.setClickEvent(k[T-1],k[T]);break;case 67:case 73:this.$=k[T-3],b.setClickEvent(k[T-2],k[T-1]),b.setTooltip(k[T-2],k[T]);break;case 68:case 76:this.$=k[T-2],b.setLink(k[T-1],k[T]);break;case 69:case 77:this.$=k[T-3],b.setLink(k[T-2],k[T-1],k[T]);break;case 70:case 78:this.$=k[T-3],b.setLink(k[T-2],k[T-1]),b.setTooltip(k[T-2],k[T]);break;case 71:case 79:this.$=k[T-4],b.setLink(k[T-3],k[T-2],k[T]),b.setTooltip(k[T-3],k[T-1]);break;case 74:this.$=k[T-3],b.setClickEvent(k[T-2],k[T-1],k[T]);break;case 75:this.$=k[T-4],b.setClickEvent(k[T-3],k[T-2],k[T-1]),b.setTooltip(k[T-3],k[T]);break;case 80:b.setCssClass(k[T-1],k[T])}},table:[{3:1,4:2,5:i,6:4,7:5,8:c,9:p,10:b,11:_,12:6,13:11,19:k,23:w},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:i,6:4,7:5,8:c,9:p,10:b,11:_,12:6,13:11,19:k,23:w},{1:[2,9]},o(T,[2,5]),o(T,[2,6]),o(T,[2,7]),o(T,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:S},o([17,22],[2,13]),{6:31,7:30,8:c,9:p,10:b,11:_,13:11,19:k,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:O,41:N,43:R,44:Y,49:j,51:z,52:U,55:H,57:Z,67:K,68:J,70:tt,74:et,88:at,89:ot,90:ut,91:pt},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},o(gt,[2,25],{32:[1,57]}),o(gt,[2,27]),o(gt,[2,28]),o(gt,[2,29]),o(gt,[2,30]),o(gt,[2,31]),o(gt,[2,32]),o(gt,[2,33]),o(gt,[2,34]),{40:[1,58]},{42:[1,59]},o(gt,[2,37]),o(gt,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:yt,61:vt,62:kt,63:wt,64:Lt,65:Dt,66:Mt}),{27:72,28:46,29:47,88:at,89:ot,90:ut,91:pt},o(gt,[2,47]),o(gt,[2,48]),{28:73,88:at,89:ot,90:ut},{27:74,28:46,29:47,88:at,89:ot,90:ut,91:pt},{27:75,28:46,29:47,88:at,89:ot,90:ut,91:pt},{27:76,28:46,29:47,88:at,89:ot,90:ut,91:pt},{54:[1,77]},{27:78,28:46,29:47,88:at,89:ot,90:ut,91:pt},{54:It,56:79},o(jt,[2,20],{28:46,29:47,27:81,30:[1,82],88:at,89:ot,90:ut,91:pt}),o(jt,[2,21],{30:[1,83]}),o(Wt,[2,94]),o(Wt,[2,95]),o(Wt,[2,96]),o([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),o(te,[2,10]),{15:84,22:S},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:c,9:p,10:b,11:_,13:11,19:k,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:O,41:N,43:R,44:Y,49:j,51:z,52:U,55:H,57:Z,67:K,68:J,70:tt,74:et,88:at,89:ot,90:ut,91:pt},o(gt,[2,26]),o(gt,[2,35]),o(gt,[2,36]),{27:86,28:46,29:47,54:[1,87],88:at,89:ot,90:ut,91:pt},{53:88,58:63,59:64,60:yt,61:vt,62:kt,63:wt,64:Lt,65:Dt,66:Mt},o(gt,[2,46]),{59:89,65:Dt,66:Mt},o(ee,[2,58],{58:90,60:yt,61:vt,62:kt,63:wt,64:Lt}),o(ne,[2,59]),o(ne,[2,60]),o(ne,[2,61]),o(ne,[2,62]),o(ne,[2,63]),o(re,[2,64]),o(re,[2,65]),o(gt,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:at,89:ot,90:ut},{54:It,56:99},o(gt,[2,54]),o(gt,[2,98]),o(jt,[2,22]),o(jt,[2,23]),o(jt,[2,24]),{16:[1,100]},{25:[2,19]},o(ie,[2,49]),{27:101,28:46,29:47,88:at,89:ot,90:ut,91:pt},{27:102,28:46,29:47,54:[1,103],88:at,89:ot,90:ut,91:pt},o(ee,[2,57],{58:104,60:yt,61:vt,62:kt,63:wt,64:Lt}),o(ee,[2,56]),{28:105,88:at,89:ot,90:ut},{47:106,51:se},{27:108,28:46,29:47,88:at,89:ot,90:ut,91:pt},o(gt,[2,66],{54:[1,109]}),o(gt,[2,68],{54:[1,111],69:[1,110]}),o(gt,[2,72],{54:[1,112],72:[1,113]}),o(gt,[2,76],{54:[1,115],69:[1,114]}),o(gt,[2,80]),o(gt,[2,53]),o(te,[2,11]),o(ie,[2,51]),o(ie,[2,50]),{27:116,28:46,29:47,88:at,89:ot,90:ut,91:pt},o(ee,[2,55]),o(gt,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:se},o(gt,[2,42]),o(gt,[2,67]),o(gt,[2,69]),o(gt,[2,70],{69:[1,120]}),o(gt,[2,73]),o(gt,[2,74],{54:[1,121]}),o(gt,[2,77]),o(gt,[2,78],{69:[1,122]}),o(ie,[2,52]),{47:123,51:se},o(gt,[2,40]),{48:[2,44]},o(gt,[2,71]),o(gt,[2,75]),o(gt,[2,79]),{48:[1,124]},o(gt,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},le={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 27:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 39:case 42:case 45:case 48:case 51:case 54:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 43:return"STR";case 44:this.begin("bqstring");break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 49:return 73;case 50:this.begin("callback_name");break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 55:return 72;case 56:case 57:case 58:case 59:return 69;case 60:case 61:return 61;case 62:case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};function Parser(){this.yy={}}return oe.lexer=le,Parser.prototype=oe,oe.Parser=Parser,new Parser}();tl.parser=tl;const el=tl,classDetector=(i,c)=>{var p;return"dagre-wrapper"!==(null==(p=null==c?void 0:c.class)?void 0:p.defaultRenderer)&&null!==i.match(/^\s*classDiagram/)},classDetectorV2=(i,c)=>{var p;return null!==i.match(/^\s*classDiagram/)&&"dagre-wrapper"===(null==(p=null==c?void 0:c.class)?void 0:p.defaultRenderer)||null!==i.match(/^\s*classDiagram-v2/)},nl="classid-";let rl=[],il={},al=[],sl=0,ol=[];const sanitizeText$2=i=>Ri.sanitizeText(i,getConfig$1()),splitClassNameAndType=function(i){let c="",p=i;if(i.indexOf("~")>0){let b=i.split("~");p=b[0],c=Ri.sanitizeText(b[1],getConfig$1())}return{className:p,type:c}},addClass$1=function(i){let c=splitClassNameAndType(i);void 0===il[c.className]&&(il[c.className]={id:c.className,type:c.type,cssClasses:[],methods:[],members:[],annotations:[],domId:nl+c.className+"-"+sl},sl++)},lookUpDomId$1=function(i){const c=Object.keys(il);for(const p of c)if(il[p].id===i)return il[p].domId},addMember=function(i,c){const p=splitClassNameAndType(i).className,b=il[p];if("string"==typeof c){const i=c.trim();i.startsWith("<<")&&i.endsWith(">>")?b.annotations.push(sanitizeText$2(i.substring(2,i.length-2))):i.indexOf(")")>0?b.methods.push(sanitizeText$2(i)):i&&b.members.push(sanitizeText$2(i))}},setCssClass$1=function(i,c){i.split(",").forEach((function(i){let p=i;i[0].match(/\d/)&&(p=nl+p),void 0!==il[p]&&il[p].cssClasses.push(c)}))},setClickFunc=function(i,c,p){const b=getConfig$1();let _=i,k=lookUpDomId$1(_);if("loose"===b.securityLevel&&void 0!==c&&void 0!==il[_]){let i=[];if("string"==typeof p){i=p.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let c=0;c")),i.classed("hover",!0)})).on("mouseout",(function(){c.transition().duration(500).style("opacity",0);select(this).classed("hover",!1)}))};ol.push(setupToolTips$1);let ll="TB";const cl={parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},setAccTitle:setAccTitle,getAccTitle:getAccTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription,getConfig:()=>getConfig$1().class,addClass:addClass$1,bindFunctions:function(i){ol.forEach((function(c){c(i)}))},clear:function(){rl=[],il={},al=[],ol=[],ol.push(setupToolTips$1),clear$g()},getClass:function(i){return il[i]},getClasses:function(){return il},getNotes:function(){return al},addAnnotation:function(i,c){const p=splitClassNameAndType(i).className;il[p].annotations.push(c)},addNote:function(i,c){const p={id:`note${al.length}`,class:c,text:i};al.push(p)},getRelations:function(){return rl},addRelation:function(i){k.debug("Adding relation: "+JSON.stringify(i)),addClass$1(i.id1),addClass$1(i.id2),i.id1=splitClassNameAndType(i.id1).className,i.id2=splitClassNameAndType(i.id2).className,i.relationTitle1=Ri.sanitizeText(i.relationTitle1.trim(),getConfig$1()),i.relationTitle2=Ri.sanitizeText(i.relationTitle2.trim(),getConfig$1()),rl.push(i)},getDirection:()=>ll,setDirection:i=>{ll=i},addMember:addMember,addMembers:function(i,c){Array.isArray(c)&&(c.reverse(),c.forEach((c=>addMember(i,c))))},cleanupLabel:function(i){return":"===i.substring(0,1)?Ri.sanitizeText(i.substr(1).trim(),getConfig$1()):sanitizeText$2(i.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(i,c,p){i.split(",").forEach((function(i){setClickFunc(i,c,p),il[i].haveCallback=!0})),setCssClass$1(i,"clickable")},setCssClass:setCssClass$1,setLink:function(i,c,p){const b=getConfig$1();i.split(",").forEach((function(i){let _=i;i[0].match(/\d/)&&(_=nl+_),void 0!==il[_]&&(il[_].link=Ns.formatUrl(c,b),"sandbox"===b.securityLevel?il[_].linkTarget="_top":il[_].linkTarget="string"==typeof p?sanitizeText$2(p):"_blank")})),setCssClass$1(i,"clickable")},getTooltip:function(i){return il[i].tooltip},setTooltip:function(i,c){const p=getConfig$1();i.split(",").forEach((function(i){void 0!==c&&(il[i].tooltip=Ri.sanitizeText(c,p))}))},lookUpDomId:lookUpDomId$1,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle};function isObjectLike(i){return null!=i&&"object"==typeof i}function isSymbol(i){return"symbol"==typeof i||isObjectLike(i)&&"[object Symbol]"==baseGetTag(i)}function arrayMap(i,c){for(var p=-1,b=null==i?0:i.length,_=Array(b);++p0){if(++c>=800)return arguments[0]}else c=0;return i.apply(void 0,arguments)}}(Tl?function(i,c){return Tl(i,"toString",{configurable:!0,enumerable:!1,value:constant(c),writable:!0})}:identity);const Sl=Cl;function arrayEach(i,c){for(var p=-1,b=null==i?0:i.length;++p-1}var El=/^(?:0|[1-9]\d*)$/;function isIndex(i,c){var p=typeof i;return!!(c=null==c?9007199254740991:c)&&("number"==p||"symbol"!=p&&El.test(i))&&i>-1&&i%1==0&&i-1&&i%1==0&&i<=9007199254740991}function isArrayLike(i){return null!=i&&isLength(i.length)&&!isFunction(i)}function isIterateeCall(i,c,p){if(!isObject(p))return!1;var b=typeof c;return!!("number"==b?isArrayLike(p)&&isIndex(c,p.length):"string"==b&&c in p)&&eq(p[c],i)}var Dl=Object.prototype;function isPrototype(i){var c=i&&i.constructor;return i===("function"==typeof c&&c.prototype||Dl)}function baseIsArguments(i){return isObjectLike(i)&&"[object Arguments]"==baseGetTag(i)}var Ol=Object.prototype,Nl=Ol.hasOwnProperty,Ml=Ol.propertyIsEnumerable,Il=baseIsArguments(function(){return arguments}())?baseIsArguments:function(i){return isObjectLike(i)&&Nl.call(i,"callee")&&!Ml.call(i,"callee")};const Bl=Il;var Fl="object"==typeof exports&&exports&&!exports.nodeType&&exports,$l=Fl&&"object"==typeof module&&module&&!module.nodeType&&module,Rl=$l&&$l.exports===Fl?es.Buffer:void 0;const Pl=(Rl?Rl.isBuffer:void 0)||function stubFalse(){return!1};var Yl={};function baseUnary(i){return function(c){return i(c)}}Yl["[object Float32Array]"]=Yl["[object Float64Array]"]=Yl["[object Int8Array]"]=Yl["[object Int16Array]"]=Yl["[object Int32Array]"]=Yl["[object Uint8Array]"]=Yl["[object Uint8ClampedArray]"]=Yl["[object Uint16Array]"]=Yl["[object Uint32Array]"]=!0,Yl["[object Arguments]"]=Yl["[object Array]"]=Yl["[object ArrayBuffer]"]=Yl["[object Boolean]"]=Yl["[object DataView]"]=Yl["[object Date]"]=Yl["[object Error]"]=Yl["[object Function]"]=Yl["[object Map]"]=Yl["[object Number]"]=Yl["[object Object]"]=Yl["[object RegExp]"]=Yl["[object Set]"]=Yl["[object String]"]=Yl["[object WeakMap]"]=!1;var jl="object"==typeof exports&&exports&&!exports.nodeType&&exports,zl=jl&&"object"==typeof module&&module&&!module.nodeType&&module,Wl=zl&&zl.exports===jl&&Ja.process;const Ul=function(){try{var i=zl&&zl.require&&zl.require("util").types;return i||Wl&&Wl.binding&&Wl.binding("util")}catch(i){}}();var Hl=Ul&&Ul.isTypedArray;const ql=Hl?baseUnary(Hl):function baseIsTypedArray(i){return isObjectLike(i)&&isLength(i.length)&&!!Yl[baseGetTag(i)]};var Vl=Object.prototype.hasOwnProperty;function arrayLikeKeys(i,c){var p=hl(i),b=!p&&Bl(i),_=!p&&!b&&Pl(i),k=!p&&!b&&!_&&ql(i),w=p||b||_||k,T=w?function baseTimes(i,c){for(var p=-1,b=Array(i);++p0&&p(T)?c>1?baseFlatten(T,c-1,p,b,_):arrayPush(_,T):b||(_[_.length]=T)}return _}function flatten(i){return(null==i?0:i.length)?baseFlatten(i,1):[]}const rc=overArg(Object.getPrototypeOf,Object);var ic=Function.prototype,ac=Object.prototype,sc=ic.toString,oc=ac.hasOwnProperty,lc=sc.call(Object);function isPlainObject(i){if(!isObjectLike(i)||"[object Object]"!=baseGetTag(i))return!1;var c=rc(i);if(null===c)return!0;var p=oc.call(c,"constructor")&&c.constructor;return"function"==typeof p&&p instanceof p&&sc.call(p)==lc}function arrayReduce(i,c,p,b){var _=-1,k=null==i?0:i.length;for(b&&k&&(p=i[++_]);++_T))return!1;var O=k.get(i),N=k.get(c);if(O&&N)return O==c&&N==i;var R=-1,Y=!0,j=2&p?new SetCache:void 0;for(k.set(i,c),k.set(c,i);++R2?c[2]:void 0;for(_&&isIterateeCall(c[0],c[1],_)&&(b=1);++p-1?_[k?c[w]:w]:void 0}}((function findIndex(i,c,p){var b=null==i?0:i.length;if(!b)return-1;var _=null==p?0:function toInteger(i){var c=toFinite(i),p=c%1;return c==c?p?c-p:c:0}(p);return _<0&&(_=rh(b+_,0)),baseFindIndex(i,baseIteratee(c),_)}));function baseMap(i,c){var p=-1,b=isArrayLike(i)?Array(i.length):[];return Jc(i,(function(i,_,k){b[++p]=c(i,_,k)})),b}function map(i,c){return(hl(i)?arrayMap:baseMap)(i,baseIteratee(c))}function baseGt(i,c){return i>c}var ah=Object.prototype.hasOwnProperty;function baseHas(i,c){return null!=i&&ah.call(i,c)}function has(i,c){return null!=i&&hasPath(i,c,baseHas)}function values(i){return null==i?[]:function baseValues(i,c){return arrayMap(c,(function(c){return i[c]}))}(i,keys$1(i))}var sh=Object.prototype.hasOwnProperty;function isEmpty(i){if(null==i)return!0;if(isArrayLike(i)&&(hl(i)||"string"==typeof i||"function"==typeof i.splice||Pl(i)||ql(i)||Bl(i)))return!i.length;var c=Oc(i);if("[object Map]"==c||"[object Set]"==c)return!i.size;if(isPrototype(i))return!baseKeys(i).length;for(var p in i)if(sh.call(i,p))return!1;return!0}function isUndefined(i){return void 0===i}function baseLt(i,c){return i1?p[_-1]:void 0,w=_>2?p[2]:void 0;for(k=i.length>3&&"function"==typeof k?(_--,k):void 0,w&&isIterateeCall(p[0],p[1],w)&&(k=_<3?void 0:k,_=1),c=Object(c);++b<_;){var T=p[b];T&&i(c,T,b,k)}return c}))}((function(i,c,p){baseMerge(i,c,p)}));function min(i){return i&&i.length?baseExtremum(i,identity,baseLt):void 0}function minBy(i,c){return i&&i.length?baseExtremum(i,baseIteratee(c),baseLt):void 0}function baseSet(i,c,p,b){if(!isObject(i))return i;for(var _=-1,k=(c=castPath(c,i)).length,w=k-1,T=i;null!=T&&++_c||k&&w&&S&&!T&&!O||b&&w&&S||!p&&S||!_)return 1;if(!b&&!k&&!O&&i=T?S:S*("desc"==p[b]?-1:1)}return i.index-c.index}(i,c,p)}))}function basePick(i,c){return function basePickBy(i,c,p){for(var b=-1,_=c.length,k={};++b<_;){var w=c[b],T=baseGet(i,w);p(T,w)&&baseSet(k,castPath(w,i),T)}return k}(i,c,(function(c,p){return hasIn(i,p)}))}const lh=function flatRest(i){return Sl(overRest(i,void 0,flatten),i+"")}((function(i,c){return null==i?{}:basePick(i,c)}));var ch=Math.ceil,hh=Math.max;const uh=function createRange(i){return function(c,p,b){return b&&"number"!=typeof b&&isIterateeCall(c,p,b)&&(p=b=void 0),c=toFinite(c),void 0===p?(p=c,c=0):p=toFinite(p),function baseRange(i,c,p,b){for(var _=-1,k=hh(ch((c-i)/(p||1)),0),w=Array(k);k--;)w[b?k:++_]=i,i+=p;return w}(c,p,b=void 0===b?c1&&isIterateeCall(i,c[0],c[1])?c=[]:p>2&&isIterateeCall(c[0],c[1],c[2])&&(c=[c[0]]),baseOrderBy(i,baseFlatten(c,1),[])}));const ph=_c&&1/setToArray(new _c([,-0]))[1]==1/0?function(i){return new _c(i)}:function noop(){};const fh=baseRest((function(i){return function baseUniq(i,c,p){var b=-1,_=arrayIncludes,k=i.length,w=!0,T=[],S=T;if(p)w=!1,_=arrayIncludesWith;else if(k>=200){var O=c?null:ph(i);if(O)return setToArray(O);w=!1,_=cacheHas,S=new SetCache}else S=c?[]:T;t:for(;++b1?b.setNode(i,c):b.setNode(i)})),this}setNode(i,c){return has(this._nodes,i)?(arguments.length>1&&(this._nodes[i]=c),this):(this._nodes[i]=arguments.length>1?c:this._defaultNodeLabelFn(i),this._isCompound&&(this._parent[i]=yh,this._children[i]={},this._children["\0"][i]=!0),this._in[i]={},this._preds[i]={},this._out[i]={},this._sucs[i]={},++this._nodeCount,this)}node(i){return this._nodes[i]}hasNode(i){return has(this._nodes,i)}removeNode(i){var c=this;if(has(this._nodes,i)){var removeEdge=function(i){c.removeEdge(c._edgeObjs[i])};delete this._nodes[i],this._isCompound&&(this._removeFromParentsChildList(i),delete this._parent[i],forEach(this.children(i),(function(i){c.setParent(i)})),delete this._children[i]),forEach(keys$1(this._in[i]),removeEdge),delete this._in[i],delete this._preds[i],forEach(keys$1(this._out[i]),removeEdge),delete this._out[i],delete this._sucs[i],--this._nodeCount}return this}setParent(i,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(isUndefined(c))c=yh;else{for(var p=c+="";!isUndefined(p);p=this.parent(p))if(p===i)throw new Error("Setting "+c+" as parent of "+i+" would create a cycle");this.setNode(c)}return this.setNode(i),this._removeFromParentsChildList(i),this._parent[i]=c,this._children[c][i]=!0,this}_removeFromParentsChildList(i){delete this._children[this._parent[i]][i]}parent(i){if(this._isCompound){var c=this._parent[i];if(c!==yh)return c}}children(i){if(isUndefined(i)&&(i=yh),this._isCompound){var c=this._children[i];if(c)return keys$1(c)}else{if(i===yh)return this.nodes();if(this.hasNode(i))return[]}}predecessors(i){var c=this._preds[i];if(c)return keys$1(c)}successors(i){var c=this._sucs[i];if(c)return keys$1(c)}neighbors(i){var c=this.predecessors(i);if(c)return fh(c,this.successors(i))}isLeaf(i){return 0===(this.isDirected()?this.successors(i):this.neighbors(i)).length}filterNodes(i){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var p=this;forEach(this._nodes,(function(p,b){i(b)&&c.setNode(b,p)})),forEach(this._edgeObjs,(function(i){c.hasNode(i.v)&&c.hasNode(i.w)&&c.setEdge(i,p.edge(i))}));var b={};function findParent(i){var _=p.parent(i);return void 0===_||c.hasNode(_)?(b[i]=_,_):_ in b?b[_]:findParent(_)}return this._isCompound&&forEach(c.nodes(),(function(i){c.setParent(i,findParent(i))})),c}setDefaultEdgeLabel(i){return isFunction(i)||(i=constant(i)),this._defaultEdgeLabelFn=i,this}edgeCount(){return this._edgeCount}edges(){return values(this._edgeObjs)}setPath(i,c){var p=this,b=arguments;return reduce(i,(function(i,_){return b.length>1?p.setEdge(i,_,c):p.setEdge(i,_),_})),this}setEdge(){var i,c,p,b,_=!1,k=arguments[0];"object"==typeof k&&null!==k&&"v"in k?(i=k.v,c=k.w,p=k.name,2===arguments.length&&(b=arguments[1],_=!0)):(i=k,c=arguments[1],p=arguments[3],arguments.length>2&&(b=arguments[2],_=!0)),i=""+i,c=""+c,isUndefined(p)||(p=""+p);var w=edgeArgsToId(this._isDirected,i,c,p);if(has(this._edgeLabels,w))return _&&(this._edgeLabels[w]=b),this;if(!isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(c),this._edgeLabels[w]=_?b:this._defaultEdgeLabelFn(i,c,p);var T=function edgeArgsToObj(i,c,p,b){var _=""+c,k=""+p;if(!i&&_>k){var w=_;_=k,k=w}var T={v:_,w:k};b&&(T.name=b);return T}(this._isDirected,i,c,p);return i=T.v,c=T.w,Object.freeze(T),this._edgeObjs[w]=T,incrementOrInitEntry(this._preds[c],i),incrementOrInitEntry(this._sucs[i],c),this._in[c][w]=T,this._out[i][w]=T,this._edgeCount++,this}edge(i,c,p){var b=1===arguments.length?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,i,c,p);return this._edgeLabels[b]}hasEdge(i,c,p){var b=1===arguments.length?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,i,c,p);return has(this._edgeLabels,b)}removeEdge(i,c,p){var b=1===arguments.length?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,i,c,p),_=this._edgeObjs[b];return _&&(i=_.v,c=_.w,delete this._edgeLabels[b],delete this._edgeObjs[b],decrementOrRemoveEntry(this._preds[c],i),decrementOrRemoveEntry(this._sucs[i],c),delete this._in[c][b],delete this._out[i][b],this._edgeCount--),this}inEdges(i,c){var p=this._in[i];if(p){var b=values(p);return c?filter(b,(function(i){return i.v===c})):b}}outEdges(i,c){var p=this._out[i];if(p){var b=values(p);return c?filter(b,(function(i){return i.w===c})):b}}nodeEdges(i,c){var p=this.inEdges(i,c);if(p)return p.concat(this.outEdges(i,c))}}function incrementOrInitEntry(i,c){i[c]?i[c]++:i[c]=1}function decrementOrRemoveEntry(i,c){--i[c]||delete i[c]}function edgeArgsToId(i,c,p,b){var _=""+c,k=""+p;if(!i&&_>k){var w=_;_=k,k=w}return _+""+k+""+(isUndefined(b)?"\0":b)}function edgeObjToId(i,c){return edgeArgsToId(i,c.v,c.w,c.name)}Graph.prototype._nodeCount=0,Graph.prototype._edgeCount=0;class List{constructor(){var i={};i._next=i._prev=i,this._sentinel=i}dequeue(){var i=this._sentinel,c=i._prev;if(c!==i)return unlink(c),c}enqueue(i){var c=this._sentinel;i._prev&&i._next&&unlink(i),i._next=c._next,c._next._prev=i,c._next=i,i._prev=c}toString(){for(var i=[],c=this._sentinel,p=c._prev;p!==c;)i.push(JSON.stringify(p,filterOutLinks)),p=p._prev;return"["+i.join(", ")+"]"}}function unlink(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function filterOutLinks(i,c){if("_next"!==i&&"_prev"!==i)return c}var mh=constant(1);function greedyFAS(i,c){if(i.nodeCount()<=1)return[];var p=function buildState(i,c){var p=new Graph,b=0,_=0;forEach(i.nodes(),(function(i){p.setNode(i,{v:i,in:0,out:0})})),forEach(i.edges(),(function(i){var k=p.edge(i.v,i.w)||0,w=c(i),T=k+w;p.setEdge(i.v,i.w,T),_=Math.max(_,p.node(i.v).out+=w),b=Math.max(b,p.node(i.w).in+=w)}));var k=uh(_+b+3).map((function(){return new List})),w=b+1;return forEach(p.nodes(),(function(i){assignBucket(k,w,p.node(i))})),{graph:p,buckets:k,zeroIdx:w}}(i,c||mh),b=function doGreedyFAS(i,c,p){var b,_=[],k=c[c.length-1],w=c[0];for(;i.nodeCount();){for(;b=w.dequeue();)removeNode(i,c,p,b);for(;b=k.dequeue();)removeNode(i,c,p,b);if(i.nodeCount())for(var T=c.length-2;T>0;--T)if(b=c[T].dequeue()){_=_.concat(removeNode(i,c,p,b,!0));break}}return _}(p.graph,p.buckets,p.zeroIdx);return flatten(map(b,(function(c){return i.outEdges(c.v,c.w)})))}function removeNode(i,c,p,b,_){var k=_?[]:void 0;return forEach(i.inEdges(b.v),(function(b){var w=i.edge(b),T=i.node(b.v);_&&k.push({v:b.v,w:b.w}),T.out-=w,assignBucket(c,p,T)})),forEach(i.outEdges(b.v),(function(b){var _=i.edge(b),k=b.w,w=i.node(k);w.in-=_,assignBucket(c,p,w)})),i.removeNode(b.v),k}function assignBucket(i,c,p){p.out?p.in?i[p.out-p.in+c].enqueue(p):i[i.length-1].enqueue(p):i[0].enqueue(p)}function run$2(i){var c="greedy"===i.graph().acyclicer?greedyFAS(i,function weightFn(i){return function(c){return i.edge(c).weight}}(i)):function dfsFAS(i){var c=[],p={},b={};function dfs2(_){has(b,_)||(b[_]=!0,p[_]=!0,forEach(i.outEdges(_),(function(i){has(p,i.w)?c.push(i):dfs2(i.w)})),delete p[_])}return forEach(i.nodes(),dfs2),c}(i);forEach(c,(function(c){var p=i.edge(c);i.removeEdge(c),p.forwardName=c.name,p.reversed=!0,i.setEdge(c.w,c.v,p,uniqueId("rev"))}))}function addDummyNode(i,c,p,b){var _;do{_=uniqueId(b)}while(i.hasNode(_));return p.dummy=c,i.setNode(_,p),_}function asNonCompoundGraph(i){var c=new Graph({multigraph:i.isMultigraph()}).setGraph(i.graph());return forEach(i.nodes(),(function(p){i.children(p).length||c.setNode(p,i.node(p))})),forEach(i.edges(),(function(p){c.setEdge(p,i.edge(p))})),c}function intersectRect$3(i,c){var p,b,_=i.x,k=i.y,w=c.x-_,T=c.y-k,S=i.width/2,O=i.height/2;if(!w&&!T)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(T)*S>Math.abs(w)*O?(T<0&&(O=-O),p=O*w/T,b=O):(w<0&&(S=-S),p=S,b=S*T/w),{x:_+p,y:k+b}}function buildLayerMatrix(i){var c=map(uh(maxRank(i)+1),(function(){return[]}));return forEach(i.nodes(),(function(p){var b=i.node(p),_=b.rank;isUndefined(_)||(c[_][b.order]=p)})),c}function addBorderNode$1(i,c,p,b){var _={width:0,height:0};return arguments.length>=4&&(_.rank=p,_.order=b),addDummyNode(i,"border",_,c)}function maxRank(i){return max(map(i.nodes(),(function(c){var p=i.node(c).rank;if(!isUndefined(p))return p})))}function time(i,c){var p=now$1();try{return c()}finally{console.log(i+" time: "+(now$1()-p)+"ms")}}function notime(i,c){return c()}function addBorderNode(i,c,p,b,_,k){var w={width:0,height:0,rank:k,borderType:c},T=_[c][k-1],S=addDummyNode(i,"border",w,p);_[c][k]=S,i.setParent(S,b),T&&i.setEdge(T,S,{weight:1})}function undo$1(i){var c=i.graph().rankdir.toLowerCase();"bt"!==c&&"rl"!==c||function reverseY(i){forEach(i.nodes(),(function(c){reverseYOne(i.node(c))})),forEach(i.edges(),(function(c){var p=i.edge(c);forEach(p.points,reverseYOne),has(p,"y")&&reverseYOne(p)}))}(i),"lr"!==c&&"rl"!==c||(!function swapXY(i){forEach(i.nodes(),(function(c){swapXYOne(i.node(c))})),forEach(i.edges(),(function(c){var p=i.edge(c);forEach(p.points,swapXYOne),has(p,"x")&&swapXYOne(p)}))}(i),swapWidthHeight(i))}function swapWidthHeight(i){forEach(i.nodes(),(function(c){swapWidthHeightOne(i.node(c))})),forEach(i.edges(),(function(c){swapWidthHeightOne(i.edge(c))}))}function swapWidthHeightOne(i){var c=i.width;i.width=i.height,i.height=c}function reverseYOne(i){i.y=-i.y}function swapXYOne(i){var c=i.x;i.x=i.y,i.y=c}function run$1(i){var c=addDummyNode(i,"root",{},"_root"),p=function treeDepths(i){var c={};function dfs2(p,b){var _=i.children(p);_&&_.length&&forEach(_,(function(i){dfs2(i,b+1)})),c[p]=b}return forEach(i.children(),(function(i){dfs2(i,1)})),c}(i),b=max(values(p))-1,_=2*b+1;i.graph().nestingRoot=c,forEach(i.edges(),(function(c){i.edge(c).minlen*=_}));var k=function sumWeights(i){return reduce(i.edges(),(function(c,p){return c+i.edge(p).weight}),0)}(i)+1;forEach(i.children(),(function(w){dfs$1(i,c,_,k,b,p,w)})),i.graph().nodeRankFactor=_}function dfs$1(i,c,p,b,_,k,w){var T=i.children(w);if(T.length){var S=addBorderNode$1(i,"_bt"),O=addBorderNode$1(i,"_bb"),N=i.node(w);i.setParent(S,w),N.borderTop=S,i.setParent(O,w),N.borderBottom=O,forEach(T,(function(T){dfs$1(i,c,p,b,_,k,T);var N=i.node(T),R=N.borderTop?N.borderTop:T,Y=N.borderBottom?N.borderBottom:T,j=N.borderTop?b:2*b,z=R!==Y?1:_-k[w]+1;i.setEdge(S,R,{weight:j,minlen:z,nestingEdge:!0}),i.setEdge(Y,O,{weight:j,minlen:z,nestingEdge:!0})})),i.parent(w)||i.setEdge(c,S,{weight:0,minlen:_+k[w]})}else w!==c&&i.setEdge(c,w,{weight:0,minlen:p})}function buildLayerGraph(i,c,p){var b=function createRootNode(i){var c;for(;i.hasNode(c=uniqueId("_root")););return c}(i),_=new Graph({compound:!0}).setGraph({root:b}).setDefaultNodeLabel((function(c){return i.node(c)}));return forEach(i.nodes(),(function(k){var w=i.node(k),T=i.parent(k);(w.rank===c||w.minRank<=c&&c<=w.maxRank)&&(_.setNode(k),_.setParent(k,T||b),forEach(i[p](k),(function(c){var p=c.v===k?c.w:c.v,b=_.edge(p,k),w=isUndefined(b)?0:b.weight;_.setEdge(p,k,{weight:i.edge(c).weight+w})})),has(w,"minRank")&&_.setNode(k,{borderLeft:w.borderLeft[c],borderRight:w.borderRight[c]}))})),_}function crossCount(i,c){for(var p=0,b=1;b0;)c%2&&(p+=T[c+1]),T[c=c-1>>1]+=i.weight;S+=i.weight*p}))),S}function resolveConflicts(i,c){var p={};return forEach(i,(function(i,c){var b=p[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:c};isUndefined(i.barycenter)||(b.barycenter=i.barycenter,b.weight=i.weight)})),forEach(c.edges(),(function(i){var c=p[i.v],b=p[i.w];isUndefined(c)||isUndefined(b)||(b.indegree++,c.out.push(p[i.w]))})),function doResolveConflicts(i){var c=[];function handleIn(i){return function(c){c.merged||(isUndefined(c.barycenter)||isUndefined(i.barycenter)||c.barycenter>=i.barycenter)&&function mergeEntries(i,c){var p=0,b=0;i.weight&&(p+=i.barycenter*i.weight,b+=i.weight);c.weight&&(p+=c.barycenter*c.weight,b+=c.weight);i.vs=c.vs.concat(i.vs),i.barycenter=p/b,i.weight=b,i.i=Math.min(c.i,i.i),c.merged=!0}(i,c)}}function handleOut(c){return function(p){p.in.push(c),0==--p.indegree&&i.push(p)}}for(;i.length;){var p=i.pop();c.push(p),forEach(p.in.reverse(),handleIn(p)),forEach(p.out,handleOut(p))}return map(filter(c,(function(i){return!i.merged})),(function(i){return lh(i,["vs","i","barycenter","weight"])}))}(filter(p,(function(i){return!i.indegree})))}function sort(i,c){var p=function partition(i,c){var p={lhs:[],rhs:[]};return forEach(i,(function(i){c(i)?p.lhs.push(i):p.rhs.push(i)})),p}(i,(function(i){return has(i,"barycenter")})),b=p.lhs,_=dh(p.rhs,(function(i){return-i.i})),k=[],w=0,T=0,S=0;b.sort(function compareWithBias(i){return function(c,p){return c.barycenterp.barycenter?1:i?p.i-c.i:c.i-p.i}}(!!c)),S=consumeUnsortable(k,_,S),forEach(b,(function(i){S+=i.vs.length,k.push(i.vs),w+=i.barycenter*i.weight,T+=i.weight,S=consumeUnsortable(k,_,S)}));var O={vs:flatten(k)};return T&&(O.barycenter=w/T,O.weight=T),O}function consumeUnsortable(i,c,p){for(var b;c.length&&(b=last(c)).i<=p;)c.pop(),i.push(b.vs),p++;return p}function sortSubgraph(i,c,p,b){var _=i.children(c),k=i.node(c),w=k?k.borderLeft:void 0,T=k?k.borderRight:void 0,S={};w&&(_=filter(_,(function(i){return i!==w&&i!==T})));var O=function barycenter(i,c){return map(c,(function(c){var p=i.inEdges(c);if(p.length){var b=reduce(p,(function(c,p){var b=i.edge(p),_=i.node(p.v);return{sum:c.sum+b.weight*_.order,weight:c.weight+b.weight}}),{sum:0,weight:0});return{v:c,barycenter:b.sum/b.weight,weight:b.weight}}return{v:c}}))}(i,_);forEach(O,(function(c){if(i.children(c.v).length){var _=sortSubgraph(i,c.v,p,b);S[c.v]=_,has(_,"barycenter")&&function mergeBarycenters(i,c){isUndefined(i.barycenter)?(i.barycenter=c.barycenter,i.weight=c.weight):(i.barycenter=(i.barycenter*i.weight+c.barycenter*c.weight)/(i.weight+c.weight),i.weight+=c.weight)}(c,_)}}));var N=resolveConflicts(O,p);!function expandSubgraphs(i,c){forEach(i,(function(i){i.vs=flatten(i.vs.map((function(i){return c[i]?c[i].vs:i})))}))}(N,S);var R=sort(N,b);if(w&&(R.vs=flatten([w,R.vs,T]),i.predecessors(w).length)){var Y=i.node(i.predecessors(w)[0]),j=i.node(i.predecessors(T)[0]);has(R,"barycenter")||(R.barycenter=0,R.weight=0),R.barycenter=(R.barycenter*R.weight+Y.order+j.order)/(R.weight+2),R.weight+=2}return R}function order(i){var c=maxRank(i),p=buildLayerGraphs(i,uh(1,c+1),"inEdges"),b=buildLayerGraphs(i,uh(c-1,-1,-1),"outEdges"),_=function initOrder(i){var c={},p=filter(i.nodes(),(function(c){return!i.children(c).length})),b=max(map(p,(function(c){return i.node(c).rank}))),_=map(uh(b+1),(function(){return[]}));return forEach(dh(p,(function(c){return i.node(c).rank})),(function dfs2(p){if(!has(c,p)){c[p]=!0;var b=i.node(p);_[b.rank].push(p),forEach(i.successors(p),dfs2)}})),_}(i);assignOrder(i,_);for(var k,w=Number.POSITIVE_INFINITY,T=0,S=0;S<4;++T,++S){sweepLayerGraphs(T%2?p:b,T%4>=2);var O=crossCount(i,_=buildLayerMatrix(i));OS||O>c[_].lim));k=_,_=b;for(;(_=i.parent(_))!==k;)T.push(_);return{path:w.concat(T.reverse()),lca:k}}(i,c,_.v,_.w),w=k.path,T=k.lca,S=0,O=w[S],N=!0;p!==_.w;){if(b=i.node(p),N){for(;(O=w[S])!==T&&i.node(O).maxRankp){var b=c;c=p,p=b}var _=i[c];_||(i[c]=_={}),_[p]=!0}function hasConflict(i,c,p){if(c>p){var b=c;c=p,p=b}return has(i[c],p)}function horizontalCompaction(i,c,p,b,_){var k={},w=function buildBlockGraph(i,c,p,b){var _=new Graph,k=i.graph(),w=function sep(i,c,p){return function(b,_,k){var w,T=b.node(_),S=b.node(k),O=0;if(O+=T.width/2,has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":w=-T.width/2;break;case"r":w=T.width/2}if(w&&(O+=p?w:-w),w=0,O+=(T.dummy?c:i)/2,O+=(S.dummy?c:i)/2,O+=S.width/2,has(S,"labelpos"))switch(S.labelpos.toLowerCase()){case"l":w=S.width/2;break;case"r":w=-S.width/2}return w&&(O+=p?w:-w),w=0,O}}(k.nodesep,k.edgesep,b);return forEach(c,(function(c){var b;forEach(c,(function(c){var k=p[c];if(_.setNode(k),b){var T=p[b],S=_.edge(T,k);_.setEdge(T,k,Math.max(w(i,c,b),S||0))}b=c}))})),_}(i,c,p,_),T=_?"borderLeft":"borderRight";function iterate(i,c){for(var p=w.nodes(),b=p.pop(),_={};b;)_[b]?i(b):(_[b]=!0,p.push(b),p=p.concat(c(b))),b=p.pop()}return iterate((function pass1(i){k[i]=w.inEdges(i).reduce((function(i,c){return Math.max(i,k[c.v]+w.edge(c))}),0)}),w.predecessors.bind(w)),iterate((function pass2(c){var p=w.outEdges(c).reduce((function(i,c){return Math.min(i,k[c.w]-w.edge(c))}),Number.POSITIVE_INFINITY),b=i.node(c);p!==Number.POSITIVE_INFINITY&&b.borderType!==T&&(k[c]=Math.max(k[c],p))}),w.successors.bind(w)),forEach(b,(function(i){k[i]=k[p[i]]})),k}function findSmallestWidthAlignment(i,c){return minBy(values(c),(function(c){var p=Number.NEGATIVE_INFINITY,b=Number.POSITIVE_INFINITY;return function forIn(i,c){return null==i?i:Qc(i,castFunction(c),keysIn)}(c,(function(c,_){var k=function width$1(i,c){return i.node(c).width}(i,_)/2;p=Math.max(c+k,p),b=Math.min(c-k,b)})),p-b}))}function positionX(i){var c,p=buildLayerMatrix(i),b=oh(findType1Conflicts(i,p),function findType2Conflicts(i,c){var p={};function scan(c,b,_,k,w){var T;forEach(uh(b,_),(function(b){T=c[b],i.node(T).dummy&&forEach(i.predecessors(T),(function(c){var b=i.node(c);b.dummy&&(b.orderw)&&addConflict(p,c,T)}))}))}return reduce(c,(function visitLayer(c,p){var b,_=-1,k=0;return forEach(p,(function(w,T){if("border"===i.node(w).dummy){var S=i.predecessors(w);S.length&&(b=i.node(S[0]).order,scan(p,k,T,_,b),k=T,_=b)}scan(p,k,p.length,b,c.length)})),p})),p}(i,p)),_={};forEach(["u","d"],(function(k){c="u"===k?p:values(p).reverse(),forEach(["l","r"],(function(p){"r"===p&&(c=map(c,(function(i){return values(i).reverse()})));var w=("u"===k?i.predecessors:i.successors).bind(i),T=function verticalAlignment(i,c,p,b){var _={},k={},w={};return forEach(c,(function(i){forEach(i,(function(i,c){_[i]=i,k[i]=i,w[i]=c}))})),forEach(c,(function(i){var c=-1;forEach(i,(function(i){var T=b(i);if(T.length)for(var S=((T=dh(T,(function(i){return w[i]}))).length-1)/2,O=Math.floor(S),N=Math.ceil(S);O<=N;++O){var R=T[O];k[i]===i&&cw.lim&&(T=w,S=!0),minBy(filter(c.edges(),(function(c){return S===isDescendant$1(i,i.node(c.v),T)&&S!==isDescendant$1(i,i.node(c.w),T)})),(function(i){return slack(c,i)}))}function exchangeEdges(i,c,p,b){var _=p.v,k=p.w;i.removeEdge(_,k),i.setEdge(b.v,b.w,{}),initLowLimValues(i),initCutValues(i,c),function updateRanks(i,c){var p=ih(i.nodes(),(function(i){return!c.node(i).parent})),b=function preorder(i,c){return dfs(i,c,"pre")}(i,p);forEach(b=b.slice(1),(function(p){var b=i.node(p).parent,_=c.edge(p,b),k=!1;_||(_=c.edge(b,p),k=!0),c.node(p).rank=c.node(b).rank+(k?_.minlen:-_.minlen)}))}(i,c)}function isDescendant$1(i,c,p){return p.low<=c.lim&&c.lim<=p.lim}new Error,networkSimplex.initLowLimValues=initLowLimValues,networkSimplex.initCutValues=initCutValues,networkSimplex.calcCutValue=calcCutValue,networkSimplex.leaveEdge=leaveEdge,networkSimplex.enterEdge=enterEdge,networkSimplex.exchangeEdges=exchangeEdges;var Sh=longestPath;function networkSimplexRanker(i){networkSimplex(i)}let Eh=0;const parseMember=function(i){let c=i.match(/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/),p=i.match(/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/);return c&&!p?buildFieldDisplay(c):p?buildMethodDisplay(p):buildLegacyDisplay(i)},buildFieldDisplay=function(i){let c="",p="";try{let b=i[1]?i[1].trim():"",_=i[2]?i[2].trim():"",k=i[3]?parseGenericTypes(i[3].trim()):"",w=i[4]?i[4].trim():"",T=i[5]?i[5].trim():"";p=b+_+k+" "+w,c=parseClassifier(T)}catch(c){p=i}return{displayText:p,cssStyle:c}},buildMethodDisplay=function(i){let c="",p="";try{let b=i[1]?i[1].trim():"",_=i[2]?i[2].trim():"",k=i[3]?parseGenericTypes(i[3].trim()):"",w=i[4]?i[4].trim():"";p=b+_+"("+k+")"+(i[5]?" : "+parseGenericTypes(i[5]).trim():""),c=parseClassifier(w)}catch(c){p=i}return{displayText:p,cssStyle:c}},buildLegacyDisplay=function(i){let c="",p="",b="",_=i.indexOf("("),k=i.indexOf(")");if(_>1&&k>_&&k<=i.length){let w="",T="",S=i.substring(0,1);S.match(/\w/)?T=i.substring(0,_).trim():(S.match(/[#+~-]/)&&(w=S),T=i.substring(1,_).trim());const O=i.substring(_+1,k);i.substring(k+1,1),p=parseClassifier(i.substring(k+1,k+2)),c=w+T+"("+parseGenericTypes(O.trim())+")",k");const R=S.append("tspan").text(N).attr("class","title");O||R.attr("dy",p.textHeight);const Y=S.node().getBBox().height,j=T.append("line").attr("x1",0).attr("y1",p.padding+Y+p.dividerMargin/2).attr("y2",p.padding+Y+p.dividerMargin/2),z=T.append("text").attr("x",p.padding).attr("y",Y+p.dividerMargin+p.textHeight).attr("fill","white").attr("class","classText");O=!0,c.members.forEach((function(i){addTspan(z,i,O,p),O=!1}));const U=z.node().getBBox(),H=T.append("line").attr("x1",0).attr("y1",p.padding+Y+p.dividerMargin+U.height).attr("y2",p.padding+Y+p.dividerMargin+U.height),Z=T.append("text").attr("x",p.padding).attr("y",Y+2*p.dividerMargin+U.height+p.textHeight).attr("fill","white").attr("class","classText");O=!0,c.methods.forEach((function(i){addTspan(Z,i,O,p),O=!1}));const K=T.node().getBBox();var J=" ";c.cssClasses.length>0&&(J+=c.cssClasses.join(" "));const tt=T.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",K.width+2*p.padding).attr("height",K.height+p.padding+.5*p.dividerMargin).attr("class",J).node().getBBox().width;return S.node().childNodes.forEach((function(i){i.setAttribute("x",(tt-i.getBBox().width)/2)})),c.tooltip&&S.insert("title").text(c.tooltip),j.attr("x2",tt),H.attr("x2",tt),w.width=tt,w.height=K.height+p.padding+.5*p.dividerMargin,w},svgDraw$2_drawEdge=function(i,c,p,b,_){const getRelationType=function(i){switch(i){case _.db.relationType.AGGREGATION:return"aggregation";case _.db.relationType.EXTENSION:return"extension";case _.db.relationType.COMPOSITION:return"composition";case _.db.relationType.DEPENDENCY:return"dependency";case _.db.relationType.LOLLIPOP:return"lollipop"}};c.points=c.points.filter((i=>!Number.isNaN(i.y)));const w=c.points,T=line$1().x((function(i){return i.x})).y((function(i){return i.y})).curve(curveBasis),S=i.append("path").attr("d",T(w)).attr("id","edge"+Eh).attr("class","relation");let O,N,R="";b.arrowMarkerAbsolute&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\("),R=R.replace(/\)/g,"\\)")),1==p.relation.lineType&&S.attr("class","relation dashed-line"),10==p.relation.lineType&&S.attr("class","relation dotted-line"),"none"!==p.relation.type1&&S.attr("marker-start","url("+R+"#"+getRelationType(p.relation.type1)+"Start)"),"none"!==p.relation.type2&&S.attr("marker-end","url("+R+"#"+getRelationType(p.relation.type2)+"End)");const Y=c.points.length;let j,z,U,H,Z=Ns.calcLabelPosition(c.points);if(O=Z.x,N=Z.y,Y%2!=0&&Y>1){let i=Ns.calcCardinalityPosition("none"!==p.relation.type1,c.points,c.points[0]),b=Ns.calcCardinalityPosition("none"!==p.relation.type2,c.points,c.points[Y-1]);k.debug("cardinality_1_point "+JSON.stringify(i)),k.debug("cardinality_2_point "+JSON.stringify(b)),j=i.x,z=i.y,U=b.x,H=b.y}if(void 0!==p.title){const c=i.append("g").attr("class","classLabel"),_=c.append("text").attr("class","label").attr("x",O).attr("y",N).attr("fill","red").attr("text-anchor","middle").text(p.title);window.label=_;const k=_.node().getBBox();c.insert("rect",":first-child").attr("class","box").attr("x",k.x-b.padding/2).attr("y",k.y-b.padding/2).attr("width",k.width+b.padding).attr("height",k.height+b.padding)}if(k.info("Rendering relation "+JSON.stringify(p)),void 0!==p.relationTitle1&&"none"!==p.relationTitle1){i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",j).attr("y",z).attr("fill","black").attr("font-size","6").text(p.relationTitle1)}if(void 0!==p.relationTitle2&&"none"!==p.relationTitle2){i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",U).attr("y",H).attr("fill","black").attr("font-size","6").text(p.relationTitle2)}Eh++},svgDraw$2_drawNote=function(i,c,p,b){k.debug("Rendering note ",c,p);const _=c.id,w={id:_,text:c.text,width:0,height:0},T=i.append("g").attr("id",_).attr("class","classGroup");let S=T.append("text").attr("y",p.textHeight+p.padding).attr("x",0);const O=JSON.parse(`"${c.text}"`).split("\n");O.forEach((function(i){k.debug(`Adding line: ${i}`),S.append("tspan").text(i).attr("class","title").attr("dy",p.textHeight)}));const N=T.node().getBBox(),R=T.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",N.width+2*p.padding).attr("height",N.height+O.length*p.textHeight+p.padding+.5*p.dividerMargin).node().getBBox().width;return S.node().childNodes.forEach((function(i){i.setAttribute("x",(R-i.getBBox().width)/2)})),w.width=R,w.height=N.height+O.length*p.textHeight+p.padding+.5*p.dividerMargin,w};let Ah={};const getGraphId=function(i){const c=Object.entries(Ah).find((c=>c[1].label===i));if(c)return c[0]},Lh={draw:function(i,c,p,b){const _=getConfig$1().class;Ah={},k.info("Rendering diagram "+i);const w=getConfig$1().securityLevel;let T;"sandbox"===w&&(T=select("#i"+c));const S=select("sandbox"===w?T.nodes()[0].contentDocument.body:"body"),O=S.select(`[id='${c}']`);var N;(N=O).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),N.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),N.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),N.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),N.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),N.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),N.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),N.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");const R=new Graph({multigraph:!0});R.setGraph({isMultiGraph:!0}),R.setDefaultEdgeLabel((function(){return{}}));const Y=b.db.getClasses(),j=Object.keys(Y);for(const i of j){const c=Y[i],p=svgDraw$2_drawClass(O,c,_,b);Ah[p.id]=p,R.setNode(p.id,p),k.info("Org height: "+p.height)}b.db.getRelations().forEach((function(i){k.info("tjoho"+getGraphId(i.id1)+getGraphId(i.id2)+JSON.stringify(i)),R.setEdge(getGraphId(i.id1),getGraphId(i.id2),{relation:i},i.title||"DEFAULT")}));b.db.getNotes().forEach((function(i){k.debug(`Adding note: ${JSON.stringify(i)}`);const c=svgDraw$2_drawNote(O,i,_,b);Ah[c.id]=c,R.setNode(c.id,c),i.class&&i.class in Y&&R.setEdge(i.id,getGraphId(i.class),{relation:{id1:i.id,id2:i.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),layout(R),R.nodes().forEach((function(i){void 0!==i&&void 0!==R.node(i)&&(k.debug("Node "+i+": "+JSON.stringify(R.node(i))),S.select("#"+(b.db.lookUpDomId(i)||i)).attr("transform","translate("+(R.node(i).x-R.node(i).width/2)+","+(R.node(i).y-R.node(i).height/2)+" )"))})),R.edges().forEach((function(i){void 0!==i&&void 0!==R.edge(i)&&(k.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(R.edge(i))),svgDraw$2_drawEdge(O,R.edge(i),R.edge(i).relation,_,b))}));const z=O.node().getBBox(),U=z.width+40,H=z.height+40;configureSvgSize(O,H,U,_.useMaxWidth);const Z=`${z.x-20} ${z.y-20} ${U} ${H}`;k.debug(`viewBox ${Z}`),O.attr("viewBox",Z)}};function write(i){var c={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:writeNodes(i),edges:writeEdges(i)};return isUndefined(i.graph())||(c.value=function clone$1(i){return baseClone(i,4)}(i.graph())),c}function writeNodes(i){return map(i.nodes(),(function(c){var p=i.node(c),b=i.parent(c),_={v:c};return isUndefined(p)||(_.value=p),isUndefined(b)||(_.parent=b),_}))}function writeEdges(i){return map(i.edges(),(function(c){var p=i.edge(c),b={v:c.v,w:c.w};return isUndefined(c.name)||(b.name=c.name),isUndefined(p)||(b.value=p),b}))}const Dh={extension:(i,c,p)=>{k.trace("Making markers for ",p),i.append("defs").append("marker").attr("id",c+"-extensionStart").attr("class","marker extension "+c).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id",c+"-extensionEnd").attr("class","marker extension "+c).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(i,c)=>{i.append("defs").append("marker").attr("id",c+"-compositionStart").attr("class","marker composition "+c).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",c+"-compositionEnd").attr("class","marker composition "+c).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(i,c)=>{i.append("defs").append("marker").attr("id",c+"-aggregationStart").attr("class","marker aggregation "+c).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",c+"-aggregationEnd").attr("class","marker aggregation "+c).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(i,c)=>{i.append("defs").append("marker").attr("id",c+"-dependencyStart").attr("class","marker dependency "+c).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id",c+"-dependencyEnd").attr("class","marker dependency "+c).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(i,c)=>{i.append("defs").append("marker").attr("id",c+"-lollipopStart").attr("class","marker lollipop "+c).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(i,c)=>{i.append("marker").attr("id",c+"-pointEnd").attr("class","marker "+c).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",c+"-pointStart").attr("class","marker "+c).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(i,c)=>{i.append("marker").attr("id",c+"-circleEnd").attr("class","marker "+c).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),i.append("marker").attr("id",c+"-circleStart").attr("class","marker "+c).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(i,c)=>{i.append("marker").attr("id",c+"-crossEnd").attr("class","marker cross "+c).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),i.append("marker").attr("id",c+"-crossStart").attr("class","marker cross "+c).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(i,c)=>{i.append("defs").append("marker").attr("id",c+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},insertMarkers$3=(i,c,p,b)=>{c.forEach((c=>{Dh[c](i,p,b)}))};const createLabel$1=(i,c,p,b)=>{let _=i||"";if("object"==typeof _&&(_=_[0]),evaluate(getConfig$1().flowchart.htmlLabels)){_=_.replace(/\\n|\n/g," "),k.info("vertexText"+_);let i=function addHtmlLabel$1(i){const c=select(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),p=c.append("xhtml:div"),b=i.label,_=i.isNode?"nodeLabel":"edgeLabel";return p.html('"+b+" "),function applyStyle$1(i,c){c&&i.attr("style",c)}(p,i.labelStyle),p.style("display","inline-block"),p.style("white-space","nowrap"),p.attr("xmlns","http://www.w3.org/1999/xhtml"),c.node()}({isNode:b,label:decodeEntities(_).replace(/fa[blrs]?:fa-[\w-]+/g,(i=>` `)),labelStyle:c.replace("fill:","color:")});return i}{const i=document.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",c.replace("color:","fill:"));let b=[];b="string"==typeof _?_.split(/\\n|\n| /gi):Array.isArray(_)?_:[];for(const c of b){const b=document.createElementNS("http://www.w3.org/2000/svg","tspan");b.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),b.setAttribute("dy","1em"),b.setAttribute("x","0"),p?b.setAttribute("class","title-row"):b.setAttribute("class","row"),b.textContent=c.trim(),i.appendChild(b)}return i}},labelHelper=(i,c,p,b)=>{let _;_=p||"node default";const k=i.insert("g").attr("class",_).attr("id",c.domId||c.id),w=k.insert("g").attr("class","label").attr("style",c.labelStyle);let T;T=void 0===c.labelText?"":"string"==typeof c.labelText?c.labelText:c.labelText[0];const S=w.node().appendChild(createLabel$1(sanitizeText$5(decodeEntities(T),getConfig$1()),c.labelStyle,!1,b));let O=S.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=S.children[0],c=select(S);O=i.getBoundingClientRect(),c.attr("width",O.width),c.attr("height",O.height)}const N=c.padding/2;return w.attr("transform","translate("+-O.width/2+", "+-O.height/2+")"),{shapeSvg:k,bbox:O,halfPadding:N,label:w}},updateNodeBounds=(i,c)=>{const p=c.node().getBBox();i.width=p.width,i.height=p.height};function insertPolygonShape$1(i,c,p,b){return i.insert("polygon",":first-child").attr("points",b.map((function(i){return i.x+","+i.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-c/2+","+p/2+")")}let Oh={},Nh={},Mh={};const isDescendant=(i,c)=>(k.trace("In isDecendant",c," ",i," = ",Nh[c].includes(i)),!!Nh[c].includes(i)),copy=(i,c,p,b)=>{k.warn("Copying children of ",i,"root",b,"data",c.node(i),b);const _=c.children(i)||[];i!==b&&_.push(i),k.warn("Copying (nodes) clusterId",i,"nodes",_),_.forEach((_=>{if(c.children(_).length>0)copy(_,c,p,b);else{const w=c.node(_);k.info("cp ",_," to ",b," with parent ",i),p.setNode(_,w),b!==c.parent(_)&&(k.warn("Setting parent",_,c.parent(_)),p.setParent(_,c.parent(_))),i!==b&&_!==i?(k.debug("Setting parent",_,i),p.setParent(_,i)):(k.info("In copy ",i,"root",b,"data",c.node(i),b),k.debug("Not Setting parent for node=",_,"cluster!==rootId",i!==b,"node!==clusterId",_!==i));const T=c.edges(_);k.debug("Copying Edges",T),T.forEach((_=>{k.info("Edge",_);const w=c.edge(_.v,_.w,_.name);k.info("Edge data",w,b);try{((i,c)=>(k.info("Decendants of ",c," is ",Nh[c]),k.info("Edge is ",i),i.v!==c&&i.w!==c&&(Nh[c]?Nh[c].includes(i.v)||isDescendant(i.v,c)||isDescendant(i.w,c)||Nh[c].includes(i.w):(k.debug("Tilt, ",c,",not in decendants"),!1))))(_,b)?(k.info("Copying as ",_.v,_.w,w,_.name),p.setEdge(_.v,_.w,w,_.name),k.info("newGraph edges ",p.edges(),p.edge(p.edges()[0]))):k.info("Skipping copy of edge ",_.v,"--\x3e",_.w," rootId: ",b," clusterId:",i)}catch(i){k.error(i)}}))}k.debug("Removing node",_),c.removeNode(_)}))},extractDescendants=(i,c)=>{const p=c.children(i);let b=[...p];for(const _ of p)Mh[_]=i,b=[...b,...extractDescendants(_,c)];return b},findNonClusterChild=(i,c)=>{k.trace("Searching",i);const p=c.children(i);if(k.trace("Searching children of id ",i,p),p.length<1)return k.trace("This is a valid node",i),i;for(const b of p){const p=findNonClusterChild(b,c);if(p)return k.trace("Found replacement for",i," => ",p),p}},getAnchorId=i=>Oh[i]&&Oh[i].externalConnections&&Oh[i]?Oh[i].id:i,extractor=(i,c)=>{if(k.warn("extractor - ",c,write(i),i.children("D")),c>10)return void k.error("Bailing out");let p=i.nodes(),b=!1;for(const c of p){const p=i.children(c);b=b||p.length>0}if(b){k.debug("Nodes = ",p,c);for(const b of p)if(k.debug("Extracting node",b,Oh,Oh[b]&&!Oh[b].externalConnections,!i.parent(b),i.node(b),i.children("D")," Depth ",c),Oh[b])if(!Oh[b].externalConnections&&i.children(b)&&i.children(b).length>0){k.warn("Cluster without external connections, without a parent and with children",b,c);let p="TB"===i.graph().rankdir?"LR":"TB";Oh[b]&&Oh[b].clusterData&&Oh[b].clusterData.dir&&(p=Oh[b].clusterData.dir,k.warn("Fixing dir",Oh[b].clusterData.dir,p));const _=new Graph({multigraph:!0,compound:!0}).setGraph({rankdir:p,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));k.warn("Old graph before copy",write(i)),copy(b,i,_,b),i.setNode(b,{clusterNode:!0,id:b,clusterData:Oh[b].clusterData,labelText:Oh[b].labelText,graph:_}),k.warn("New graph after copy node: (",b,")",write(_)),k.debug("Old graph after copy",write(i))}else k.warn("Cluster ** ",b," **not meeting the criteria !externalConnections:",!Oh[b].externalConnections," no parent: ",!i.parent(b)," children ",i.children(b)&&i.children(b).length>0,i.children("D"),c),k.debug(Oh);else k.debug("Not a cluster",b,c);p=i.nodes(),k.warn("New list of nodes",p);for(const b of p){const p=i.node(b);k.warn(" Now next level",b,p),p.clusterNode&&extractor(p.graph,c+1)}}else k.debug("Done, no node has children",i.nodes())},sorter=(i,c)=>{if(0===c.length)return[];let p=Object.assign(c);return c.forEach((c=>{const b=i.children(c),_=sorter(i,b);p=[...p,..._]})),p};function intersectEllipse$1(i,c,p,b){var _=i.x,k=i.y,w=_-b.x,T=k-b.y,S=Math.sqrt(c*c*T*T+p*p*w*w),O=Math.abs(c*p*w/S);b.x<_&&(O=-O);var N=Math.abs(c*p*T/S);return b.y0}const intersectRect$2=(i,c)=>{var p,b,_=i.x,k=i.y,w=c.x-_,T=c.y-k,S=i.width/2,O=i.height/2;return Math.abs(T)*S>Math.abs(w)*O?(T<0&&(O=-O),p=0===T?0:O*w/T,b=O):(w<0&&(S=-S),p=S,b=0===w?0:S*T/w),{x:_+p,y:k+b}},Ih={node:function intersectNode$1(i,c){return i.intersect(c)},circle:function intersectCircle$1(i,c,p){return intersectEllipse$1(i,c,c,p)},ellipse:intersectEllipse$1,polygon:function intersectPolygon$1(i,c,p){var b=i.x,_=i.y,k=[],w=Number.POSITIVE_INFINITY,T=Number.POSITIVE_INFINITY;"function"==typeof c.forEach?c.forEach((function(i){w=Math.min(w,i.x),T=Math.min(T,i.y)})):(w=Math.min(w,c.x),T=Math.min(T,c.y));for(var S=b-i.width/2-w,O=_-i.height/2-T,N=0;N1&&k.sort((function(i,c){var b=i.x-p.x,_=i.y-p.y,k=Math.sqrt(b*b+_*_),w=c.x-p.x,T=c.y-p.y,S=Math.sqrt(w*w+T*T);return k{_.push(i,0)},skipBorder=i=>{_.push(0,i)};c.includes("t")?(k.debug("add top border"),addBorder(p)):skipBorder(p),c.includes("r")?(k.debug("add right border"),addBorder(b)):skipBorder(b),c.includes("b")?(k.debug("add bottom border"),addBorder(p)):skipBorder(p),c.includes("l")?(k.debug("add left border"),addBorder(b)):skipBorder(b),i.attr("stroke-dasharray",_.join(" "))}const forkJoin=(i,c,p)=>{const b=i.insert("g").attr("class","node default").attr("id",c.domId||c.id);let _=70,k=10;"LR"===p&&(_=10,k=70);const w=b.append("rect").attr("x",-1*_/2).attr("y",-1*k/2).attr("width",_).attr("height",k).attr("class","fork-join");return updateNodeBounds(c,w),c.height=c.height+c.padding/2,c.width=c.width+c.padding/2,c.intersect=function(i){return Ih.rect(c,i)},b},Bh={question:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding+(b.height+c.padding),w=[{x:_/2,y:0},{x:_,y:-_/2},{x:_/2,y:-_},{x:0,y:-_/2}];k.info("Question main (Circle)");const T=insertPolygonShape$1(p,_,_,w);return T.attr("style",c.style),updateNodeBounds(c,T),c.intersect=function(i){return k.warn("Intersect called"),Ih.polygon(c,w,i)},p},rect:(i,c)=>{const{shapeSvg:p,bbox:b,halfPadding:_}=labelHelper(i,c,"node "+c.classes,!0);k.trace("Classes = ",c.classes);const w=p.insert("rect",":first-child"),T=b.width+c.padding,S=b.height+c.padding;if(w.attr("class","basic label-container").attr("style",c.style).attr("rx",c.rx).attr("ry",c.ry).attr("x",-b.width/2-_).attr("y",-b.height/2-_).attr("width",T).attr("height",S),c.props){const i=new Set(Object.keys(c.props));c.props.borders&&(applyNodePropertyBorders(w,c.props.borders,T,S),i.delete("borders")),i.forEach((i=>{k.warn(`Unknown node property ${i}`)}))}return updateNodeBounds(c,w),c.intersect=function(i){return Ih.rect(c,i)},p},labelRect:(i,c)=>{const{shapeSvg:p}=labelHelper(i,c,"label",!0);k.trace("Classes = ",c.classes);const b=p.insert("rect",":first-child");if(b.attr("width",0).attr("height",0),p.attr("class","label edgeLabel"),c.props){const i=new Set(Object.keys(c.props));c.props.borders&&(applyNodePropertyBorders(b,c.props.borders,0,0),i.delete("borders")),i.forEach((i=>{k.warn(`Unknown node property ${i}`)}))}return updateNodeBounds(c,b),c.intersect=function(i){return Ih.rect(c,i)},p},rectWithTitle:(i,c)=>{let p;p=c.classes?"node "+c.classes:"node default";const b=i.insert("g").attr("class",p).attr("id",c.domId||c.id),_=b.insert("rect",":first-child"),w=b.insert("line"),T=b.insert("g").attr("class","label"),S=c.labelText.flat?c.labelText.flat():c.labelText;let O="";O="object"==typeof S?S[0]:S,k.info("Label text abc79",O,S,"object"==typeof S);const N=T.node().appendChild(createLabel$1(O,c.labelStyle,!0,!0));let R={width:0,height:0};if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=N.children[0],c=select(N);R=i.getBoundingClientRect(),c.attr("width",R.width),c.attr("height",R.height)}k.info("Text 2",S);const Y=S.slice(1,S.length);let j=N.getBBox();const z=T.node().appendChild(createLabel$1(Y.join?Y.join(" "):Y,c.labelStyle,!0,!0));if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=z.children[0],c=select(z);R=i.getBoundingClientRect(),c.attr("width",R.width),c.attr("height",R.height)}const U=c.padding/2;return select(z).attr("transform","translate( "+(R.width>j.width?0:(j.width-R.width)/2)+", "+(j.height+U+5)+")"),select(N).attr("transform","translate( "+(R.width{const p=i.insert("g").attr("class","node default").attr("id",c.domId||c.id),b=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return p.insert("polygon",":first-child").attr("points",b.map((function(i){return i.x+","+i.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),c.width=28,c.height=28,c.intersect=function(i){return Ih.circle(c,14,i)},p},circle:(i,c)=>{const{shapeSvg:p,bbox:b,halfPadding:_}=labelHelper(i,c,void 0,!0),w=p.insert("circle",":first-child");return w.attr("style",c.style).attr("rx",c.rx).attr("ry",c.ry).attr("r",b.width/2+_).attr("width",b.width+c.padding).attr("height",b.height+c.padding),k.info("Circle main"),updateNodeBounds(c,w),c.intersect=function(i){return k.info("Circle intersect",c,b.width/2+_,i),Ih.circle(c,b.width/2+_,i)},p},doublecircle:(i,c)=>{const{shapeSvg:p,bbox:b,halfPadding:_}=labelHelper(i,c,void 0,!0),w=p.insert("g",":first-child"),T=w.insert("circle"),S=w.insert("circle");return T.attr("style",c.style).attr("rx",c.rx).attr("ry",c.ry).attr("r",b.width/2+_+5).attr("width",b.width+c.padding+10).attr("height",b.height+c.padding+10),S.attr("style",c.style).attr("rx",c.rx).attr("ry",c.ry).attr("r",b.width/2+_).attr("width",b.width+c.padding).attr("height",b.height+c.padding),k.info("DoubleCircle main"),updateNodeBounds(c,T),c.intersect=function(i){return k.info("DoubleCircle intersect",c,b.width/2+_+5,i),Ih.circle(c,b.width/2+_+5,i)},p},stadium:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.height+c.padding,k=b.width+_/4+c.padding,w=p.insert("rect",":first-child").attr("style",c.style).attr("rx",_/2).attr("ry",_/2).attr("x",-k/2).attr("y",-_/2).attr("width",k).attr("height",_);return updateNodeBounds(c,w),c.intersect=function(i){return Ih.rect(c,i)},p},hexagon:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.height+c.padding,k=_/4,w=b.width+2*k+c.padding,T=[{x:k,y:0},{x:w-k,y:0},{x:w,y:-_/2},{x:w-k,y:-_},{x:k,y:-_},{x:0,y:-_/2}],S=insertPolygonShape$1(p,w,_,T);return S.attr("style",c.style),updateNodeBounds(c,S),c.intersect=function(i){return Ih.polygon(c,T,i)},p},rect_left_inv_arrow:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=b.height+c.padding,w=[{x:-k/2,y:0},{x:_,y:0},{x:_,y:-k},{x:-k/2,y:-k},{x:0,y:-k/2}];return insertPolygonShape$1(p,_,k,w).attr("style",c.style),c.width=_+k,c.height=k,c.intersect=function(i){return Ih.polygon(c,w,i)},p},lean_right:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=b.height+c.padding,w=[{x:-2*k/6,y:0},{x:_-k/6,y:0},{x:_+2*k/6,y:-k},{x:k/6,y:-k}],T=insertPolygonShape$1(p,_,k,w);return T.attr("style",c.style),updateNodeBounds(c,T),c.intersect=function(i){return Ih.polygon(c,w,i)},p},lean_left:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=b.height+c.padding,w=[{x:2*k/6,y:0},{x:_+k/6,y:0},{x:_-2*k/6,y:-k},{x:-k/6,y:-k}],T=insertPolygonShape$1(p,_,k,w);return T.attr("style",c.style),updateNodeBounds(c,T),c.intersect=function(i){return Ih.polygon(c,w,i)},p},trapezoid:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=b.height+c.padding,w=[{x:-2*k/6,y:0},{x:_+2*k/6,y:0},{x:_-k/6,y:-k},{x:k/6,y:-k}],T=insertPolygonShape$1(p,_,k,w);return T.attr("style",c.style),updateNodeBounds(c,T),c.intersect=function(i){return Ih.polygon(c,w,i)},p},inv_trapezoid:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=b.height+c.padding,w=[{x:k/6,y:0},{x:_-k/6,y:0},{x:_+2*k/6,y:-k},{x:-2*k/6,y:-k}],T=insertPolygonShape$1(p,_,k,w);return T.attr("style",c.style),updateNodeBounds(c,T),c.intersect=function(i){return Ih.polygon(c,w,i)},p},rect_right_inv_arrow:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=b.height+c.padding,w=[{x:0,y:0},{x:_+k/2,y:0},{x:_,y:-k/2},{x:_+k/2,y:-k},{x:0,y:-k}],T=insertPolygonShape$1(p,_,k,w);return T.attr("style",c.style),updateNodeBounds(c,T),c.intersect=function(i){return Ih.polygon(c,w,i)},p},cylinder:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=_/2,w=k/(2.5+_/50),T=b.height+w+c.padding,S="M 0,"+w+" a "+k+","+w+" 0,0,0 "+_+" 0 a "+k+","+w+" 0,0,0 "+-_+" 0 l 0,"+T+" a "+k+","+w+" 0,0,0 "+_+" 0 l 0,"+-T,O=p.attr("label-offset-y",w).insert("path",":first-child").attr("style",c.style).attr("d",S).attr("transform","translate("+-_/2+","+-(T/2+w)+")");return updateNodeBounds(c,O),c.intersect=function(i){const p=Ih.rect(c,i),b=p.x-c.x;if(0!=k&&(Math.abs(b)c.height/2-w)){let _=w*w*(1-b*b/(k*k));0!=_&&(_=Math.sqrt(_)),_=w-_,i.y-c.y>0&&(_=-_),p.y+=_}return p},p},start:(i,c)=>{const p=i.insert("g").attr("class","node default").attr("id",c.domId||c.id),b=p.insert("circle",":first-child");return b.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),updateNodeBounds(c,b),c.intersect=function(i){return Ih.circle(c,7,i)},p},end:(i,c)=>{const p=i.insert("g").attr("class","node default").attr("id",c.domId||c.id),b=p.insert("circle",":first-child"),_=p.insert("circle",":first-child");return _.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),b.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),updateNodeBounds(c,_),c.intersect=function(i){return Ih.circle(c,7,i)},p},note:(i,c)=>{const{shapeSvg:p,bbox:b,halfPadding:_}=labelHelper(i,c,"node "+c.classes,!0);k.info("Classes = ",c.classes);const w=p.insert("rect",":first-child");return w.attr("rx",c.rx).attr("ry",c.ry).attr("x",-b.width/2-_).attr("y",-b.height/2-_).attr("width",b.width+c.padding).attr("height",b.height+c.padding),updateNodeBounds(c,w),c.intersect=function(i){return Ih.rect(c,i)},p},subroutine:(i,c)=>{const{shapeSvg:p,bbox:b}=labelHelper(i,c,void 0,!0),_=b.width+c.padding,k=b.height+c.padding,w=[{x:0,y:0},{x:_,y:0},{x:_,y:-k},{x:0,y:-k},{x:0,y:0},{x:-8,y:0},{x:_+8,y:0},{x:_+8,y:-k},{x:-8,y:-k},{x:-8,y:0}],T=insertPolygonShape$1(p,_,k,w);return T.attr("style",c.style),updateNodeBounds(c,T),c.intersect=function(i){return Ih.polygon(c,w,i)},p},fork:forkJoin,join:forkJoin,class_box:(i,c)=>{const p=c.padding/2;let b;b=c.classes?"node "+c.classes:"node default";const _=i.insert("g").attr("class",b).attr("id",c.domId||c.id),k=_.insert("rect",":first-child"),w=_.insert("line"),T=_.insert("line");let S=0,O=4;const N=_.insert("g").attr("class","label");let R=0;const Y=c.classData.annotations&&c.classData.annotations[0],j=c.classData.annotations[0]?"«"+c.classData.annotations[0]+"»":"",z=N.node().appendChild(createLabel$1(j,c.labelStyle,!0,!0));let U=z.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=z.children[0],c=select(z);U=i.getBoundingClientRect(),c.attr("width",U.width),c.attr("height",U.height)}c.classData.annotations[0]&&(O+=U.height+4,S+=U.width);let H=c.classData.id;void 0!==c.classData.type&&""!==c.classData.type&&(getConfig$1().flowchart.htmlLabels?H+="<"+c.classData.type+">":H+="<"+c.classData.type+">");const Z=N.node().appendChild(createLabel$1(H,c.labelStyle,!0,!0));select(Z).attr("class","classTitle");let K=Z.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=Z.children[0],c=select(Z);K=i.getBoundingClientRect(),c.attr("width",K.width),c.attr("height",K.height)}O+=K.height+4,K.width>S&&(S=K.width);const J=[];c.classData.members.forEach((i=>{const p=parseMember(i);let b=p.displayText;getConfig$1().flowchart.htmlLabels&&(b=b.replace(//g,">"));const _=N.node().appendChild(createLabel$1(b,p.cssStyle?p.cssStyle:c.labelStyle,!0,!0));let k=_.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=_.children[0],c=select(_);k=i.getBoundingClientRect(),c.attr("width",k.width),c.attr("height",k.height)}k.width>S&&(S=k.width),O+=k.height+4,J.push(_)})),O+=8;const tt=[];if(c.classData.methods.forEach((i=>{const p=parseMember(i);let b=p.displayText;getConfig$1().flowchart.htmlLabels&&(b=b.replace(//g,">"));const _=N.node().appendChild(createLabel$1(b,p.cssStyle?p.cssStyle:c.labelStyle,!0,!0));let k=_.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=_.children[0],c=select(_);k=i.getBoundingClientRect(),c.attr("width",k.width),c.attr("height",k.height)}k.width>S&&(S=k.width),O+=k.height+4,tt.push(_)})),O+=8,Y){let i=(S-U.width)/2;select(z).attr("transform","translate( "+(-1*S/2+i)+", "+-1*O/2+")"),R=U.height+4}let et=(S-K.width)/2;return select(Z).attr("transform","translate( "+(-1*S/2+et)+", "+(-1*O/2+R)+")"),R+=K.height+4,w.attr("class","divider").attr("x1",-S/2-p).attr("x2",S/2+p).attr("y1",-O/2-p+8+R).attr("y2",-O/2-p+8+R),R+=8,J.forEach((i=>{select(i).attr("transform","translate( "+-S/2+", "+(-1*O/2+R+4)+")"),R+=K.height+4})),R+=8,T.attr("class","divider").attr("x1",-S/2-p).attr("x2",S/2+p).attr("y1",-O/2-p+8+R).attr("y2",-O/2-p+8+R),R+=8,tt.forEach((i=>{select(i).attr("transform","translate( "+-S/2+", "+(-1*O/2+R)+")"),R+=K.height+4})),k.attr("class","outer title-state").attr("x",-S/2-p).attr("y",-O/2-p).attr("width",S+c.padding).attr("height",O+c.padding),updateNodeBounds(c,k),c.intersect=function(i){return Ih.rect(c,i)},_}};let Fh={};const positionNode=i=>{const c=Fh[i.id];k.trace("Transforming node",i.diff,i,"translate("+(i.x-i.width/2-5)+", "+i.width/2+")");const p=i.diff||0;return i.clusterNode?c.attr("transform","translate("+(i.x+p-i.width/2)+", "+(i.y-i.height/2-8)+")"):c.attr("transform","translate("+i.x+", "+i.y+")"),p},$h={rect:(i,c)=>{k.trace("Creating subgraph rect for ",c.id,c);const p=i.insert("g").attr("class","cluster"+(c.class?" "+c.class:"")).attr("id",c.id),b=p.insert("rect",":first-child"),_=p.insert("g").attr("class","cluster-label"),w=_.node().appendChild(createLabel$1(c.labelText,c.labelStyle,void 0,!0));let T=w.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=w.children[0],c=select(w);T=i.getBoundingClientRect(),c.attr("width",T.width),c.attr("height",T.height)}const S=0*c.padding,O=S/2,N=c.width<=T.width+S?T.width+S:c.width;c.width<=T.width+S?c.diff=(T.width-c.width)/2-c.padding/2:c.diff=-c.padding/2,k.trace("Data ",c,JSON.stringify(c)),b.attr("style",c.style).attr("rx",c.rx).attr("ry",c.ry).attr("x",c.x-N/2).attr("y",c.y-c.height/2-O).attr("width",N).attr("height",c.height+S),_.attr("transform","translate("+(c.x-T.width/2)+", "+(c.y-c.height/2)+")");const R=b.node().getBBox();return c.width=R.width,c.height=R.height,c.intersect=function(i){return intersectRect$2(c,i)},p},roundedWithTitle:(i,c)=>{const p=i.insert("g").attr("class",c.classes).attr("id",c.id),b=p.insert("rect",":first-child"),_=p.insert("g").attr("class","cluster-label"),k=p.append("rect"),w=_.node().appendChild(createLabel$1(c.labelText,c.labelStyle,void 0,!0));let T=w.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=w.children[0],c=select(w);T=i.getBoundingClientRect(),c.attr("width",T.width),c.attr("height",T.height)}T=w.getBBox();const S=0*c.padding,O=S/2,N=c.width<=T.width+c.padding?T.width+c.padding:c.width;c.width<=T.width+c.padding?c.diff=(T.width+0*c.padding-c.width)/2:c.diff=-c.padding/2,b.attr("class","outer").attr("x",c.x-N/2-O).attr("y",c.y-c.height/2-O).attr("width",N+S).attr("height",c.height+S),k.attr("class","inner").attr("x",c.x-N/2-O).attr("y",c.y-c.height/2-O+T.height-1).attr("width",N+S).attr("height",c.height+S-T.height-3),_.attr("transform","translate("+(c.x-T.width/2)+", "+(c.y-c.height/2-c.padding/3+(evaluate(getConfig$1().flowchart.htmlLabels)?5:3))+")");const R=b.node().getBBox();return c.height=R.height,c.intersect=function(i){return intersectRect$2(c,i)},p},noteGroup:(i,c)=>{const p=i.insert("g").attr("class","note-cluster").attr("id",c.id),b=p.insert("rect",":first-child"),_=0*c.padding,k=_/2;b.attr("rx",c.rx).attr("ry",c.ry).attr("x",c.x-c.width/2-k).attr("y",c.y-c.height/2-k).attr("width",c.width+_).attr("height",c.height+_).attr("fill","none");const w=b.node().getBBox();return c.width=w.width,c.height=w.height,c.intersect=function(i){return intersectRect$2(c,i)},p},divider:(i,c)=>{const p=i.insert("g").attr("class",c.classes).attr("id",c.id),b=p.insert("rect",":first-child"),_=0*c.padding,k=_/2;b.attr("class","divider").attr("x",c.x-c.width/2-k).attr("y",c.y-c.height/2).attr("width",c.width+_).attr("height",c.height+_);const w=b.node().getBBox();return c.width=w.width,c.height=w.height,c.diff=-c.padding/2,c.intersect=function(i){return intersectRect$2(c,i)},p}};let Rh={};let Ph={},Yh={};function setTerminalWidth(i,c){getConfig$1().flowchart.htmlLabels&&i&&(i.style.width=9*c.length+"px",i.style.height="12px")}const cutPathAtIntersect=(i,c)=>{k.warn("abc88 cutPathAtIntersect",i,c);let p=[],b=i[0],_=!1;return i.forEach((i=>{if(k.info("abc88 checking point",i,c),((i,c)=>{const p=i.x,b=i.y,_=Math.abs(c.x-p),k=Math.abs(c.y-b),w=i.width/2,T=i.height/2;return _>=w||k>=T})(c,i)||_)k.warn("abc88 outside",i,b),b=i,_||p.push(i);else{const w=((i,c,p)=>{k.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(c)}\n insidePoint : ${JSON.stringify(p)}\n node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const b=i.x,_=i.y,w=Math.abs(b-p.x),T=i.width/2;let S=p.xMath.abs(b-c.x)*O){let i=p.y{T=T||i.x===w.x&&i.y===w.y})),p.some((i=>i.x===w.x&&i.y===w.y))?k.warn("abc88 no intersect",w,p):p.push(w),_=!0}})),k.warn("abc88 returning points",p),p},recursiveRender=(i,c,p,b)=>{k.info("Graph in recursive render: XXX",write(c),b);const _=c.graph().rankdir;k.trace("Dir in recursive render - dir:",_);const w=i.insert("g").attr("class","root");c.nodes()?k.info("Recursive render XXX",c.nodes()):k.info("No nodes found for",c),c.edges().length>0&&k.trace("Recursive edges",c.edge(c.edges()[0]));const T=w.insert("g").attr("class","clusters"),S=w.insert("g").attr("class","edgePaths"),O=w.insert("g").attr("class","edgeLabels"),N=w.insert("g").attr("class","nodes");c.nodes().forEach((function(i){const w=c.node(i);if(void 0!==b){const p=JSON.parse(JSON.stringify(b.clusterData));k.info("Setting data for cluster XXX (",i,") ",p,b),c.setNode(b.id,p),c.parent(i)||(k.trace("Setting parent",i,b.id),c.setParent(i,b.id,p))}if(k.info("(Insert) Node XXX"+i+": "+JSON.stringify(c.node(i))),w&&w.clusterNode){k.info("Cluster identified",i,w.width,c.node(i));const b=recursiveRender(N,w.graph,p,c.node(i)),_=b.elem;updateNodeBounds(w,_),w.diff=b.diff||0,k.info("Node bounds (abc123)",i,w,w.width,w.x,w.y),((i,c)=>{Fh[c.id]=i})(_,w),k.warn("Recursive render complete ",_,w)}else c.children(i).length>0?(k.info("Cluster - the non recursive path XXX",i,w.id,w,c),k.info(findNonClusterChild(w.id,c)),Oh[w.id]={id:findNonClusterChild(w.id,c),node:w}):(k.info("Node - the non recursive path",i,w.id,w),((i,c,p)=>{let b,_;if(c.link){let k;"sandbox"===getConfig$1().securityLevel?k="_top":c.linkTarget&&(k=c.linkTarget||"_blank"),b=i.insert("svg:a").attr("xlink:href",c.link).attr("target",k),_=Bh[c.shape](b,c,p)}else _=Bh[c.shape](i,c,p),b=_;c.tooltip&&_.attr("title",c.tooltip),c.class&&_.attr("class","node default "+c.class),Fh[c.id]=b,c.haveCallback&&Fh[c.id].attr("class",Fh[c.id].attr("class")+" clickable")})(N,c.node(i),_))})),c.edges().forEach((function(i){const p=c.edge(i.v,i.w,i.name);k.info("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),k.info("Edge "+i.v+" -> "+i.w+": ",i," ",JSON.stringify(c.edge(i))),k.info("Fix",Oh,"ids:",i.v,i.w,"Translateing: ",Oh[i.v],Oh[i.w]),((i,c)=>{const p=createLabel$1(c.label,c.labelStyle),b=i.insert("g").attr("class","edgeLabel"),_=b.insert("g").attr("class","label");_.node().appendChild(p);let k,w=p.getBBox();if(evaluate(getConfig$1().flowchart.htmlLabels)){const i=p.children[0],c=select(p);w=i.getBoundingClientRect(),c.attr("width",w.width),c.attr("height",w.height)}if(_.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),Ph[c.id]=b,c.width=w.width,c.height=w.height,c.startLabelLeft){const p=createLabel$1(c.startLabelLeft,c.labelStyle),b=i.insert("g").attr("class","edgeTerminals"),_=b.insert("g").attr("class","inner");k=_.node().appendChild(p);const w=p.getBBox();_.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),Yh[c.id]||(Yh[c.id]={}),Yh[c.id].startLeft=b,setTerminalWidth(k,c.startLabelLeft)}if(c.startLabelRight){const p=createLabel$1(c.startLabelRight,c.labelStyle),b=i.insert("g").attr("class","edgeTerminals"),_=b.insert("g").attr("class","inner");k=b.node().appendChild(p),_.node().appendChild(p);const w=p.getBBox();_.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),Yh[c.id]||(Yh[c.id]={}),Yh[c.id].startRight=b,setTerminalWidth(k,c.startLabelRight)}if(c.endLabelLeft){const p=createLabel$1(c.endLabelLeft,c.labelStyle),b=i.insert("g").attr("class","edgeTerminals"),_=b.insert("g").attr("class","inner");k=_.node().appendChild(p);const w=p.getBBox();_.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),b.node().appendChild(p),Yh[c.id]||(Yh[c.id]={}),Yh[c.id].endLeft=b,setTerminalWidth(k,c.endLabelLeft)}if(c.endLabelRight){const p=createLabel$1(c.endLabelRight,c.labelStyle),b=i.insert("g").attr("class","edgeTerminals"),_=b.insert("g").attr("class","inner");k=_.node().appendChild(p);const w=p.getBBox();_.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),b.node().appendChild(p),Yh[c.id]||(Yh[c.id]={}),Yh[c.id].endRight=b,setTerminalWidth(k,c.endLabelRight)}})(O,p)})),c.edges().forEach((function(i){k.info("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i))})),k.info("#############################################"),k.info("### Layout ###"),k.info("#############################################"),k.info(c),layout(c),k.info("Graph after layout:",write(c));let R=0;return(i=>sorter(i,i.children()))(c).forEach((function(i){const p=c.node(i);k.info("Position "+i+": "+JSON.stringify(c.node(i))),k.info("Position "+i+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p&&p.clusterNode?positionNode(p):c.children(i).length>0?(((i,c)=>{k.trace("Inserting cluster");const p=c.shape||"rect";Rh[c.id]=$h[p](i,c)})(T,p),Oh[p.id].node=p):positionNode(p)})),c.edges().forEach((function(i){const b=c.edge(i);k.info("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(b),b);const _=function(i,c,p,b,_,w){let T=p.points,S=!1;const O=w.node(c.v);var N=w.node(c.w);k.info("abc88 InsertEdge: ",p),N.intersect&&O.intersect&&(T=T.slice(1,p.points.length-1),T.unshift(O.intersect(T[0])),k.info("Last point",T[T.length-1],N,N.intersect(T[T.length-1])),T.push(N.intersect(T[T.length-1]))),p.toCluster&&(k.info("to cluster abc88",b[p.toCluster]),T=cutPathAtIntersect(p.points,b[p.toCluster].node),S=!0),p.fromCluster&&(k.info("from cluster abc88",b[p.fromCluster]),T=cutPathAtIntersect(T.reverse(),b[p.fromCluster].node).reverse(),S=!0);const R=T.filter((i=>!Number.isNaN(i.y)));let Y;Y=("graph"===_||"flowchart"===_)&&p.curve||curveBasis;const j=line$1().x((function(i){return i.x})).y((function(i){return i.y})).curve(Y);let z;switch(p.thickness){case"normal":z="edge-thickness-normal";break;case"thick":z="edge-thickness-thick";break;default:z=""}switch(p.pattern){case"solid":z+=" edge-pattern-solid";break;case"dotted":z+=" edge-pattern-dotted";break;case"dashed":z+=" edge-pattern-dashed"}const U=i.append("path").attr("d",j(R)).attr("id",p.id).attr("class"," "+z+(p.classes?" "+p.classes:"")).attr("style",p.style);let H="";switch((getConfig$1().flowchart.arrowMarkerAbsolute||getConfig$1().state.arrowMarkerAbsolute)&&(H=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,H=H.replace(/\(/g,"\\("),H=H.replace(/\)/g,"\\)")),k.info("arrowTypeStart",p.arrowTypeStart),k.info("arrowTypeEnd",p.arrowTypeEnd),p.arrowTypeStart){case"arrow_cross":U.attr("marker-start","url("+H+"#"+_+"-crossStart)");break;case"arrow_point":U.attr("marker-start","url("+H+"#"+_+"-pointStart)");break;case"arrow_barb":U.attr("marker-start","url("+H+"#"+_+"-barbStart)");break;case"arrow_circle":U.attr("marker-start","url("+H+"#"+_+"-circleStart)");break;case"aggregation":U.attr("marker-start","url("+H+"#"+_+"-aggregationStart)");break;case"extension":U.attr("marker-start","url("+H+"#"+_+"-extensionStart)");break;case"composition":U.attr("marker-start","url("+H+"#"+_+"-compositionStart)");break;case"dependency":U.attr("marker-start","url("+H+"#"+_+"-dependencyStart)");break;case"lollipop":U.attr("marker-start","url("+H+"#"+_+"-lollipopStart)")}switch(p.arrowTypeEnd){case"arrow_cross":U.attr("marker-end","url("+H+"#"+_+"-crossEnd)");break;case"arrow_point":U.attr("marker-end","url("+H+"#"+_+"-pointEnd)");break;case"arrow_barb":U.attr("marker-end","url("+H+"#"+_+"-barbEnd)");break;case"arrow_circle":U.attr("marker-end","url("+H+"#"+_+"-circleEnd)");break;case"aggregation":U.attr("marker-end","url("+H+"#"+_+"-aggregationEnd)");break;case"extension":U.attr("marker-end","url("+H+"#"+_+"-extensionEnd)");break;case"composition":U.attr("marker-end","url("+H+"#"+_+"-compositionEnd)");break;case"dependency":U.attr("marker-end","url("+H+"#"+_+"-dependencyEnd)");break;case"lollipop":U.attr("marker-end","url("+H+"#"+_+"-lollipopEnd)")}let Z={};return S&&(Z.updatedPath=T),Z.originalPath=p.points,Z}(S,i,b,Oh,p,c);((i,c)=>{k.info("Moving label abc78 ",i.id,i.label,Ph[i.id]);let p=c.updatedPath?c.updatedPath:c.originalPath;if(i.label){const b=Ph[i.id];let _=i.x,w=i.y;if(p){const b=Ns.calcLabelPosition(p);k.info("Moving label "+i.label+" from (",_,",",w,") to (",b.x,",",b.y,") abc78"),c.updatedPath&&(_=b.x,w=b.y)}b.attr("transform","translate("+_+", "+w+")")}if(i.startLabelLeft){const c=Yh[i.id].startLeft;let b=i.x,_=i.y;if(p){const c=Ns.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",p);b=c.x,_=c.y}c.attr("transform","translate("+b+", "+_+")")}if(i.startLabelRight){const c=Yh[i.id].startRight;let b=i.x,_=i.y;if(p){const c=Ns.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",p);b=c.x,_=c.y}c.attr("transform","translate("+b+", "+_+")")}if(i.endLabelLeft){const c=Yh[i.id].endLeft;let b=i.x,_=i.y;if(p){const c=Ns.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",p);b=c.x,_=c.y}c.attr("transform","translate("+b+", "+_+")")}if(i.endLabelRight){const c=Yh[i.id].endRight;let b=i.x,_=i.y;if(p){const c=Ns.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",p);b=c.x,_=c.y}c.attr("transform","translate("+b+", "+_+")")}})(b,_)})),c.nodes().forEach((function(i){const p=c.node(i);k.info(i,p.type,p.diff),"group"===p.type&&(R=p.diff)})),{elem:w,diff:R}},render$2=(i,c,p,b,_)=>{insertMarkers$3(i,p,b,_),Fh={},Ph={},Yh={},Rh={},Nh={},Mh={},Oh={},k.warn("Graph at first:",write(c)),((i,c)=>{!i||c>10?k.debug("Opting out, no graph "):(k.debug("Opting in, graph "),i.nodes().forEach((function(c){i.children(c).length>0&&(k.warn("Cluster identified",c," Replacement id in edges: ",findNonClusterChild(c,i)),Nh[c]=extractDescendants(c,i),Oh[c]={id:findNonClusterChild(c,i),clusterData:i.node(c)})})),i.nodes().forEach((function(c){const p=i.children(c),b=i.edges();p.length>0?(k.debug("Cluster identified",c,Nh),b.forEach((i=>{i.v!==c&&i.w!==c&&isDescendant(i.v,c)^isDescendant(i.w,c)&&(k.warn("Edge: ",i," leaves cluster ",c),k.warn("Decendants of XXX ",c,": ",Nh[c]),Oh[c].externalConnections=!0)}))):k.debug("Not a cluster ",c,Nh)})),i.edges().forEach((function(c){const p=i.edge(c);k.warn("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c)),k.warn("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(i.edge(c)));let b=c.v,_=c.w;if(k.warn("Fix XXX",Oh,"ids:",c.v,c.w,"Translating: ",Oh[c.v]," --- ",Oh[c.w]),Oh[c.v]&&Oh[c.w]&&Oh[c.v]===Oh[c.w]){k.warn("Fixing and trixing link to self - removing XXX",c.v,c.w,c.name),k.warn("Fixing and trixing - removing XXX",c.v,c.w,c.name),b=getAnchorId(c.v),_=getAnchorId(c.w),i.removeEdge(c.v,c.w,c.name);const w=c.w+"---"+c.v;i.setNode(w,{domId:w,id:w,labelStyle:"",labelText:p.label,padding:0,shape:"labelRect",style:""});const T=JSON.parse(JSON.stringify(p)),S=JSON.parse(JSON.stringify(p));T.label="",T.arrowTypeEnd="none",S.label="",T.fromCluster=c.v,S.toCluster=c.v,i.setEdge(b,w,T,c.name+"-cyclic-special"),i.setEdge(w,_,S,c.name+"-cyclic-special")}else(Oh[c.v]||Oh[c.w])&&(k.warn("Fixing and trixing - removing XXX",c.v,c.w,c.name),b=getAnchorId(c.v),_=getAnchorId(c.w),i.removeEdge(c.v,c.w,c.name),b!==c.v&&(p.fromCluster=c.v),_!==c.w&&(p.toCluster=c.w),k.warn("Fix Replacing with XXX",b,_,c.name),i.setEdge(b,_,p,c.name))})),k.warn("Adjusted Graph",write(i)),extractor(i,0),k.trace(Oh))})(c),k.warn("Graph after:",write(c)),recursiveRender(i,c,b)},sanitizeText$1=i=>Ri.sanitizeText(i,getConfig$1());let jh={dividerMargin:10,padding:5,textHeight:10};function getArrowMarker(i){let c;switch(i){case 0:c="aggregation";break;case 1:c="extension";break;case 2:c="composition";break;case 3:c="dependency";break;case 4:c="lollipop";break;default:c="none"}return c}const zh={setConf:function(i){Object.keys(i).forEach((function(c){jh[c]=i[c]}))},draw:function(i,c,p,b){k.info("Drawing class - ",c);const _=getConfig$1().flowchart,w=getConfig$1().securityLevel;k.info("config:",_);const T=_.nodeSpacing||50,S=_.rankSpacing||50,O=new Graph({multigraph:!0,compound:!0}).setGraph({rankdir:b.db.getDirection(),nodesep:T,ranksep:S,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),N=b.db.getClasses(),R=b.db.getRelations(),Y=b.db.getNotes();let j;k.info(R),function(i,c,p,b){const _=Object.keys(i);k.info("keys:",_),k.info(i),_.forEach((function(p){const _=i[p];let w="";_.cssClasses.length>0&&(w=w+" "+_.cssClasses.join(" "));const T={labelStyle:""};let S=void 0!==_.text?_.text:_.id,O="";_.type,O="class_box",c.setNode(_.id,{labelStyle:T.labelStyle,shape:O,labelText:sanitizeText$1(S),classData:_,rx:0,ry:0,class:w,style:T.style,id:_.id,domId:_.domId,tooltip:b.db.getTooltip(_.id)||"",haveCallback:_.haveCallback,link:_.link,width:"group"===_.type?500:void 0,type:_.type,padding:getConfig$1().flowchart.padding}),k.info("setNode",{labelStyle:T.labelStyle,shape:O,labelText:S,rx:0,ry:0,class:w,style:T.style,id:_.id,width:"group"===_.type?500:void 0,type:_.type,padding:getConfig$1().flowchart.padding})}))}(N,O,0,b),function(i,c){const p=getConfig$1().flowchart;let b=0;i.forEach((function(_){b++;const w={classes:"relation"};w.pattern=1==_.relation.lineType?"dashed":"solid",w.id="id"+b,"arrow_open"===_.type?w.arrowhead="none":w.arrowhead="normal",k.info(w,_),w.startLabelRight="none"===_.relationTitle1?"":_.relationTitle1,w.endLabelLeft="none"===_.relationTitle2?"":_.relationTitle2,w.arrowTypeStart=getArrowMarker(_.relation.type1),w.arrowTypeEnd=getArrowMarker(_.relation.type2);let T="",S="";if(void 0!==_.style){const i=getStylesFromArray(_.style);T=i.style,S=i.labelStyle}else T="fill:none";w.style=T,w.labelStyle=S,void 0!==_.interpolate?w.curve=interpolateToCurve(_.interpolate,curveLinear):void 0!==i.defaultInterpolate?w.curve=interpolateToCurve(i.defaultInterpolate,curveLinear):w.curve=interpolateToCurve(p.curve,curveLinear),_.text=_.title,void 0===_.text?void 0!==_.style&&(w.arrowheadStyle="fill: #333"):(w.arrowheadStyle="fill: #333",w.labelpos="c",getConfig$1().flowchart.htmlLabels?(w.labelType="html",w.label=''+_.text+" "):(w.labelType="text",w.label=_.text.replace(Ri.lineBreakRegex,"\n"),void 0===_.style&&(w.style=w.style||"stroke: #333; stroke-width: 1.5px;fill:none"),w.labelStyle=w.labelStyle.replace("color:","fill:"))),c.setEdge(_.id1,_.id2,w,b)}))}(R,O),function(i,c,p,b){k.info(i),i.forEach((function(i,_){const w=i,T="",S="";let O=w.text,N="note";if(c.setNode(w.id,{labelStyle:T,shape:N,labelText:sanitizeText$1(O),noteData:w,rx:0,ry:0,class:"",style:S,id:w.id,domId:w.id,tooltip:"",type:"note",padding:getConfig$1().flowchart.padding}),k.info("setNode",{labelStyle:T,shape:N,labelText:O,rx:0,ry:0,style:S,id:w.id,type:"note",padding:getConfig$1().flowchart.padding}),!w.class||!(w.class in b))return;const R=p+_,Y={classes:"relation",pattern:"dotted"};Y.id=`edgeNote${R}`,Y.arrowhead="none",k.info(`Note edge: ${JSON.stringify(Y)}, ${JSON.stringify(w)}`),Y.startLabelRight="",Y.endLabelLeft="",Y.arrowTypeStart="none",Y.arrowTypeEnd="none",Y.style="fill:none",Y.labelStyle="",Y.curve=interpolateToCurve(jh.curve,curveLinear),c.setEdge(w.id,w.class,Y,R)}))}(Y,O,R.length+1,N),"sandbox"===w&&(j=select("#i"+c));const z=select("sandbox"===w?j.nodes()[0].contentDocument.body:"body"),U=z.select(`[id="${c}"]`),H=z.select("#"+c+" g");if(render$2(H,O,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",c),Ns.insertTitle(U,"classTitleText",_.titleTopMargin,b.db.getDiagramTitle()),setupGraphViewbox$1(O,U,_.diagramPadding,_.useMaxWidth),!_.htmlLabels){const i="sandbox"===w?j.nodes()[0].contentDocument:document,p=i.querySelectorAll('[id="'+c+'"] .edgeLabel .label');for(const c of p){const p=c.getBBox(),b=i.createElementNS("http://www.w3.org/2000/svg","rect");b.setAttribute("rx",0),b.setAttribute("ry",0),b.setAttribute("width",p.width),b.setAttribute("height",p.height),c.insertBefore(b,c.firstChild)}}}};var Wh=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,2],c=[1,5],p=[6,9,11,23,25,27,29,30,31,49],b=[1,17],_=[1,18],k=[1,19],w=[1,20],T=[1,21],S=[1,22],O=[1,25],N=[1,30],R=[1,31],Y=[1,32],j=[1,33],z=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],U=[1,45],H=[30,31,46,47],Z=[4,6,9,11,23,25,27,29,30,31,49],K=[42,43,44,45],J=[22,37],tt=[1,64],et={trace:function trace(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:k[T-1].push(k[T]),this.$=k[T-1];break;case 5:case 6:case 20:case 41:case 28:case 29:case 30:this.$=k[T];break;case 12:b.addEntity(k[T-4]),b.addEntity(k[T-2]),b.addRelationship(k[T-4],k[T],k[T-2],k[T-3]);break;case 13:b.addEntity(k[T-3]),b.addAttributes(k[T-3],k[T-1]);break;case 14:b.addEntity(k[T-2]);break;case 15:b.addEntity(k[T]);break;case 16:case 17:this.$=k[T].trim(),b.setAccTitle(this.$);break;case 18:case 19:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 21:case 39:case 40:case 31:this.$=k[T].replace(/"/g,"");break;case 22:this.$=[k[T]];break;case 23:k[T].push(k[T-1]),this.$=k[T];break;case 24:this.$={attributeType:k[T-1],attributeName:k[T]};break;case 25:this.$={attributeType:k[T-2],attributeName:k[T-1],attributeKeyType:k[T]};break;case 26:this.$={attributeType:k[T-2],attributeName:k[T-1],attributeComment:k[T]};break;case 27:this.$={attributeType:k[T-3],attributeName:k[T-2],attributeKeyType:k[T-1],attributeComment:k[T]};break;case 32:this.$={cardA:k[T],relType:k[T-1],cardB:k[T-2]};break;case 33:this.$=b.Cardinality.ZERO_OR_ONE;break;case 34:this.$=b.Cardinality.ZERO_OR_MORE;break;case 35:this.$=b.Cardinality.ONE_OR_MORE;break;case 36:this.$=b.Cardinality.ONLY_ONE;break;case 37:this.$=b.Identification.NON_IDENTIFYING;break;case 38:this.$=b.Identification.IDENTIFYING;break;case 42:b.parseDirective("%%{","open_directive");break;case 43:b.parseDirective(k[T],"type_directive");break;case 44:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 45:b.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:i,7:3,12:4,49:c},{1:[3]},o(p,[2,3],{5:6}),{3:7,4:i,7:3,12:4,49:c},{13:8,50:[1,9]},{50:[2,42]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:b,25:_,27:k,29:w,30:T,31:S,49:c},{1:[2,2]},{14:23,15:[1,24],52:O},o([15,52],[2,43]),o(p,[2,8],{1:[2,1]}),o(p,[2,4]),{7:15,10:26,12:4,17:16,23:b,25:_,27:k,29:w,30:T,31:S,49:c},o(p,[2,6]),o(p,[2,7]),o(p,[2,11]),o(p,[2,15],{18:27,40:29,20:[1,28],42:N,43:R,44:Y,45:j}),{24:[1,34]},{26:[1,35]},{28:[1,36]},o(p,[2,19]),o(z,[2,20]),o(z,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},o(p,[2,5]),{17:40,30:T,31:S},{21:41,22:[1,42],32:43,33:44,37:U},{41:46,46:[1,47],47:[1,48]},o(H,[2,33]),o(H,[2,34]),o(H,[2,35]),o(H,[2,36]),o(p,[2,16]),o(p,[2,17]),o(p,[2,18]),o(Z,[2,9]),{14:49,52:O},{52:[2,44]},{15:[1,50]},{22:[1,51]},o(p,[2,14]),{21:52,22:[2,22],32:43,33:44,37:U},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:N,43:R,44:Y,45:j},o(K,[2,37]),o(K,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},o(p,[2,13]),{22:[2,23]},o(J,[2,24],{35:61,36:62,38:[1,63],39:tt}),o([22,37,38,39],[2,29]),o([30,31],[2,32]),o(Z,[2,10]),o(p,[2,12]),o(p,[2,39]),o(p,[2,40]),o(p,[2,41]),o(J,[2,25],{36:65,39:tt}),o(J,[2,26]),o([22,37,39],[2,30]),o(J,[2,31]),o(J,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},at={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:case 13:case 15:case 21:case 26:break;case 14:return 11;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 22:return 38;case 23:case 24:return 37;case 25:return 39;case 27:return this.popState(),22;case 28:case 57:return c.yytext[0];case 29:case 33:case 34:case 47:return 42;case 30:case 31:case 32:case 40:case 42:case 49:return 44;case 35:case 36:case 37:case 38:case 39:case 41:case 48:return 43;case 43:case 44:case 45:case 46:return 45;case 50:case 53:case 54:case 55:return 46;case 51:case 52:return 47;case 56:return 30;case 58:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58],inclusive:!0}}};function Parser(){this.yy={}}return et.lexer=at,Parser.prototype=et,et.Parser=Parser,new Parser}();Wh.parser=Wh;const Uh=Wh,erDetector=i=>null!==i.match(/^\s*erDiagram/);let Hh={},qh=[];const addEntity=function(i){return void 0===Hh[i]&&(Hh[i]={attributes:[]},k.info("Added new entity :",i)),Hh[i]},Vh={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().er,addEntity:addEntity,addAttributes:function(i,c){let p,b=addEntity(i);for(p=c.length-1;p>=0;p--)b.attributes.push(c[p]),k.debug("Added attribute ",c[p].attributeName)},getEntities:()=>Hh,addRelationship:function(i,c,p,b){let _={entityA:i,roleA:c,entityB:p,relSpec:b};qh.push(_),k.debug("Added new relationship :",_)},getRelationships:()=>qh,clear:function(){Hh={},qh=[],clear$g()},setAccTitle:setAccTitle,getAccTitle:getAccTitle,setAccDescription:setAccDescription,getAccDescription:getAccDescription,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle},Gh={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},Xh=Gh,erMarkers_insertMarkers=function(i,c){let p;i.append("defs").append("marker").attr("id",Gh.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),i.append("defs").append("marker").attr("id",Gh.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),p=i.append("defs").append("marker").attr("id",Gh.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),p.append("circle").attr("stroke",c.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),p.append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M9,0 L9,18"),p=i.append("defs").append("marker").attr("id",Gh.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),p.append("circle").attr("stroke",c.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),p.append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M21,0 L21,18"),i.append("defs").append("marker").attr("id",Gh.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),i.append("defs").append("marker").attr("id",Gh.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),p=i.append("defs").append("marker").attr("id",Gh.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),p.append("circle").attr("stroke",c.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),p.append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),p=i.append("defs").append("marker").attr("id",Gh.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),p.append("circle").attr("stroke",c.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),p.append("path").attr("stroke",c.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")};let Zh;const Kh=new Uint8Array(16);function rng(){if(!Zh&&(Zh="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zh(Kh)}const Qh=[];for(let i=0;i<256;++i)Qh.push((i+256).toString(16).slice(1));const Jh={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(i,c,p){if(Jh.randomUUID&&!c&&!i)return Jh.randomUUID();const b=(i=i||{}).random||(i.rng||rng)();if(b[6]=15&b[6]|64,b[8]=63&b[8]|128,c){p=p||0;for(let i=0;i<16;++i)c[p+i]=b[i];return c}return function unsafeStringify(i,c=0){return(Qh[i[c+0]]+Qh[i[c+1]]+Qh[i[c+2]]+Qh[i[c+3]]+"-"+Qh[i[c+4]]+Qh[i[c+5]]+"-"+Qh[i[c+6]]+Qh[i[c+7]]+"-"+Qh[i[c+8]]+Qh[i[c+9]]+"-"+Qh[i[c+10]]+Qh[i[c+11]]+Qh[i[c+12]]+Qh[i[c+13]]+Qh[i[c+14]]+Qh[i[c+15]]).toLowerCase()}(b)}const tu=/[^\dA-Za-z](\W)*/g;let eu={},nu=new Map;const drawEntities=function(i,c,p){let b;return Object.keys(c).forEach((function(_){const k=function generateId(i="",c=""){const p=i.replace(tu,"");return`${strWithHyphen(c)}${strWithHyphen(p)}${v4()}`}(_,"entity");nu.set(_,k);const w=i.append("g").attr("id",k);b=void 0===b?k:b;const T="text-"+k,S=w.append("text").classed("er entityLabel",!0).attr("id",T).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",getConfig$1().fontFamily).style("font-size",eu.fontSize+"px").text(_),{width:O,height:N}=((i,c,p)=>{const b=eu.entityPadding/3,_=eu.entityPadding/3,k=.85*eu.fontSize,w=c.node().getBBox(),T=[];let S=!1,O=!1,N=0,R=0,Y=0,j=0,z=w.height+2*b,U=1;p.forEach((i=>{void 0!==i.attributeKeyType&&(S=!0),void 0!==i.attributeComment&&(O=!0)})),p.forEach((p=>{const _=`${c.node().id}-attr-${U}`;let w=0;const H=parseGenericTypes(p.attributeType),Z=i.append("text").classed("er entityLabel",!0).attr("id",`${_}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",getConfig$1().fontFamily).style("font-size",k+"px").text(H),K=i.append("text").classed("er entityLabel",!0).attr("id",`${_}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",getConfig$1().fontFamily).style("font-size",k+"px").text(p.attributeName),J={};J.tn=Z,J.nn=K;const tt=Z.node().getBBox(),et=K.node().getBBox();if(N=Math.max(N,tt.width),R=Math.max(R,et.width),w=Math.max(tt.height,et.height),S){const c=i.append("text").classed("er entityLabel",!0).attr("id",`${_}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",getConfig$1().fontFamily).style("font-size",k+"px").text(p.attributeKeyType||"");J.kn=c;const b=c.node().getBBox();Y=Math.max(Y,b.width),w=Math.max(w,b.height)}if(O){const c=i.append("text").classed("er entityLabel",!0).attr("id",`${_}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",getConfig$1().fontFamily).style("font-size",k+"px").text(p.attributeComment||"");J.cn=c;const b=c.node().getBBox();j=Math.max(j,b.width),w=Math.max(w,b.height)}J.height=w,T.push(J),z+=w+2*b,U+=1}));let H=4;S&&(H+=2),O&&(H+=2);const Z=N+R+Y+j,K={width:Math.max(eu.minEntityWidth,Math.max(w.width+2*eu.entityPadding,Z+_*H)),height:p.length>0?z:Math.max(eu.minEntityHeight,w.height+2*eu.entityPadding)};if(p.length>0){const p=Math.max(0,(K.width-Z-_*H)/(H/2));c.attr("transform","translate("+K.width/2+","+(b+w.height/2)+")");let k=w.height+2*b,z="attributeBoxOdd";T.forEach((c=>{const w=k+b+c.height/2;c.tn.attr("transform","translate("+_+","+w+")");const T=i.insert("rect","#"+c.tn.node().id).classed(`er ${z}`,!0).attr("x",0).attr("y",k).attr("width",N+2*_+p).attr("height",c.height+2*b),U=parseFloat(T.attr("x"))+parseFloat(T.attr("width"));c.nn.attr("transform","translate("+(U+_)+","+w+")");const H=i.insert("rect","#"+c.nn.node().id).classed(`er ${z}`,!0).attr("x",U).attr("y",k).attr("width",R+2*_+p).attr("height",c.height+2*b);let Z=parseFloat(H.attr("x"))+parseFloat(H.attr("width"));if(S){c.kn.attr("transform","translate("+(Z+_)+","+w+")");const T=i.insert("rect","#"+c.kn.node().id).classed(`er ${z}`,!0).attr("x",Z).attr("y",k).attr("width",Y+2*_+p).attr("height",c.height+2*b);Z=parseFloat(T.attr("x"))+parseFloat(T.attr("width"))}O&&(c.cn.attr("transform","translate("+(Z+_)+","+w+")"),i.insert("rect","#"+c.cn.node().id).classed(`er ${z}`,"true").attr("x",Z).attr("y",k).attr("width",j+2*_+p).attr("height",c.height+2*b)),k+=c.height+2*b,z="attributeBoxOdd"===z?"attributeBoxEven":"attributeBoxOdd"}))}else K.height=Math.max(eu.minEntityHeight,z),c.attr("transform","translate("+K.width/2+","+K.height/2+")");return K})(w,S,c[_].attributes),R=w.insert("rect","#"+T).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",O).attr("height",N).node().getBBox();p.setNode(k,{width:R.width,height:R.height,shape:"rect",id:k})})),b},getEdgeName=function(i){return(i.entityA+i.roleA+i.entityB).replace(/\s/g,"")};let ru=0;function strWithHyphen(i=""){return i.length>0?`${i}-`:""}const iu={setConf:function(i){const c=Object.keys(i);for(const p of c)eu[p]=i[p]},draw:function(i,c,p,b){eu=getConfig$1().er,k.info("Drawing ER diagram");const _=getConfig$1().securityLevel;let w;"sandbox"===_&&(w=select("#i"+c));const T=select("sandbox"===_?w.nodes()[0].contentDocument.body:"body").select(`[id='${c}']`);let S;erMarkers_insertMarkers(T,eu),S=new Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:eu.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const O=drawEntities(T,b.db.getEntities(),S),N=function(i,c){return i.forEach((function(i){c.setEdge(nu.get(i.entityA),nu.get(i.entityB),{relationship:i},getEdgeName(i))})),i}(b.db.getRelationships(),S);var R,Y;layout(S),R=T,(Y=S).nodes().forEach((function(i){void 0!==i&&void 0!==Y.node(i)&&R.select("#"+i).attr("transform","translate("+(Y.node(i).x-Y.node(i).width/2)+","+(Y.node(i).y-Y.node(i).height/2)+" )")})),N.forEach((function(i){!function(i,c,p,b,_){ru++;const k=p.edge(nu.get(c.entityA),nu.get(c.entityB),getEdgeName(c)),w=line$1().x((function(i){return i.x})).y((function(i){return i.y})).curve(curveBasis),T=i.insert("path","#"+b).classed("er relationshipLine",!0).attr("d",w(k.points)).style("stroke",eu.stroke).style("fill","none");c.relSpec.relType===_.db.Identification.NON_IDENTIFYING&&T.attr("stroke-dasharray","8,8");let S="";switch(eu.arrowMarkerAbsolute&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\("),S=S.replace(/\)/g,"\\)")),c.relSpec.cardA){case _.db.Cardinality.ZERO_OR_ONE:T.attr("marker-end","url("+S+"#"+Xh.ZERO_OR_ONE_END+")");break;case _.db.Cardinality.ZERO_OR_MORE:T.attr("marker-end","url("+S+"#"+Xh.ZERO_OR_MORE_END+")");break;case _.db.Cardinality.ONE_OR_MORE:T.attr("marker-end","url("+S+"#"+Xh.ONE_OR_MORE_END+")");break;case _.db.Cardinality.ONLY_ONE:T.attr("marker-end","url("+S+"#"+Xh.ONLY_ONE_END+")")}switch(c.relSpec.cardB){case _.db.Cardinality.ZERO_OR_ONE:T.attr("marker-start","url("+S+"#"+Xh.ZERO_OR_ONE_START+")");break;case _.db.Cardinality.ZERO_OR_MORE:T.attr("marker-start","url("+S+"#"+Xh.ZERO_OR_MORE_START+")");break;case _.db.Cardinality.ONE_OR_MORE:T.attr("marker-start","url("+S+"#"+Xh.ONE_OR_MORE_START+")");break;case _.db.Cardinality.ONLY_ONE:T.attr("marker-start","url("+S+"#"+Xh.ONLY_ONE_START+")")}const O=T.node().getTotalLength(),N=T.node().getPointAtLength(.5*O),R="rel"+ru,Y=i.append("text").classed("er relationshipLabel",!0).attr("id",R).attr("x",N.x).attr("y",N.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",getConfig$1().fontFamily).style("font-size",eu.fontSize+"px").text(c.roleA).node().getBBox();i.insert("rect","#"+R).classed("er relationshipLabelBox",!0).attr("x",N.x-Y.width/2).attr("y",N.y-Y.height/2).attr("width",Y.width).attr("height",Y.height)}(T,i,S,O,b)}));const j=eu.diagramPadding;Ns.insertTitle(T,"entityTitleText",eu.titleTopMargin,b.db.getDiagramTitle());const z=T.node().getBBox(),U=z.width+2*j,H=z.height+2*j;configureSvgSize(T,H,U,eu.useMaxWidth),T.attr("viewBox",`${z.x-j} ${z.y-j} ${U} ${H}`)}};var au=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,9],c=[1,7],p=[1,6],b=[1,8],_=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],k=[2,10],w=[1,20],T=[1,21],S=[1,22],O=[1,23],N=[1,30],R=[1,32],Y=[1,33],j=[1,34],z=[1,62],U=[1,48],H=[1,52],Z=[1,36],K=[1,37],J=[1,38],tt=[1,39],et=[1,40],at=[1,56],ot=[1,63],ut=[1,51],pt=[1,53],gt=[1,55],yt=[1,59],vt=[1,60],kt=[1,41],wt=[1,42],Lt=[1,43],Dt=[1,44],Mt=[1,61],It=[1,50],jt=[1,54],Wt=[1,57],te=[1,58],ee=[1,49],ne=[1,66],re=[1,71],ie=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],se=[1,75],oe=[1,74],le=[1,76],pe=[20,21,23,81,82],ge=[1,99],ye=[1,104],me=[1,107],be=[1,108],_e=[1,101],xe=[1,106],ve=[1,109],ke=[1,102],we=[1,114],Ce=[1,113],Se=[1,103],Le=[1,105],De=[1,110],Ne=[1,111],Me=[1,112],Ie=[1,115],Fe=[20,21,22,23,81,82],Re=[20,21,22,23,53,81,82],Pe=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Ye=[20,21,23],Ue=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],He=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Xe=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Ke=[1,149],Qe=[1,157],Je=[1,158],en=[1,159],ln=[1,160],_n=[1,144],xn=[1,145],Cn=[1,141],Sn=[1,152],En=[1,153],An=[1,154],Ln=[1,155],Dn=[1,156],On=[1,161],Mn=[1,162],In=[1,147],Bn=[1,150],Fn=[1,146],$n=[1,143],Rn=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Pn=[1,165],Yn=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],jn=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],zn=[12,21,22,24],Wn=[22,106],Un=[1,250],Hn=[1,245],qn=[1,246],Vn=[1,254],Gn=[1,251],Xn=[1,248],Zn=[1,247],Kn=[1,249],Qn=[1,252],Jn=[1,253],tr=[1,255],er=[1,273],nr=[20,21,23,106],rr=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ir={trace:function trace(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 5:b.parseDirective("%%{","open_directive");break;case 6:b.parseDirective(k[T],"type_directive");break;case 7:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 8:b.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:(!Array.isArray(k[T])||k[T].length>0)&&k[T-1].push(k[T]),this.$=k[T-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=k[T];break;case 19:b.setDirection("TB"),this.$="TB";break;case 20:b.setDirection(k[T-1]),this.$=k[T-1];break;case 35:this.$=k[T-1].nodes;break;case 41:this.$=b.addSubGraph(k[T-6],k[T-1],k[T-4]);break;case 42:this.$=b.addSubGraph(k[T-3],k[T-1],k[T-3]);break;case 43:this.$=b.addSubGraph(void 0,k[T-1],void 0);break;case 45:this.$=k[T].trim(),b.setAccTitle(this.$);break;case 46:case 47:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 51:b.addLink(k[T-2].stmt,k[T],k[T-1]),this.$={stmt:k[T],nodes:k[T].concat(k[T-2].nodes)};break;case 52:b.addLink(k[T-3].stmt,k[T-1],k[T-2]),this.$={stmt:k[T-1],nodes:k[T-1].concat(k[T-3].nodes)};break;case 53:this.$={stmt:k[T-1],nodes:k[T-1]};break;case 54:this.$={stmt:k[T],nodes:k[T]};break;case 55:case 123:case 125:this.$=[k[T]];break;case 56:this.$=k[T-4].concat(k[T]);break;case 57:this.$=[k[T-2]],b.setClass(k[T-2],k[T]);break;case 58:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"square");break;case 59:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"doublecircle");break;case 60:this.$=k[T-5],b.addVertex(k[T-5],k[T-2],"circle");break;case 61:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"ellipse");break;case 62:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"stadium");break;case 63:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"subroutine");break;case 64:this.$=k[T-7],b.addVertex(k[T-7],k[T-1],"rect",void 0,void 0,void 0,Object.fromEntries([[k[T-5],k[T-3]]]));break;case 65:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"cylinder");break;case 66:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"round");break;case 67:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"diamond");break;case 68:this.$=k[T-5],b.addVertex(k[T-5],k[T-2],"hexagon");break;case 69:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"odd");break;case 70:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"trapezoid");break;case 71:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"inv_trapezoid");break;case 72:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"lean_right");break;case 73:this.$=k[T-3],b.addVertex(k[T-3],k[T-1],"lean_left");break;case 74:this.$=k[T],b.addVertex(k[T]);break;case 75:k[T-1].text=k[T],this.$=k[T-1];break;case 76:case 77:k[T-2].text=k[T-1],this.$=k[T-2];break;case 79:var S=b.destructLink(k[T],k[T-2]);this.$={type:S.type,stroke:S.stroke,length:S.length,text:k[T-1]};break;case 80:S=b.destructLink(k[T]);this.$={type:S.type,stroke:S.stroke,length:S.length};break;case 81:this.$=k[T-1];break;case 83:case 97:case 153:case 151:this.$=k[T-1]+""+k[T];break;case 98:case 99:this.$=k[T-4],b.addClass(k[T-2],k[T]);break;case 100:this.$=k[T-4],b.setClass(k[T-2],k[T]);break;case 101:case 109:this.$=k[T-1],b.setClickEvent(k[T-1],k[T]);break;case 102:case 110:this.$=k[T-3],b.setClickEvent(k[T-3],k[T-2]),b.setTooltip(k[T-3],k[T]);break;case 103:this.$=k[T-2],b.setClickEvent(k[T-2],k[T-1],k[T]);break;case 104:this.$=k[T-4],b.setClickEvent(k[T-4],k[T-3],k[T-2]),b.setTooltip(k[T-4],k[T]);break;case 105:case 111:this.$=k[T-1],b.setLink(k[T-1],k[T]);break;case 106:case 112:this.$=k[T-3],b.setLink(k[T-3],k[T-2]),b.setTooltip(k[T-3],k[T]);break;case 107:case 113:this.$=k[T-3],b.setLink(k[T-3],k[T-2],k[T]);break;case 108:case 114:this.$=k[T-5],b.setLink(k[T-5],k[T-4],k[T]),b.setTooltip(k[T-5],k[T-2]);break;case 115:this.$=k[T-4],b.addVertex(k[T-2],void 0,void 0,k[T]);break;case 116:case 118:this.$=k[T-4],b.updateLink(k[T-2],k[T]);break;case 117:this.$=k[T-4],b.updateLink([k[T-2]],k[T]);break;case 119:this.$=k[T-8],b.updateLinkInterpolate([k[T-6]],k[T-2]),b.updateLink([k[T-6]],k[T]);break;case 120:this.$=k[T-8],b.updateLinkInterpolate(k[T-6],k[T-2]),b.updateLink(k[T-6],k[T]);break;case 121:this.$=k[T-6],b.updateLinkInterpolate([k[T-4]],k[T]);break;case 122:this.$=k[T-6],b.updateLinkInterpolate(k[T-4],k[T]);break;case 124:case 126:k[T-2].push(k[T]),this.$=k[T-2];break;case 128:this.$=k[T-1]+k[T];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:i,16:4,21:c,22:p,24:b},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:i,16:4,21:c,22:p,24:b},o(_,k,{17:11}),{7:12,13:[1,13]},{16:14,21:c,22:p,24:b},{16:15,21:c,22:p,24:b},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:w,21:T,22:S,23:O,32:24,33:25,34:26,35:27,36:28,37:29,38:N,43:31,44:R,46:Y,48:j,50:35,51:45,52:z,54:46,66:U,67:H,86:Z,87:K,88:J,89:tt,90:et,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,116:47,118:kt,119:wt,120:Lt,121:Dt,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee},{8:64,10:[1,65],15:ne},o([10,15],[2,6]),o(_,[2,17]),o(_,[2,18]),o(_,[2,19]),{20:[1,68],21:[1,69],22:re,27:67,30:70},o(ie,[2,11]),o(ie,[2,12]),o(ie,[2,13]),o(ie,[2,14]),o(ie,[2,15]),o(ie,[2,16]),{9:72,20:se,21:oe,23:le,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:se,21:oe,23:le},{9:81,20:se,21:oe,23:le},{9:82,20:se,21:oe,23:le},{9:83,20:se,21:oe,23:le},{9:84,20:se,21:oe,23:le},{9:86,20:se,21:oe,22:[1,85],23:le},o(ie,[2,44]),{45:[1,87]},{47:[1,88]},o(ie,[2,47]),o(pe,[2,54],{30:89,22:re}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:ge,52:ye,66:me,67:be,84:[1,97],91:_e,97:96,98:[1,94],100:[1,95],105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:98,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(ie,[2,158]),o(ie,[2,159]),o(ie,[2,160]),o(ie,[2,161]),o(Fe,[2,55],{53:[1,116]}),o(Re,[2,74],{116:129,40:[1,117],52:z,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:U,67:H,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee}),o(Pe,[2,150]),o(Pe,[2,175]),o(Pe,[2,176]),o(Pe,[2,177]),o(Pe,[2,178]),o(Pe,[2,179]),o(Pe,[2,180]),o(Pe,[2,181]),o(Pe,[2,182]),o(Pe,[2,183]),o(Pe,[2,184]),o(Pe,[2,185]),o(Pe,[2,186]),o(Pe,[2,187]),o(Pe,[2,188]),o(Pe,[2,189]),o(Pe,[2,190]),{9:130,20:se,21:oe,23:le},{11:131,14:[1,132]},o(Ye,[2,8]),o(_,[2,20]),o(_,[2,26]),o(_,[2,27]),{21:[1,133]},o(Ue,[2,34],{30:134,22:re}),o(ie,[2,35]),{50:135,51:45,52:z,54:46,66:U,67:H,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,116:47,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee},o(He,[2,48]),o(He,[2,49]),o(He,[2,50]),o(Xe,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Ke,24:Qe,26:Je,38:en,39:139,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),o(ie,[2,36]),o(ie,[2,37]),o(ie,[2,38]),o(ie,[2,39]),o(ie,[2,40]),{22:Ke,24:Qe,26:Je,38:en,39:163,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Rn,k,{17:164}),o(ie,[2,45]),o(ie,[2,46]),o(pe,[2,53],{52:Pn}),{26:ge,52:ye,66:me,67:be,91:_e,97:166,102:[1,167],105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:98,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{95:[1,168],103:169,105:[1,170]},{26:ge,52:ye,66:me,67:be,91:_e,95:[1,171],97:172,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:98,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{26:ge,52:ye,66:me,67:be,91:_e,97:173,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:98,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Ye,[2,101],{22:[1,174],99:[1,175]}),o(Ye,[2,105],{22:[1,176]}),o(Ye,[2,109],{115:100,117:178,22:[1,177],26:ge,52:ye,66:me,67:be,91:_e,105:xe,106:ve,109:ke,111:we,112:Ce,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie}),o(Ye,[2,111],{22:[1,179]}),o(Yn,[2,152]),o(Yn,[2,154]),o(Yn,[2,155]),o(Yn,[2,156]),o(Yn,[2,157]),o(jn,[2,162]),o(jn,[2,163]),o(jn,[2,164]),o(jn,[2,165]),o(jn,[2,166]),o(jn,[2,167]),o(jn,[2,168]),o(jn,[2,169]),o(jn,[2,170]),o(jn,[2,171]),o(jn,[2,172]),o(jn,[2,173]),o(jn,[2,174]),{52:z,54:180,66:U,67:H,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,116:47,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee},{22:Ke,24:Qe,26:Je,38:en,39:181,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:182,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:184,42:ln,52:ye,57:[1,183],66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:185,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:186,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:187,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{66:[1,188]},{22:Ke,24:Qe,26:Je,38:en,39:189,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:190,42:ln,52:ye,66:me,67:be,71:[1,191],73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:192,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:193,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:194,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Pe,[2,151]),o(zn,[2,3]),{8:195,15:ne},{15:[2,7]},o(_,[2,28]),o(Ue,[2,33]),o(pe,[2,51],{30:196,22:re}),o(Xe,[2,75],{22:[1,197]}),{22:[1,198]},{22:Ke,24:Qe,26:Je,38:en,39:199,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,66:me,67:be,73:_n,81:xn,82:[1,200],83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(jn,[2,82]),o(jn,[2,84]),o(jn,[2,140]),o(jn,[2,141]),o(jn,[2,142]),o(jn,[2,143]),o(jn,[2,144]),o(jn,[2,145]),o(jn,[2,146]),o(jn,[2,147]),o(jn,[2,148]),o(jn,[2,149]),o(jn,[2,85]),o(jn,[2,86]),o(jn,[2,87]),o(jn,[2,88]),o(jn,[2,89]),o(jn,[2,90]),o(jn,[2,91]),o(jn,[2,92]),o(jn,[2,93]),o(jn,[2,94]),o(jn,[2,95]),{9:203,20:se,21:oe,22:Ke,23:le,24:Qe,26:Je,38:en,40:[1,202],42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{18:18,19:19,20:w,21:T,22:S,23:O,32:24,33:25,34:26,35:27,36:28,37:29,38:N,42:[1,204],43:31,44:R,46:Y,48:j,50:35,51:45,52:z,54:46,66:U,67:H,86:Z,87:K,88:J,89:tt,90:et,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,116:47,118:kt,119:wt,120:Lt,121:Dt,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee},{22:re,30:205},{22:[1,206],26:ge,52:ye,66:me,67:be,91:_e,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:178,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},o(Wn,[2,123]),{22:[1,211]},{22:[1,212],26:ge,52:ye,66:me,67:be,91:_e,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:178,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:[1,213],26:ge,52:ye,66:me,67:be,91:_e,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:178,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{84:[1,214]},o(Ye,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},o(Yn,[2,153]),{84:[1,219],101:[1,220]},o(Fe,[2,57],{116:129,52:z,66:U,67:H,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee}),{22:Ke,24:Qe,26:Je,38:en,41:[1,221],42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,56:[1,222],66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:223,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,58:[1,224],66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,60:[1,225],66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,62:[1,226],66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,64:[1,227],66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{67:[1,228]},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,66:me,67:be,70:[1,229],73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,66:me,67:be,72:[1,230],73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,39:231,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,41:[1,232],42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,66:me,67:be,73:_n,75:[1,233],77:[1,234],81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,66:me,67:be,73:_n,75:[1,236],77:[1,235],81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{9:237,20:se,21:oe,23:le},o(pe,[2,52],{52:Pn}),o(Xe,[2,77]),o(Xe,[2,76]),{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,66:me,67:be,68:[1,238],73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Xe,[2,79]),o(jn,[2,83]),{22:Ke,24:Qe,26:Je,38:en,39:239,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Rn,k,{17:240}),o(ie,[2,43]),{51:241,52:z,54:46,66:U,67:H,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,116:47,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee},{22:Un,66:Hn,67:qn,86:Vn,96:242,102:Gn,105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},{22:Un,66:Hn,67:qn,86:Vn,96:256,102:Gn,105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},{22:Un,66:Hn,67:qn,86:Vn,96:257,102:Gn,104:[1,258],105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},{22:Un,66:Hn,67:qn,86:Vn,96:259,102:Gn,104:[1,260],105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},{105:[1,261]},{22:Un,66:Hn,67:qn,86:Vn,96:262,102:Gn,105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},{22:Un,66:Hn,67:qn,86:Vn,96:263,102:Gn,105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},{26:ge,52:ye,66:me,67:be,91:_e,97:264,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:98,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Ye,[2,102]),{84:[1,265]},o(Ye,[2,106],{22:[1,266]}),o(Ye,[2,107]),o(Ye,[2,110]),o(Ye,[2,112],{22:[1,267]}),o(Ye,[2,113]),o(Re,[2,58]),o(Re,[2,59]),{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,58:[1,268],66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Re,[2,66]),o(Re,[2,61]),o(Re,[2,62]),o(Re,[2,63]),{66:[1,269]},o(Re,[2,65]),o(Re,[2,67]),{22:Ke,24:Qe,26:Je,38:en,42:ln,52:ye,66:me,67:be,72:[1,270],73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Re,[2,69]),o(Re,[2,70]),o(Re,[2,72]),o(Re,[2,71]),o(Re,[2,73]),o(zn,[2,4]),o([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Ke,24:Qe,26:Je,38:en,41:[1,271],42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{18:18,19:19,20:w,21:T,22:S,23:O,32:24,33:25,34:26,35:27,36:28,37:29,38:N,42:[1,272],43:31,44:R,46:Y,48:j,50:35,51:45,52:z,54:46,66:U,67:H,86:Z,87:K,88:J,89:tt,90:et,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,116:47,118:kt,119:wt,120:Lt,121:Dt,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee},o(Fe,[2,56]),o(Ye,[2,115],{106:er}),o(nr,[2,125],{108:274,22:Un,66:Hn,67:qn,86:Vn,102:Gn,105:Xn,109:Zn,110:Kn,111:Qn,112:Jn,113:tr}),o(rr,[2,127]),o(rr,[2,129]),o(rr,[2,130]),o(rr,[2,131]),o(rr,[2,132]),o(rr,[2,133]),o(rr,[2,134]),o(rr,[2,135]),o(rr,[2,136]),o(rr,[2,137]),o(rr,[2,138]),o(rr,[2,139]),o(Ye,[2,116],{106:er}),o(Ye,[2,117],{106:er}),{22:[1,275]},o(Ye,[2,118],{106:er}),{22:[1,276]},o(Wn,[2,124]),o(Ye,[2,98],{106:er}),o(Ye,[2,99],{106:er}),o(Ye,[2,100],{115:100,117:178,26:ge,52:ye,66:me,67:be,91:_e,105:xe,106:ve,109:ke,111:we,112:Ce,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie}),o(Ye,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:se,21:oe,23:le},o(ie,[2,42]),{22:Un,66:Hn,67:qn,86:Vn,102:Gn,105:Xn,107:283,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},o(rr,[2,128]),{26:ge,52:ye,66:me,67:be,91:_e,97:284,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:98,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{26:ge,52:ye,66:me,67:be,91:_e,97:285,105:xe,106:ve,109:ke,111:we,112:Ce,115:100,117:98,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Ye,[2,108]),o(Ye,[2,114]),o(Re,[2,60]),{22:Ke,24:Qe,26:Je,38:en,39:286,42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:140,84:Cn,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},o(Re,[2,68]),o(Rn,k,{17:287}),o(nr,[2,126],{108:274,22:Un,66:Hn,67:qn,86:Vn,102:Gn,105:Xn,109:Zn,110:Kn,111:Qn,112:Jn,113:tr}),o(Ye,[2,121],{115:100,117:178,22:[1,288],26:ge,52:ye,66:me,67:be,91:_e,105:xe,106:ve,109:ke,111:we,112:Ce,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie}),o(Ye,[2,122],{115:100,117:178,22:[1,289],26:ge,52:ye,66:me,67:be,91:_e,105:xe,106:ve,109:ke,111:we,112:Ce,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie}),{22:Ke,24:Qe,26:Je,38:en,41:[1,290],42:ln,52:ye,66:me,67:be,73:_n,81:xn,83:201,85:151,86:Sn,87:En,88:An,89:Ln,90:Dn,91:On,92:Mn,94:142,95:In,105:xe,106:ve,109:Bn,111:we,112:Ce,113:Fn,114:$n,115:148,122:Se,123:Le,124:De,125:Ne,126:Me,127:Ie},{18:18,19:19,20:w,21:T,22:S,23:O,32:24,33:25,34:26,35:27,36:28,37:29,38:N,42:[1,291],43:31,44:R,46:Y,48:j,50:35,51:45,52:z,54:46,66:U,67:H,86:Z,87:K,88:J,89:tt,90:et,91:at,95:ot,105:ut,106:pt,109:gt,111:yt,112:vt,116:47,118:kt,119:wt,120:Lt,121:Dt,122:Mt,123:It,124:jt,125:Wt,126:te,127:ee},{22:Un,66:Hn,67:qn,86:Vn,96:292,102:Gn,105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},{22:Un,66:Hn,67:qn,86:Vn,96:293,102:Gn,105:Xn,107:243,108:244,109:Zn,110:Kn,111:Qn,112:Jn,113:tr},o(Re,[2,64]),o(ie,[2,41]),o(Ye,[2,119],{106:er}),o(Ye,[2,120],{106:er})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},ar={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:return i.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:return 82;case 69:case 70:case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};function Parser(){this.yy={}}return ir.lexer=ar,Parser.prototype=ir,ir.Parser=Parser,new Parser}();au.parser=au;const su=au,flowDetector=(i,c)=>{var p;return"dagre-wrapper"!==(null==(p=null==c?void 0:c.flowchart)?void 0:p.defaultRenderer)&&null!==i.match(/^\s*graph/)},flowDetectorV2=(i,c)=>{var p;return"dagre-wrapper"===(null==(p=null==c?void 0:c.flowchart)?void 0:p.defaultRenderer)&&null!==i.match(/^\s*graph/)||null!==i.match(/^\s*flowchart/)};let ou,lu,cu=0,hu=getConfig$1(),uu={},du=[],pu={},fu=[],gu={},yu={},mu=0,bu=!0,_u=[];const sanitizeText=i=>Ri.sanitizeText(i,hu),lookUpDomId=function(i){const c=Object.keys(uu);for(const p of c)if(uu[p].id===i)return uu[p].domId;return i},addSingleLink=function(i,c,p,b){const _={start:i,end:c,type:void 0,text:""};void 0!==(b=p.text)&&(_.text=sanitizeText(b.trim()),'"'===_.text[0]&&'"'===_.text[_.text.length-1]&&(_.text=_.text.substring(1,_.text.length-1))),void 0!==p&&(_.type=p.type,_.stroke=p.stroke,_.length=p.length),du.push(_)},setClass$1=function(i,c){i.split(",").forEach((function(i){let p=i;void 0!==uu[p]&&uu[p].classes.push(c),void 0!==gu[p]&&gu[p].classes.push(c)}))},setupToolTips=function(i){let c=select(".mermaidTooltip");null===(c._groups||c)[0][0]&&(c=select("body").append("div").attr("class","mermaidTooltip").style("opacity",0));select(i).select("svg").selectAll("g.node").on("mouseover",(function(){const i=select(this);if(null===i.attr("title"))return;const p=this.getBoundingClientRect();c.transition().duration(200).style("opacity",".9"),c.text(i.attr("title")).style("left",window.scrollX+p.left+(p.right-p.left)/2+"px").style("top",window.scrollY+p.top-14+document.body.scrollTop+"px"),c.html(c.html().replace(/<br\/>/g," ")),i.classed("hover",!0)})).on("mouseout",(function(){c.transition().duration(500).style("opacity",0);select(this).classed("hover",!1)}))};_u.push(setupToolTips);const getPosForId=function(i){for(const[c,p]of fu.entries())if(p.id===i)return c;return-1};let xu=-1;const vu=[],indexNodes2=function(i,c){const p=fu[c].nodes;if(xu+=1,xu>2e3)return;if(vu[xu]=c,fu[c].id===i)return{result:!0,count:0};let b=0,_=1;for(;b=0){const p=indexNodes2(i,c);if(p.result)return{result:!0,count:_+p.count};_+=p.count}b+=1}return{result:!1,count:_}},exists=(i,c)=>{let p=!1;return i.forEach((i=>{i.nodes.indexOf(c)>=0&&(p=!0)})),p},makeUniq=(i,c)=>{const p=[];return i.nodes.forEach(((b,_)=>{exists(c,b)||p.push(i.nodes[_])})),{nodes:p}},ku={parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},defaultConfig:()=>Hs.flowchart,setAccTitle:setAccTitle,getAccTitle:getAccTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription,addVertex:function(i,c,p,b,_,k,w={}){let T,S=i;void 0!==S&&0!==S.trim().length&&(void 0===uu[S]&&(uu[S]={id:S,domId:"flowchart-"+S+"-"+cu,styles:[],classes:[]}),cu++,void 0!==c?(hu=getConfig$1(),T=sanitizeText(c.trim()),'"'===T[0]&&'"'===T[T.length-1]&&(T=T.substring(1,T.length-1)),uu[S].text=T):void 0===uu[S].text&&(uu[S].text=i),void 0!==p&&(uu[S].type=p),null!=b&&b.forEach((function(i){uu[S].styles.push(i)})),null!=_&&_.forEach((function(i){uu[S].classes.push(i)})),void 0!==k&&(uu[S].dir=k),void 0===uu[S].props?uu[S].props=w:void 0!==w&&Object.assign(uu[S].props,w))},lookUpDomId:lookUpDomId,addLink:function(i,c,p,b){let _,k;for(_=0;_/)&&(ou="LR"),ou.match(/.*v/)&&(ou="TB")},setClass:setClass$1,setTooltip:function(i,c){i.split(",").forEach((function(i){void 0!==c&&(yu["gen-1"===lu?lookUpDomId(i):i]=sanitizeText(c))}))},getTooltip:function(i){return yu[i]},setClickEvent:function(i,c,p){i.split(",").forEach((function(i){!function(i,c,p){let b=lookUpDomId(i);if("loose"!==getConfig$1().securityLevel)return;if(void 0===c)return;let _=[];if("string"==typeof p){_=p.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i<_.length;i++){let c=_[i].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),_[i]=c}}0===_.length&&_.push(i),void 0!==uu[i]&&(uu[i].haveCallback=!0,_u.push((function(){const i=document.querySelector(`[id="${b}"]`);null!==i&&i.addEventListener("click",(function(){Ns.runFunc(c,..._)}),!1)})))}(i,c,p)})),setClass$1(i,"clickable")},setLink:function(i,c,p){i.split(",").forEach((function(i){void 0!==uu[i]&&(uu[i].link=Ns.formatUrl(c,hu),uu[i].linkTarget=p)})),setClass$1(i,"clickable")},bindFunctions:function(i){_u.forEach((function(c){c(i)}))},getDirection:function(){return ou.trim()},getVertices:function(){return uu},getEdges:function(){return du},getClasses:function(){return pu},clear:function(i="gen-1"){uu={},pu={},du=[],_u=[setupToolTips],fu=[],gu={},mu=0,yu=[],bu=!0,lu=i,clear$g()},setGen:i=>{lu=i||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(i,c,p){let b=i.trim(),_=p;i===p&&p.match(/\s/)&&(b=void 0);let w=[];const{nodeList:T,dir:S}=function uniq(i){const c={boolean:{},number:{},string:{}},p=[];let b;return{nodeList:i.filter((function(i){const _=typeof i;return i.stmt&&"dir"===i.stmt?(b=i.value,!1):""!==i.trim()&&(_ in c?!c[_].hasOwnProperty(i)&&(c[_][i]=!0):!p.includes(i)&&p.push(i))})),dir:b}}(w.concat.apply(w,c));if(w=T,"gen-1"===lu)for(let i=0;i0&&indexNodes2("none",fu.length-1)},getSubGraphs:function(){return fu},destructLink:(i,c)=>{const p=(i=>{const c=i.trim();let p=c.slice(0,-1),b="arrow_open";switch(c.slice(-1)){case"x":b="arrow_cross","x"===c[0]&&(b="double_"+b,p=p.slice(1));break;case">":b="arrow_point","<"===c[0]&&(b="double_"+b,p=p.slice(1));break;case"o":b="arrow_circle","o"===c[0]&&(b="double_"+b,p=p.slice(1))}let _="normal",k=p.length-1;"="===p[0]&&(_="thick");let w=((i,c)=>{const p=c.length;let b=0;for(let _=0;_{let c=i.trim(),p="arrow_open";switch(c[0]){case"<":p="arrow_point",c=c.slice(1);break;case"x":p="arrow_cross",c=c.slice(1);break;case"o":p="arrow_circle",c=c.slice(1)}let b="normal";return c.includes("=")&&(b="thick"),c.includes(".")&&(b="dotted"),{type:p,stroke:b}})(c),b.stroke!==p.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===b.type)b.type=p.type;else{if(b.type!==p.type)return{type:"INVALID",stroke:"INVALID"};b.type="double_"+b.type}return"double_arrow"===b.type&&(b.type="double_arrow_point"),b.length=p.length,b}return p},lex:{firstGraph:()=>!!bu&&(bu=!1,!0)},exists:exists,makeUniq:makeUniq,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle};function applyStyle(i,c){c&&i.attr("style",c)}function addHtmlLabel(i,c){var p=i.append("foreignObject").attr("width","100000"),b=p.append("xhtml:div");b.attr("xmlns","http://www.w3.org/1999/xhtml");var _=c.label;switch(typeof _){case"function":b.insert(_);break;case"object":b.insert((function(){return _}));break;default:b.html(_)}applyStyle(b,c.labelStyle),b.style("display","inline-block"),b.style("white-space","nowrap");var k=b.node().getBoundingClientRect();return p.attr("width",k.width).attr("height",k.height),p}const wu={},flowRenderer_setConf=function(i){const c=Object.keys(i);for(const p of c)wu[p]=i[p]},Tu={},addVertices=function(i,c,p,b,_,w){const T=b.select(`[id="${p}"]`);Object.keys(i).forEach((function(p){const b=i[p];let S="default";b.classes.length>0&&(S=b.classes.join(" "));const O=getStylesFromArray(b.styles);let N,R=void 0!==b.text?b.text:b.id;if(evaluate(getConfig$1().flowchart.htmlLabels)){const i={label:R.replace(/fa[blrs]?:fa-[\w-]+/g,(i=>` `))};N=addHtmlLabel(T,i).node(),N.parentNode.removeChild(N)}else{const i=_.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",O.labelStyle.replace("color:","fill:"));const c=R.split(Ri.lineBreakRegex);for(const p of c){const c=_.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","1"),c.textContent=p,i.appendChild(c)}N=i}let Y=0,j="";switch(b.type){case"round":Y=5,j="rect";break;case"square":case"group":default:j="rect";break;case"diamond":j="question";break;case"hexagon":j="hexagon";break;case"odd":case"odd_right":j="rect_left_inv_arrow";break;case"lean_right":j="lean_right";break;case"lean_left":j="lean_left";break;case"trapezoid":j="trapezoid";break;case"inv_trapezoid":j="inv_trapezoid";break;case"circle":j="circle";break;case"ellipse":j="ellipse";break;case"stadium":j="stadium";break;case"subroutine":j="subroutine";break;case"cylinder":j="cylinder";break;case"doublecircle":j="doublecircle"}c.setNode(b.id,{labelStyle:O.labelStyle,shape:j,labelText:R,rx:Y,ry:Y,class:S,style:O.style,id:b.id,link:b.link,linkTarget:b.linkTarget,tooltip:w.db.getTooltip(b.id)||"",domId:w.db.lookUpDomId(b.id),haveCallback:b.haveCallback,width:"group"===b.type?500:void 0,dir:b.dir,type:b.type,props:b.props,padding:getConfig$1().flowchart.padding}),k.info("setNode",{labelStyle:O.labelStyle,shape:j,labelText:R,rx:Y,ry:Y,class:S,style:O.style,id:b.id,domId:w.db.lookUpDomId(b.id),width:"group"===b.type?500:void 0,type:b.type,dir:b.dir,props:b.props,padding:getConfig$1().flowchart.padding})}))},addEdges=function(i,c,p){k.info("abc78 edges = ",i);let b,_,w=0,T={};if(void 0!==i.defaultStyle){const c=getStylesFromArray(i.defaultStyle);b=c.style,_=c.labelStyle}i.forEach((function(p){w++;var S="L-"+p.start+"-"+p.end;void 0===T[S]?(T[S]=0,k.info("abc78 new entry",S,T[S])):(T[S]++,k.info("abc78 new entry",S,T[S]));let O=S+"-"+T[S];k.info("abc78 new link id to be used is",S,O,T[S]);var N="LS-"+p.start,R="LE-"+p.end;const Y={style:"",labelStyle:""};switch(Y.minlen=p.length||1,"arrow_open"===p.type?Y.arrowhead="none":Y.arrowhead="normal",Y.arrowTypeStart="arrow_open",Y.arrowTypeEnd="arrow_open",p.type){case"double_arrow_cross":Y.arrowTypeStart="arrow_cross";case"arrow_cross":Y.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":Y.arrowTypeStart="arrow_point";case"arrow_point":Y.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":Y.arrowTypeStart="arrow_circle";case"arrow_circle":Y.arrowTypeEnd="arrow_circle"}let j="",z="";switch(p.stroke){case"normal":j="fill:none;",void 0!==b&&(j=b),void 0!==_&&(z=_),Y.thickness="normal",Y.pattern="solid";break;case"dotted":Y.thickness="normal",Y.pattern="dotted",Y.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":Y.thickness="thick",Y.pattern="solid",Y.style="stroke-width: 3.5px;fill:none;"}if(void 0!==p.style){const i=getStylesFromArray(p.style);j=i.style,z=i.labelStyle}Y.style=Y.style+=j,Y.labelStyle=Y.labelStyle+=z,void 0!==p.interpolate?Y.curve=interpolateToCurve(p.interpolate,curveLinear):void 0!==i.defaultInterpolate?Y.curve=interpolateToCurve(i.defaultInterpolate,curveLinear):Y.curve=interpolateToCurve(Tu.curve,curveLinear),void 0===p.text?void 0!==p.style&&(Y.arrowheadStyle="fill: #333"):(Y.arrowheadStyle="fill: #333",Y.labelpos="c"),Y.labelType="text",Y.label=p.text.replace(Ri.lineBreakRegex,"\n"),void 0===p.style&&(Y.style=Y.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),Y.labelStyle=Y.labelStyle.replace("color:","fill:"),Y.id=O,Y.classes="flowchart-link "+N+" "+R,c.setEdge(p.start,p.end,Y,w)}))},Cu={setConf:function(i){const c=Object.keys(i);for(const p of c)Tu[p]=i[p]},addVertices:addVertices,addEdges:addEdges,getClasses:function(i,c){k.info("Extracting classes"),c.db.clear();try{return c.parse(i),c.db.getClasses()}catch(i){return}},draw:function(i,c,p,b){k.info("Drawing flowchart"),b.db.clear(),ku.setGen("gen-2"),b.parser.parse(i);let _=b.db.getDirection();void 0===_&&(_="TD");const{securityLevel:w,flowchart:T}=getConfig$1(),S=T.nodeSpacing||50,O=T.rankSpacing||50;let N;"sandbox"===w&&(N=select("#i"+c));const R=select("sandbox"===w?N.nodes()[0].contentDocument.body:"body"),Y="sandbox"===w?N.nodes()[0].contentDocument:document,j=new Graph({multigraph:!0,compound:!0}).setGraph({rankdir:_,nodesep:S,ranksep:O,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let z;const U=b.db.getSubGraphs();k.info("Subgraphs - ",U);for(let i=U.length-1;i>=0;i--)z=U[i],k.info("Subgraph - ",z),b.db.addVertex(z.id,z.title,"group",void 0,z.classes,z.dir);const H=b.db.getVertices(),Z=b.db.getEdges();k.info(Z);let K=0;for(K=U.length-1;K>=0;K--){z=U[K],selectAll("cluster").append("text");for(let i=0;iN&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},et={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 38;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 27:return 37;case 28:this.begin("click");break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function Parser(){this.yy={}}return tt.lexer=et,Parser.prototype=tt,tt.Parser=Parser,new Parser}();Su.parser=Su;const Eu=Su,ganttDetector=i=>null!==i.match(/^\s*gantt/);let Au,Lu="",Du="",Ou="",Nu=[],Mu=[],Iu={},Bu=[],Fu=[],$u="";const Ru=["active","done","crit","milestone"];let Pu=[],Yu=!1,ju=!1,zu=0;const isInvalidDate=function(i,c,p,b){return!b.includes(i.format(c.trim()))&&(!!(i.isoWeekday()>=6&&p.includes("weekends"))||(!!p.includes(i.format("dddd").toLowerCase())||p.includes(i.format(c.trim()))))},checkTaskDates=function(i,c,p,_){if(!p.length||i.manualEndTime)return;let k=b(i.startTime,c,!0);k.add(1,"d");let w=b(i.endTime,c,!0),T=fixTaskDates(k,w,c,p,_);i.endTime=w.toDate(),i.renderEndTime=T},fixTaskDates=function(i,c,p,b,_){let k=!1,w=null;for(;i<=c;)k||(w=c.toDate()),k=isInvalidDate(i,p,b,_),k&&c.add(1,"d"),i.add(1,"d");return w},getStartDate=function(i,c,p){p=p.trim();const _=/^after\s+([\d\w- ]+)/.exec(p.trim());if(null!==_){let i=null;if(_[1].split(" ").forEach((function(c){let p=findTaskById(c);void 0!==p&&(i?p.endTime>i.endTime&&(i=p):i=p)})),i)return i.endTime;{const i=new Date;return i.setHours(0,0,0,0),i}}let w=b(p,c.trim(),!0);if(w.isValid())return w.toDate();{k.debug("Invalid date:"+p),k.debug("With date format:"+c.trim());const i=new Date(p);if(void 0===i||isNaN(i.getTime()))throw new Error("Invalid date:"+p);return i}},parseDuration=function(i){const c=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(i.trim());return null!==c?b.duration(Number.parseFloat(c[1]),c[2]):b.duration.invalid()},getEndDate=function(i,c,p,_=!1){p=p.trim();let k=b(p,c.trim(),!0);if(k.isValid())return _&&k.add(1,"d"),k.toDate();const w=b(i),T=parseDuration(p);return T.isValid()&&w.add(T),w.toDate()};let Wu=0;const parseId=function(i){return void 0===i?(Wu+=1,"task"+Wu):i};let Uu,Hu,qu=[];const Vu={},findTaskById=function(i){const c=Vu[i];return qu[c]},compileTasks$1=function(){const compileTask=function(i){const c=qu[i];let p="";switch(qu[i].raw.startTime.type){case"prevTaskEnd":{const i=findTaskById(c.prevTaskId);c.startTime=i.endTime;break}case"getStartDate":p=getStartDate(0,Lu,qu[i].raw.startTime.startData),p&&(qu[i].startTime=p)}return qu[i].startTime&&(qu[i].endTime=getEndDate(qu[i].startTime,Lu,qu[i].raw.endTime.data,Yu),qu[i].endTime&&(qu[i].processed=!0,qu[i].manualEndTime=b(qu[i].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),checkTaskDates(qu[i],Lu,Mu,Nu))),qu[i].processed};let i=!0;for(const[c,p]of qu.entries())compileTask(c),i=i&&p.processed;return i},setClass=function(i,c){i.split(",").forEach((function(i){let p=findTaskById(i);void 0!==p&&p.classes.push(c)}))},pushFun=function(i,c){Pu.push((function(){const p=document.querySelector(`[id="${i}"]`);null!==p&&p.addEventListener("click",(function(){c()}))}),(function(){const p=document.querySelector(`[id="${i}-text"]`);null!==p&&p.addEventListener("click",(function(){c()}))}))},Gu={parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().gantt,clear:function(){Bu=[],Fu=[],$u="",Pu=[],Wu=0,Uu=void 0,Hu=void 0,qu=[],Lu="",Du="",Au=void 0,Ou="",Nu=[],Mu=[],Yu=!1,ju=!1,zu=0,Iu={},clear$g()},setDateFormat:function(i){Lu=i},getDateFormat:function(){return Lu},enableInclusiveEndDates:function(){Yu=!0},endDatesAreInclusive:function(){return Yu},enableTopAxis:function(){ju=!0},topAxisEnabled:function(){return ju},setAxisFormat:function(i){Du=i},getAxisFormat:function(){return Du},setTickInterval:function(i){Au=i},getTickInterval:function(){return Au},setTodayMarker:function(i){Ou=i},getTodayMarker:function(){return Ou},setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,setAccDescription:setAccDescription,getAccDescription:getAccDescription,addSection:function(i){$u=i,Bu.push(i)},getSections:function(){return Bu},getTasks:function(){let i=compileTasks$1();let c=0;for(;!i&&c<10;)i=compileTasks$1(),c++;return Fu=qu,Fu},addTask:function(i,c){const p={section:$u,type:$u,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:c},task:i,classes:[]},b=function(i,c){let p;p=":"===c.substr(0,1)?c.substr(1,c.length):c;const b=p.split(","),_={};getTaskTags(b,_,Ru);for(let i=0;i{Ns.runFunc(c,...b)}))}(i,c,p)})),setClass(i,"clickable")},setLink:function(i,c){let p=c;"loose"!==getConfig$1().securityLevel&&(p=T(c)),i.split(",").forEach((function(i){void 0!==findTaskById(i)&&(pushFun(i,(()=>{window.open(p,"_self")})),Iu[i]=p)})),setClass(i,"clickable")},getLinks:function(){return Iu},bindFunctions:function(i){Pu.forEach((function(c){c(i)}))},parseDuration:parseDuration,isInvalidDate:isInvalidDate};function getTaskTags(i,c,p){let b=!0;for(;b;)b=!1,p.forEach((function(p){const _=new RegExp("^\\s*"+p+"\\s*$");i[0].match(_)&&(c[p]=!0,i.shift(1),b=!0)}))}let Xu;const Zu={setConf:function(){k.debug("Something is calling, setConf, remove the call")},draw:function(i,c,p,_){const k=getConfig$1().gantt,w=getConfig$1().securityLevel;let T;"sandbox"===w&&(T=select("#i"+c));const S=select("sandbox"===w?T.nodes()[0].contentDocument.body:"body"),O="sandbox"===w?T.nodes()[0].contentDocument:document,N=O.getElementById(c);Xu=N.parentElement.offsetWidth,void 0===Xu&&(Xu=1200),void 0!==k.useWidth&&(Xu=k.useWidth);const R=_.db.getTasks(),Y=R.length*(k.barHeight+k.barGap)+2*k.topPadding;N.setAttribute("viewBox","0 0 "+Xu+" "+Y);const j=S.select(`[id="${c}"]`),z=function time$1(){return initRange.apply(calendar(Er,Ar,cr,or,Jn,Qn,Zn,Gn,qn,Dr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([min$2(R,(function(i){return i.startTime})),max$2(R,(function(i){return i.endTime}))]).rangeRound([0,Xu-k.leftPadding-k.rightPadding]);let U=[];for(const i of R)U.push(i.type);const H=U;function getCount(i,c){return function getCounts(i){let c=i.length;const p={};for(;c;)p[i[--c]]=(p[i[c]]||0)+1;return p}(c)[i]||0}U=function checkUnique(i){const c={},p=[];for(let b=0,_=i.length;b<_;++b)Object.prototype.hasOwnProperty.call(c,i[b])||(c[i[b]]=!0,p.push(i[b]));return p}(U),R.sort((function taskCompare(i,c){const p=i.startTime,b=c.startTime;let _=0;return p>b?_=1:pi?Math.min(i,c):c),0),Y=S.reduce(((i,{endTime:c})=>i?Math.max(i,c):c),0),U=_.db.getDateFormat();if(!R||!Y)return;const H=[];let Z=null,K=b(R);for(;K.valueOf()<=Y;)_.db.isInvalidDate(K,U,O,N)?Z?Z.end=K.clone():Z={start:K.clone(),end:K.clone()}:Z&&(H.push(Z),Z=null),K.add(1,"d");j.append("g").selectAll("rect").data(H).enter().append("rect").attr("id",(function(i){return"exclude-"+i.start.format("YYYY-MM-DD")})).attr("x",(function(i){return z(i.start)+p})).attr("y",k.gridLineStartPadding).attr("width",(function(i){const c=i.end.clone().add(1,"day");return z(c)-z(i.start)})).attr("height",T-c-k.gridLineStartPadding).attr("transform-origin",(function(c,b){return(z(c.start)+p+.5*(z(c.end)-z(c.start))).toString()+"px "+(b*i+.5*T).toString()+"px"})).attr("class","exclude-range")})(S,N,R,0,w,i,_.db.getExcludes(),_.db.getIncludes()),function makeGrid(i,c,p,b){let w=function axisBottom(i){return axis(3,i)}(z).tickSize(-b+c+k.gridLineStartPadding).tickFormat(Dr(_.db.getAxisFormat()||k.axisFormat||"%Y-%m-%d"));const T=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(_.db.getTickInterval()||k.tickInterval);if(null!==T){const i=T[1];switch(T[2]){case"minute":w.ticks(Gn.every(i));break;case"hour":w.ticks(Zn.every(i));break;case"day":w.ticks(Qn.every(i));break;case"week":w.ticks(Jn.every(i));break;case"month":w.ticks(or.every(i))}}if(j.append("g").attr("class","grid").attr("transform","translate("+i+", "+(b-50)+")").call(w).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),_.db.topAxisEnabled()||k.topAxis){let p=function axisTop(i){return axis(1,i)}(z).tickSize(-b+c+k.gridLineStartPadding).tickFormat(Dr(_.db.getAxisFormat()||k.axisFormat||"%Y-%m-%d"));if(null!==T){const i=T[1];switch(T[2]){case"minute":p.ticks(Gn.every(i));break;case"hour":p.ticks(Zn.every(i));break;case"day":p.ticks(Qn.every(i));break;case"week":p.ticks(Jn.every(i));break;case"month":p.ticks(or.every(i))}}j.append("g").attr("class","grid").attr("transform","translate("+i+", "+c+")").call(p).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(R,N,0,w),function drawRects(i,p,b,w,T,S,O){j.append("g").selectAll("rect").data(i).enter().append("rect").attr("x",0).attr("y",(function(i,c){return i.order*p+b-2})).attr("width",(function(){return O-k.rightPadding/2})).attr("height",p).attr("class",(function(i){for(const[c,p]of U.entries())if(i.type===p)return"section section"+c%k.numberSectionStyles;return"section section0"}));const N=j.append("g").selectAll("rect").data(i).enter(),R=_.db.getLinks();N.append("rect").attr("id",(function(i){return i.id})).attr("rx",3).attr("ry",3).attr("x",(function(i){return i.milestone?z(i.startTime)+w+.5*(z(i.endTime)-z(i.startTime))-.5*T:z(i.startTime)+w})).attr("y",(function(i,c){return i.order*p+b})).attr("width",(function(i){return i.milestone?T:z(i.renderEndTime||i.endTime)-z(i.startTime)})).attr("height",T).attr("transform-origin",(function(i,c){return c=i.order,(z(i.startTime)+w+.5*(z(i.endTime)-z(i.startTime))).toString()+"px "+(c*p+b+.5*T).toString()+"px"})).attr("class",(function(i){const c="task";let p="";i.classes.length>0&&(p=i.classes.join(" "));let b=0;for(const[c,p]of U.entries())i.type===p&&(b=c%k.numberSectionStyles);let _="";return i.active?i.crit?_+=" activeCrit":_=" active":i.done?_=i.crit?" doneCrit":" done":i.crit&&(_+=" crit"),0===_.length&&(_=" task"),i.milestone&&(_=" milestone "+_),_+=b,_+=" "+p,c+_})),N.append("text").attr("id",(function(i){return i.id+"-text"})).text((function(i){return i.task})).attr("font-size",k.fontSize).attr("x",(function(i){let c=z(i.startTime),p=z(i.renderEndTime||i.endTime);i.milestone&&(c+=.5*(z(i.endTime)-z(i.startTime))-.5*T),i.milestone&&(p=c+T);const b=this.getBBox().width;return b>p-c?p+b+1.5*k.leftPadding>O?c+w-5:p+w+5:(p-c)/2+c+w})).attr("y",(function(i,c){return i.order*p+k.barHeight/2+(k.fontSize/2-2)+b})).attr("text-height",T).attr("class",(function(i){const c=z(i.startTime);let p=z(i.endTime);i.milestone&&(p=c+T);const b=this.getBBox().width;let _="";i.classes.length>0&&(_=i.classes.join(" "));let w=0;for(const[c,p]of U.entries())i.type===p&&(w=c%k.numberSectionStyles);let S="";return i.active&&(S=i.crit?"activeCritText"+w:"activeText"+w),i.done?S=i.crit?S+" doneCritText"+w:S+" doneText"+w:i.crit&&(S=S+" critText"+w),i.milestone&&(S+=" milestoneText"),b>p-c?p+b+1.5*k.leftPadding>O?_+" taskTextOutsideLeft taskTextOutside"+w+" "+S:_+" taskTextOutsideRight taskTextOutside"+w+" "+S+" width-"+b:_+" taskText taskText"+w+" "+S+" width-"+b}));if("sandbox"===getConfig$1().securityLevel){let i;i=select("#i"+c);const p=i.nodes()[0].contentDocument;N.filter((function(i){return void 0!==R[i.id]})).each((function(i){var c=p.querySelector("#"+i.id),b=p.querySelector("#"+i.id+"-text");const _=c.parentNode;var k=p.createElement("a");k.setAttribute("xlink:href",R[i.id]),k.setAttribute("target","_top"),_.appendChild(k),k.appendChild(c),k.appendChild(b)}))}}(i,S,N,R,T,0,p),function vertLabels(i,c){const p=[];let b=0;for(const[i,c]of U.entries())p[i]=[c,getCount(c,H)];j.append("g").selectAll("text").data(p).enter().append((function(i){const c=i[0].split(Ri.lineBreakRegex),p=-(c.length-1)/2,b=O.createElementNS("http://www.w3.org/2000/svg","text");b.setAttribute("dy",p+"em");for(const[i,p]of c.entries()){const c=O.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttribute("alignment-baseline","central"),c.setAttribute("x","10"),i>0&&c.setAttribute("dy","1em"),c.textContent=p,b.appendChild(c)}return b})).attr("x",10).attr("y",(function(_,k){if(!(k>0))return _[1]*i/2+c;for(let w=0;wN&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function Parser(){this.yy={}}return c.lexer=p,Parser.prototype=c,c.Parser=Parser,new Parser}();Ku.parser=Ku;const Qu=Ku;var Ju="",td=!1;const ed={setMessage:i=>{k.debug("Setting message to: "+i),Ju=i},getMessage:()=>Ju,setInfo:i=>{td=i},getInfo:()=>td,clear:clear$g},nd={draw:(i,c,p)=>{try{k.debug("Rendering info diagram\n"+i);const b=getConfig$1().securityLevel;let _;"sandbox"===b&&(_=select("#i"+c));const w=select("sandbox"===b?_.nodes()[0].contentDocument.body:"body").select("#"+c);w.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+p),w.attr("height",100),w.attr("width",400)}catch(i){k.error("Error while rendering info diagram"),k.error(i.message)}}},infoDetector=i=>null!==i.match(/^\s*info/);var rd=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,4],c=[1,5],p=[1,6],b=[1,7],_=[1,9],k=[1,11,13,15,17,19,20,26,27,28,29],w=[2,5],T=[1,6,11,13,15,17,19,20,26,27,28,29],S=[26,27,28],O=[2,8],N=[1,18],R=[1,19],Y=[1,20],j=[1,21],z=[1,22],U=[1,23],H=[1,28],Z=[6,26,27,28,29],K={trace:function trace(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 4:b.setShowData(!0);break;case 7:this.$=k[T-1];break;case 9:b.addSection(k[T-1],b.cleanupValue(k[T]));break;case 10:this.$=k[T].trim(),b.setDiagramTitle(this.$);break;case 11:this.$=k[T].trim(),b.setAccTitle(this.$);break;case 12:case 13:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 14:b.addSection(k[T].substr(8)),this.$=k[T].substr(8);break;case 21:b.parseDirective("%%{","open_directive");break;case 22:b.parseDirective(k[T],"type_directive");break;case 23:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 24:b.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:i,21:8,26:c,27:p,28:b,29:_},{1:[3]},{3:10,4:2,5:3,6:i,21:8,26:c,27:p,28:b,29:_},{3:11,4:2,5:3,6:i,21:8,26:c,27:p,28:b,29:_},o(k,w,{7:12,8:[1,13]}),o(T,[2,18]),o(T,[2,19]),o(T,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},o(S,O,{21:8,9:16,10:17,5:24,1:[2,3],11:N,13:R,15:Y,17:j,19:z,20:U,29:_}),o(k,w,{7:25}),{23:26,24:[1,27],32:H},o([24,32],[2,22]),o(k,[2,6]),{4:29,26:c,27:p,28:b},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},o(S,[2,13]),o(S,[2,14]),o(S,[2,15]),o(S,O,{21:8,9:16,10:17,5:24,1:[2,4],11:N,13:R,15:Y,17:j,19:z,20:U,29:_}),o(Z,[2,16]),{25:34,31:[1,35]},o(Z,[2,24]),o(k,[2,7]),o(S,[2,9]),o(S,[2,10]),o(S,[2,11]),o(S,[2,12]),{23:36,32:H},{32:[2,23]},o(Z,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},J={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};function Parser(){this.yy={}}return K.lexer=J,Parser.prototype=K,K.Parser=Parser,new Parser}();rd.parser=rd;const id=rd,pieDetector=i=>null!==i.match(/^\s*pie/)||null!==i.match(/^\s*bar/);let ad={},sd=!1;const od={parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().pie,addSection:function(i,c){i=Ri.sanitizeText(i,getConfig$1()),void 0===ad[i]&&(ad[i]=c,k.debug("Added new section :",i))},getSections:()=>ad,cleanupValue:function(i){return":"===i.substring(0,1)?(i=i.substring(1).trim(),Number(i.trim())):Number(i.trim())},clear:function(){ad={},sd=!1,clear$g()},setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,setShowData:function(i){sd=i},getShowData:function(){return sd},getAccDescription:getAccDescription,setAccDescription:setAccDescription};let ld,cd=getConfig$1();const hd=450,ud={draw:(i,c,p,b)=>{try{cd=getConfig$1(),k.debug("Rendering info diagram\n"+i);const p=getConfig$1().securityLevel;let Z;"sandbox"===p&&(Z=select("#i"+c));const K=select("sandbox"===p?Z.nodes()[0].contentDocument.body:"body"),J="sandbox"===p?Z.nodes()[0].contentDocument:document;b.db.clear(),b.parser.parse(i),k.debug("Parsed info diagram");const tt=J.getElementById(c);ld=tt.parentElement.offsetWidth,void 0===ld&&(ld=1200),void 0!==cd.useWidth&&(ld=cd.useWidth),void 0!==cd.pie.useWidth&&(ld=cd.pie.useWidth);const et=K.select("#"+c);configureSvgSize(et,hd,ld,cd.pie.useMaxWidth),tt.setAttribute("viewBox","0 0 "+ld+" "+hd);var _=18,w=Math.min(ld,hd)/2-40,T=et.append("g").attr("transform","translate("+ld/2+",225)"),S=b.db.getSections(),O=0;Object.keys(S).forEach((function(i){O+=S[i]}));const at=cd.themeVariables;var N=[at.pie1,at.pie2,at.pie3,at.pie4,at.pie5,at.pie6,at.pie7,at.pie8,at.pie9,at.pie10,at.pie11,at.pie12],R=ordinal().range(N),Y=Object.entries(S).map((function(i,c){return{order:c,name:i[0],value:i[1]}})),j=function d3pie(){var i=identity$1,c=descending,p=null,b=constant$1(0),_=constant$1(Hr),k=constant$1(0);function pie(w){var T,S,O,N,R,Y=(w=array(w)).length,j=0,z=new Array(Y),U=new Array(Y),H=+b.apply(this,arguments),Z=Math.min(Hr,Math.max(-Hr,_.apply(this,arguments)-H)),K=Math.min(Math.abs(Z)/Y,k.apply(this,arguments)),J=K*(Z<0?-1:1);for(T=0;T0&&(j+=R);for(null!=c?z.sort((function(i,p){return c(U[i],U[p])})):null!=p&&z.sort((function(i,c){return p(w[i],w[c])})),T=0,O=j?(Z-Y*J)/j:0;T0?R*O:0)+J,U[S]={data:w[S],index:T,value:R,startAngle:H,endAngle:N,padAngle:K};return U}return pie.value=function(c){return arguments.length?(i="function"==typeof c?c:constant$1(+c),pie):i},pie.sortValues=function(i){return arguments.length?(c=i,p=null,pie):c},pie.sort=function(i){return arguments.length?(p=i,c=null,pie):p},pie.startAngle=function(i){return arguments.length?(b="function"==typeof i?i:constant$1(+i),pie):b},pie.endAngle=function(i){return arguments.length?(_="function"==typeof i?i:constant$1(+i),pie):_},pie.padAngle=function(i){return arguments.length?(k="function"==typeof i?i:constant$1(+i),pie):k},pie}().value((function(i){return i.value})).sort((function(i,c){return i.order-c.order})),z=j(Y),U=d3arc().innerRadius(0).outerRadius(w);T.selectAll("mySlices").data(z).enter().append("path").attr("d",U).attr("fill",(function(i){return R(i.data.name)})).attr("class","pieCircle"),T.selectAll("mySlices").data(z).enter().append("text").text((function(i){return(i.data.value/O*100).toFixed(0)+"%"})).attr("transform",(function(i){return"translate("+U.centroid(i)+")"})).style("text-anchor","middle").attr("class","slice"),T.append("text").text(b.db.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var H=T.selectAll(".legend").data(R.domain()).enter().append("g").attr("class","legend").attr("transform",(function(i,c){return"translate(216,"+(22*c-22*R.domain().length/2)+")"}));H.append("rect").attr("width",_).attr("height",_).style("fill",R).style("stroke",R),H.data(z).append("text").attr("x",22).attr("y",14).text((function(i){return b.db.getShowData()||cd.showData||cd.pie.showData?i.data.name+" ["+i.data.value+"]":i.data.name}))}catch(i){k.error("Error while rendering info diagram"),k.error(i)}}};var dd=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,3],c=[1,5],p=[1,6],b=[1,7],_=[1,8],k=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],w=[1,22],T=[2,13],S=[1,26],O=[1,27],N=[1,28],R=[1,29],Y=[1,30],j=[1,31],z=[1,24],U=[1,32],H=[1,33],Z=[1,36],K=[71,72],J=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],tt=[1,56],et=[1,57],at=[1,58],ot=[1,59],ut=[1,60],pt=[1,61],gt=[1,62],yt=[62,63],vt=[1,74],kt=[1,70],wt=[1,71],Lt=[1,72],Dt=[1,73],Mt=[1,75],It=[1,79],jt=[1,80],Wt=[1,77],te=[1,78],ee=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ne={trace:function trace(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 6:this.$=k[T].trim(),b.setAccTitle(this.$);break;case 7:case 8:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 9:b.parseDirective("%%{","open_directive");break;case 10:b.parseDirective(k[T],"type_directive");break;case 11:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 12:b.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:b.addRequirement(k[T-3],k[T-4]);break;case 20:b.setNewReqId(k[T-2]);break;case 21:b.setNewReqText(k[T-2]);break;case 22:b.setNewReqRisk(k[T-2]);break;case 23:b.setNewReqVerifyMethod(k[T-2]);break;case 26:this.$=b.RequirementType.REQUIREMENT;break;case 27:this.$=b.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=b.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=b.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=b.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=b.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=b.RiskLevel.LOW_RISK;break;case 33:this.$=b.RiskLevel.MED_RISK;break;case 34:this.$=b.RiskLevel.HIGH_RISK;break;case 35:this.$=b.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=b.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=b.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=b.VerifyType.VERIFY_TEST;break;case 39:b.addElement(k[T-3]);break;case 40:b.setNewElementType(k[T-2]);break;case 41:b.setNewElementDocRef(k[T-2]);break;case 44:b.addRelationship(k[T-2],k[T],k[T-4]);break;case 45:b.addRelationship(k[T-2],k[T-4],k[T]);break;case 46:this.$=b.Relationships.CONTAINS;break;case 47:this.$=b.Relationships.COPIES;break;case 48:this.$=b.Relationships.DERIVES;break;case 49:this.$=b.Relationships.SATISFIES;break;case 50:this.$=b.Relationships.VERIFIES;break;case 51:this.$=b.Relationships.REFINES;break;case 52:this.$=b.Relationships.TRACES}},table:[{3:1,4:2,6:i,9:4,14:c,16:p,18:b,19:_},{1:[3]},{3:10,4:2,5:[1,9],6:i,9:4,14:c,16:p,18:b,19:_},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},o(k,[2,8]),{20:[2,9]},{3:16,4:2,6:i,9:4,14:c,16:p,18:b,19:_},{1:[2,2]},{4:21,5:w,7:17,8:T,9:4,14:c,16:p,18:b,19:_,23:18,24:19,25:20,26:23,32:25,40:S,41:O,42:N,43:R,44:Y,45:j,53:z,71:U,72:H},{11:34,12:[1,35],22:Z},o([12,22],[2,10]),o(k,[2,6]),o(k,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:w,7:38,8:T,9:4,14:c,16:p,18:b,19:_,23:18,24:19,25:20,26:23,32:25,40:S,41:O,42:N,43:R,44:Y,45:j,53:z,71:U,72:H},{4:21,5:w,7:39,8:T,9:4,14:c,16:p,18:b,19:_,23:18,24:19,25:20,26:23,32:25,40:S,41:O,42:N,43:R,44:Y,45:j,53:z,71:U,72:H},{4:21,5:w,7:40,8:T,9:4,14:c,16:p,18:b,19:_,23:18,24:19,25:20,26:23,32:25,40:S,41:O,42:N,43:R,44:Y,45:j,53:z,71:U,72:H},{4:21,5:w,7:41,8:T,9:4,14:c,16:p,18:b,19:_,23:18,24:19,25:20,26:23,32:25,40:S,41:O,42:N,43:R,44:Y,45:j,53:z,71:U,72:H},{4:21,5:w,7:42,8:T,9:4,14:c,16:p,18:b,19:_,23:18,24:19,25:20,26:23,32:25,40:S,41:O,42:N,43:R,44:Y,45:j,53:z,71:U,72:H},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},o(K,[2,26]),o(K,[2,27]),o(K,[2,28]),o(K,[2,29]),o(K,[2,30]),o(K,[2,31]),o(J,[2,55]),o(J,[2,56]),o(k,[2,4]),{13:51,21:[1,52]},o(k,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:tt,65:et,66:at,67:ot,68:ut,69:pt,70:gt},{61:63,64:tt,65:et,66:at,67:ot,68:ut,69:pt,70:gt},{11:64,22:Z},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},o(yt,[2,46]),o(yt,[2,47]),o(yt,[2,48]),o(yt,[2,49]),o(yt,[2,50]),o(yt,[2,51]),o(yt,[2,52]),{63:[1,68]},o(k,[2,5]),{5:vt,29:69,30:kt,33:wt,35:Lt,37:Dt,39:Mt},{5:It,39:jt,55:76,56:Wt,58:te},{32:81,71:U,72:H},{32:82,71:U,72:H},o(ee,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:vt,29:87,30:kt,33:wt,35:Lt,37:Dt,39:Mt},o(ee,[2,25]),o(ee,[2,39]),{31:[1,88]},{31:[1,89]},{5:It,39:jt,55:90,56:Wt,58:te},o(ee,[2,43]),o(ee,[2,44]),o(ee,[2,45]),{32:91,71:U,72:H},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},o(ee,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},o(ee,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:vt,29:116,30:kt,33:wt,35:Lt,37:Dt,39:Mt},{5:vt,29:117,30:kt,33:wt,35:Lt,37:Dt,39:Mt},{5:vt,29:118,30:kt,33:wt,35:Lt,37:Dt,39:Mt},{5:vt,29:119,30:kt,33:wt,35:Lt,37:Dt,39:Mt},{5:It,39:jt,55:120,56:Wt,58:te},{5:It,39:jt,55:121,56:Wt,58:te},o(ee,[2,20]),o(ee,[2,21]),o(ee,[2,22]),o(ee,[2,23]),o(ee,[2,40]),o(ee,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},re={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return c.yytext=c.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};function Parser(){this.yy={}}return ne.lexer=re,Parser.prototype=ne,ne.Parser=Parser,new Parser}();dd.parser=dd;const pd=dd,requirementDetector=i=>null!==i.match(/^\s*requirement(Diagram)?/);let fd=[],gd={},yd={},md={},bd={};const _d={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().req,addRequirement:(i,c)=>(void 0===yd[i]&&(yd[i]={name:i,type:c,id:gd.id,text:gd.text,risk:gd.risk,verifyMethod:gd.verifyMethod}),gd={},yd[i]),getRequirements:()=>yd,setNewReqId:i=>{void 0!==gd&&(gd.id=i)},setNewReqText:i=>{void 0!==gd&&(gd.text=i)},setNewReqRisk:i=>{void 0!==gd&&(gd.risk=i)},setNewReqVerifyMethod:i=>{void 0!==gd&&(gd.verifyMethod=i)},setAccTitle:setAccTitle,getAccTitle:getAccTitle,setAccDescription:setAccDescription,getAccDescription:getAccDescription,addElement:i=>(void 0===bd[i]&&(bd[i]={name:i,type:md.type,docRef:md.docRef},k.info("Added new requirement: ",i)),md={},bd[i]),getElements:()=>bd,setNewElementType:i=>{void 0!==md&&(md.type=i)},setNewElementDocRef:i=>{void 0!==md&&(md.docRef=i)},addRelationship:(i,c,p)=>{fd.push({type:i,src:c,dst:p})},getRelationships:()=>fd,clear:()=>{fd=[],gd={},yd={},md={},bd={},clear$g()}},xd={CONTAINS:"contains",ARROW:"arrow"},vd=xd,markers_insertLineEndings=(i,c)=>{let p=i.append("defs").append("marker").attr("id",xd.CONTAINS+"_line_ending").attr("refX",0).attr("refY",c.line_height/2).attr("markerWidth",c.line_height).attr("markerHeight",c.line_height).attr("orient","auto").append("g");p.append("circle").attr("cx",c.line_height/2).attr("cy",c.line_height/2).attr("r",c.line_height/2).attr("fill","none"),p.append("line").attr("x1",0).attr("x2",c.line_height).attr("y1",c.line_height/2).attr("y2",c.line_height/2).attr("stroke-width",1),p.append("line").attr("y1",0).attr("y2",c.line_height).attr("x1",c.line_height/2).attr("x2",c.line_height/2).attr("stroke-width",1),i.append("defs").append("marker").attr("id",xd.ARROW+"_line_ending").attr("refX",c.line_height).attr("refY",.5*c.line_height).attr("markerWidth",c.line_height).attr("markerHeight",c.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${c.line_height},${c.line_height/2}\n M${c.line_height},${c.line_height/2}\n L0,${c.line_height}`).attr("stroke-width",1)};let kd={},wd=0;const newRectNode=(i,c)=>i.insert("rect","#"+c).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",kd.rect_min_width+"px").attr("height",kd.rect_min_height+"px"),newTitleNode=(i,c,p)=>{let b=kd.rect_min_width/2,_=i.append("text").attr("class","req reqLabel reqTitle").attr("id",c).attr("x",b).attr("y",kd.rect_padding).attr("dominant-baseline","hanging"),k=0;p.forEach((i=>{0==k?_.append("tspan").attr("text-anchor","middle").attr("x",kd.rect_min_width/2).attr("dy",0).text(i):_.append("tspan").attr("text-anchor","middle").attr("x",kd.rect_min_width/2).attr("dy",.75*kd.line_height).text(i),k++}));let w=1.5*kd.rect_padding+k*kd.line_height*.75;return i.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",kd.rect_min_width).attr("y1",w).attr("y2",w),{titleNode:_,y:w}},newBodyNode=(i,c,p,b)=>{let _=i.append("text").attr("class","req reqLabel").attr("id",c).attr("x",kd.rect_padding).attr("y",b).attr("dominant-baseline","hanging"),k=0;let w=[];return p.forEach((i=>{let c=i.length;for(;c>30&&k<3;){let p=i.substring(0,30);c=(i=i.substring(30,i.length)).length,w[w.length]=p,k++}if(3==k){let i=w[w.length-1];w[w.length-1]=i.substring(0,i.length-4)+"..."}else w[w.length]=i;k=0})),w.forEach((i=>{_.append("tspan").attr("x",kd.rect_padding).attr("dy",kd.line_height).text(i)})),_},drawRelationshipFromLayout=function(i,c,p,b,_){const k=p.edge(elementString(c.src),elementString(c.dst)),w=line$1().x((function(i){return i.x})).y((function(i){return i.y})),T=i.insert("path","#"+b).attr("class","er relationshipLine").attr("d",w(k.points)).attr("fill","none");c.type==_.db.Relationships.CONTAINS?T.attr("marker-start","url("+Ri.getUrl(kd.arrowMarkerAbsolute)+"#"+c.type+"_line_ending)"):(T.attr("stroke-dasharray","10,7"),T.attr("marker-end","url("+Ri.getUrl(kd.arrowMarkerAbsolute)+"#"+vd.ARROW+"_line_ending)")),((i,c,p,b)=>{const _=c.node().getTotalLength(),k=c.node().getPointAtLength(.5*_),w="rel"+wd;wd++;const T=i.append("text").attr("class","req relationshipLabel").attr("id",w).attr("x",k.x).attr("y",k.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(b).node().getBBox();i.insert("rect","#"+w).attr("class","req reqLabelBox").attr("x",k.x-T.width/2).attr("y",k.y-T.height/2).attr("width",T.width).attr("height",T.height).attr("fill","white").attr("fill-opacity","85%")})(i,T,0,`<<${c.type}>>`)},elementString=i=>i.replace(/\s/g,"").replace(/\./g,"_"),Td={draw:(i,c,p,b)=>{kd=getConfig$1().requirement,b.db.clear(),b.parser.parse(i);const _=kd.securityLevel;let w;"sandbox"===_&&(w=select("#i"+c));const T=select("sandbox"===_?w.nodes()[0].contentDocument.body:"body").select(`[id='${c}']`);markers_insertLineEndings(T,kd);const S=new Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:kd.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let O=b.db.getRequirements(),N=b.db.getElements(),R=b.db.getRelationships();var Y,j,z;Y=O,j=S,z=T,Object.keys(Y).forEach((i=>{let c=Y[i];i=elementString(i),k.info("Added new requirement: ",i);const p=z.append("g").attr("id",i),b=newRectNode(p,"req-"+i);let _=newTitleNode(p,i+"_title",[`<<${c.type}>>`,`${c.name}`]);newBodyNode(p,i+"_body",[`Id: ${c.id}`,`Text: ${c.text}`,`Risk: ${c.risk}`,`Verification: ${c.verifyMethod}`],_.y);const w=b.node().getBBox();j.setNode(i,{width:w.width,height:w.height,shape:"rect",id:i})})),((i,c,p)=>{Object.keys(i).forEach((b=>{let _=i[b];const k=elementString(b),w=p.append("g").attr("id",k),T="element-"+k,S=newRectNode(w,T);let O=newTitleNode(w,T+"_title",["<>",`${b}`]);newBodyNode(w,T+"_body",[`Type: ${_.type||"Not Specified"}`,`Doc Ref: ${_.docRef||"None"}`],O.y);const N=S.node().getBBox();c.setNode(k,{width:N.width,height:N.height,shape:"rect",id:k})}))})(N,S,T),((i,c)=>{i.forEach((function(i){let p=elementString(i.src),b=elementString(i.dst);c.setEdge(p,b,{relationship:i})}))})(R,S),layout(S),function(i,c){c.nodes().forEach((function(p){void 0!==p&&void 0!==c.node(p)&&(i.select("#"+p),i.select("#"+p).attr("transform","translate("+(c.node(p).x-c.node(p).width/2)+","+(c.node(p).y-c.node(p).height/2)+" )"))}))}(T,S),R.forEach((function(i){drawRelationshipFromLayout(T,i,S,c,b)}));const U=kd.rect_padding,H=T.node().getBBox(),Z=H.width+2*U,K=H.height+2*U;configureSvgSize(T,K,Z,kd.useMaxWidth),T.attr("viewBox",`${H.x-U} ${H.y-U} ${Z} ${K}`)}};var Cd=function(){var o=function(i,c,p,b){for(p=p||{},b=i.length;b--;p[i[b]]=c);return p},i=[1,2],c=[1,3],p=[1,5],b=[1,7],_=[2,5],k=[1,15],w=[1,17],T=[1,18],S=[1,19],O=[1,21],N=[1,22],R=[1,23],Y=[1,29],j=[1,30],z=[1,31],U=[1,32],H=[1,33],Z=[1,34],K=[1,35],J=[1,36],tt=[1,37],et=[1,38],at=[1,39],ot=[1,40],ut=[1,43],pt=[1,44],gt=[1,45],yt=[1,46],vt=[1,47],kt=[1,48],wt=[1,51],Lt=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],Dt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],Mt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],It=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],jt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],Wt=[67,68,69],te=[1,121],ee=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],ne={trace:function trace(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function anonymous(i,c,p,b,_,k,w){var T=k.length-1;switch(_){case 4:return b.apply(k[T]),k[T];case 5:case 9:this.$=[];break;case 6:k[T-1].push(k[T]),this.$=k[T-1];break;case 7:case 8:case 56:this.$=k[T];break;case 12:k[T-3].type="addParticipant",k[T-3].description=b.parseMessage(k[T-1]),this.$=k[T-3];break;case 13:k[T-1].type="addParticipant",this.$=k[T-1];break;case 14:k[T-3].type="addActor",k[T-3].description=b.parseMessage(k[T-1]),this.$=k[T-3];break;case 15:k[T-1].type="addActor",this.$=k[T-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(k[T-2]),sequenceIndexStep:Number(k[T-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(k[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:k[T-1]};break;case 22:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:k[T-1]};break;case 28:b.setDiagramTitle(k[T].substring(6)),this.$=k[T].substring(6);break;case 29:b.setDiagramTitle(k[T].substring(7)),this.$=k[T].substring(7);break;case 30:this.$=k[T].trim(),b.setAccTitle(this.$);break;case 31:case 32:this.$=k[T].trim(),b.setAccDescription(this.$);break;case 33:k[T-1].unshift({type:"loopStart",loopText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.LOOP_START}),k[T-1].push({type:"loopEnd",loopText:k[T-2],signalType:b.LINETYPE.LOOP_END}),this.$=k[T-1];break;case 34:k[T-1].unshift({type:"rectStart",color:b.parseMessage(k[T-2]),signalType:b.LINETYPE.RECT_START}),k[T-1].push({type:"rectEnd",color:b.parseMessage(k[T-2]),signalType:b.LINETYPE.RECT_END}),this.$=k[T-1];break;case 35:k[T-1].unshift({type:"optStart",optText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.OPT_START}),k[T-1].push({type:"optEnd",optText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.OPT_END}),this.$=k[T-1];break;case 36:k[T-1].unshift({type:"altStart",altText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.ALT_START}),k[T-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=k[T-1];break;case 37:k[T-1].unshift({type:"parStart",parText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.PAR_START}),k[T-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=k[T-1];break;case 38:k[T-1].unshift({type:"criticalStart",criticalText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.CRITICAL_START}),k[T-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=k[T-1];break;case 39:k[T-1].unshift({type:"breakStart",breakText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.BREAK_START}),k[T-1].push({type:"breakEnd",optText:b.parseMessage(k[T-2]),signalType:b.LINETYPE.BREAK_END}),this.$=k[T-1];break;case 42:this.$=k[T-3].concat([{type:"option",optionText:b.parseMessage(k[T-1]),signalType:b.LINETYPE.CRITICAL_OPTION},k[T]]);break;case 44:this.$=k[T-3].concat([{type:"and",parText:b.parseMessage(k[T-1]),signalType:b.LINETYPE.PAR_AND},k[T]]);break;case 46:this.$=k[T-3].concat([{type:"else",altText:b.parseMessage(k[T-1]),signalType:b.LINETYPE.ALT_ELSE},k[T]]);break;case 47:this.$=[k[T-1],{type:"addNote",placement:k[T-2],actor:k[T-1].actor,text:k[T]}];break;case 48:k[T-2]=[].concat(k[T-1],k[T-1]).slice(0,2),k[T-2][0]=k[T-2][0].actor,k[T-2][1]=k[T-2][1].actor,this.$=[k[T-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:k[T-2].slice(0,2),text:k[T]}];break;case 49:this.$=[k[T-1],{type:"addLinks",actor:k[T-1].actor,text:k[T]}];break;case 50:this.$=[k[T-1],{type:"addALink",actor:k[T-1].actor,text:k[T]}];break;case 51:this.$=[k[T-1],{type:"addProperties",actor:k[T-1].actor,text:k[T]}];break;case 52:this.$=[k[T-1],{type:"addDetails",actor:k[T-1].actor,text:k[T]}];break;case 55:this.$=[k[T-2],k[T]];break;case 57:this.$=b.PLACEMENT.LEFTOF;break;case 58:this.$=b.PLACEMENT.RIGHTOF;break;case 59:this.$=[k[T-4],k[T-1],{type:"addMessage",from:k[T-4].actor,to:k[T-1].actor,signalType:k[T-3],msg:k[T]},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:k[T-1]}];break;case 60:this.$=[k[T-4],k[T-1],{type:"addMessage",from:k[T-4].actor,to:k[T-1].actor,signalType:k[T-3],msg:k[T]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:k[T-4]}];break;case 61:this.$=[k[T-3],k[T-1],{type:"addMessage",from:k[T-3].actor,to:k[T-1].actor,signalType:k[T-2],msg:k[T]}];break;case 62:this.$={type:"addParticipant",actor:k[T]};break;case 63:this.$=b.LINETYPE.SOLID_OPEN;break;case 64:this.$=b.LINETYPE.DOTTED_OPEN;break;case 65:this.$=b.LINETYPE.SOLID;break;case 66:this.$=b.LINETYPE.DOTTED;break;case 67:this.$=b.LINETYPE.SOLID_CROSS;break;case 68:this.$=b.LINETYPE.DOTTED_CROSS;break;case 69:this.$=b.LINETYPE.SOLID_POINT;break;case 70:this.$=b.LINETYPE.DOTTED_POINT;break;case 71:this.$=b.parseMessage(k[T].trim().substring(1));break;case 72:b.parseDirective("%%{","open_directive");break;case 73:b.parseDirective(k[T],"type_directive");break;case 74:k[T]=k[T].trim().replace(/'/g,'"'),b.parseDirective(k[T],"arg_directive");break;case 75:b.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:i,5:c,6:4,7:p,11:6,79:b},{1:[3]},{3:8,4:i,5:c,6:4,7:p,11:6,79:b},{3:9,4:i,5:c,6:4,7:p,11:6,79:b},{3:10,4:i,5:c,6:4,7:p,11:6,79:b},o([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],_,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,41:K,42:J,43:tt,45:et,47:at,49:ot,53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{13:49,14:[1,50],82:wt},o([14,82],[2,73]),o(Lt,[2,6]),{6:41,10:52,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,41:K,42:J,43:tt,45:et,47:at,49:ot,53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},o(Lt,[2,8]),o(Lt,[2,9]),{17:53,69:kt},{17:54,69:kt},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:kt},{17:60,69:kt},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},o(Lt,[2,28]),o(Lt,[2,29]),{35:[1,66]},{37:[1,67]},o(Lt,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},o(Lt,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:kt},{17:89,69:kt},{17:90,69:kt},{17:91,69:kt},o([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},o(Lt,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},o(Lt,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},o(Lt,[2,20]),{5:[1,102]},{5:[1,103]},o(Lt,[2,23]),o(Lt,[2,24]),o(Lt,[2,25]),o(Lt,[2,26]),o(Lt,[2,27]),o(Lt,[2,30]),o(Lt,[2,31]),o(Dt,_,{8:104}),o(Dt,_,{8:105}),o(Dt,_,{8:106}),o(Mt,_,{44:107,8:108}),o(It,_,{46:109,8:110}),o(jt,_,{48:111,8:112}),o(Dt,_,{8:113}),{17:116,67:[1,114],68:[1,115],69:kt},o(Wt,[2,63]),o(Wt,[2,64]),o(Wt,[2,65]),o(Wt,[2,66]),o(Wt,[2,67]),o(Wt,[2,68]),o(Wt,[2,69]),o(Wt,[2,70]),{17:117,69:kt},{17:119,57:118,69:kt},{69:[2,57]},{69:[2,58]},{55:120,78:te},{55:122,78:te},{55:123,78:te},{55:124,78:te},o(ee,[2,10]),{13:125,82:wt},{82:[2,74]},{19:[1,126]},o(Lt,[2,13]),{19:[1,127]},o(Lt,[2,15]),{5:[1,128]},o(Lt,[2,18]),o(Lt,[2,19]),o(Lt,[2,21]),o(Lt,[2,22]),{4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,40:[1,129],41:K,42:J,43:tt,45:et,47:at,49:ot,53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,40:[1,130],41:K,42:J,43:tt,45:et,47:at,49:ot,53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,40:[1,131],41:K,42:J,43:tt,45:et,47:at,49:ot,53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{40:[1,132]},{4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,40:[2,45],41:K,42:J,43:tt,45:et,47:at,49:ot,52:[1,133],53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{40:[1,134]},{4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,40:[2,43],41:K,42:J,43:tt,45:et,47:at,49:ot,51:[1,135],53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{40:[1,136]},{4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,40:[2,41],41:K,42:J,43:tt,45:et,47:at,49:ot,50:[1,137],53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{4:k,5:w,6:41,9:14,10:16,11:6,16:T,17:42,20:S,21:20,22:O,25:N,26:R,27:24,28:25,29:26,30:27,31:28,32:Y,33:j,34:z,36:U,38:H,39:Z,40:[1,138],41:K,42:J,43:tt,45:et,47:at,49:ot,53:ut,58:pt,59:gt,60:yt,61:vt,69:kt,79:b},{17:139,69:kt},{17:140,69:kt},{55:141,78:te},{55:142,78:te},{55:143,78:te},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},o(Lt,[2,17]),o(Lt,[2,33]),o(Lt,[2,34]),o(Lt,[2,35]),o(Lt,[2,36]),{19:[1,148]},o(Lt,[2,37]),{19:[1,149]},o(Lt,[2,38]),{19:[1,150]},o(Lt,[2,39]),{55:151,78:te},{55:152,78:te},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:kt},o(ee,[2,11]),o(Lt,[2,12]),o(Lt,[2,14]),o(Mt,_,{8:108,44:154}),o(It,_,{8:110,46:155}),o(jt,_,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function parseError(i,c){if(!c.recoverable){var p=new Error(i);throw p.hash=c,p}this.trace(i)},parse:function parse2(i){var c=this,p=[0],b=[],_=[null],k=[],w=this.table,T="",S=0,O=0,N=2,R=1,Y=k.slice.call(arguments,1),j=Object.create(this.lexer),z={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(z.yy[U]=this.yy[U]);j.setInput(i,z.yy),z.yy.lexer=j,z.yy.parser=this,void 0===j.yylloc&&(j.yylloc={});var H=j.yylloc;k.push(H);var Z=j.options&&j.options.ranges;function lex(){var i;return"number"!=typeof(i=b.pop()||j.lex()||R)&&(i instanceof Array&&(i=(b=i).pop()),i=c.symbols_[i]||i),i}"function"==typeof z.yy.parseError?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var K,J,tt,et,at,ot,ut,pt,gt={};;){if(J=p[p.length-1],this.defaultActions[J]?tt=this.defaultActions[J]:(null==K&&(K=lex()),tt=w[J]&&w[J][K]),void 0===tt||!tt.length||!tt[0]){var yt="";for(at in pt=[],w[J])this.terminals_[at]&&at>N&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},re={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:case 52:case 65:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return c.yytext=c.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 53:return c.yytext=c.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};function Parser(){this.yy={}}return ne.lexer=re,Parser.prototype=ne,ne.Parser=Parser,new Parser}();Cd.parser=Cd;const Sd=Cd,sequenceDetector=i=>null!==i.match(/^\s*sequenceDiagram/);let Ed,Ad,Ld={},Dd=[],Od=!1;const addActor=function(i,c,p,b){const _=Ld[i];_&&c===_.name&&null==p||(null!=p&&null!=p.text||(p={text:c,wrap:null,type:b}),null!=b&&null!=p.text||(p={text:c,wrap:null,type:b}),Ld[i]={name:c,description:p.text,wrap:void 0===p.wrap&&autoWrap()||!!p.wrap,prevActor:Ed,links:{},properties:{},actorCnt:null,rectData:null,type:b||"participant"},Ed&&Ld[Ed]&&(Ld[Ed].nextActor=i),Ed=i)},addSignal=function(i,c,p={text:void 0,wrap:void 0},b){if(b===Nd.ACTIVE_END){if((i=>{let c,p=0;for(c=0;c>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}}return Dd.push({from:i,to:c,message:p.text,wrap:void 0===p.wrap&&autoWrap()||!!p.wrap,type:b}),!0},getActor=function(i){return Ld[i]},autoWrap=()=>void 0!==Ad?Ad:getConfig$1().sequence.wrap,Nd={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},addNote=function(i,c,p){p.text,void 0===p.wrap&&autoWrap()||p.wrap;const b=[].concat(i,i);Dd.push({from:b[0],to:b[1],message:p.text,wrap:void 0===p.wrap&&autoWrap()||!!p.wrap,type:Nd.NOTE,placement:c})},addLinks=function(i,c){const p=getActor(i);try{let i=sanitizeText$5(c.text,getConfig$1());i=i.replace(/&/g,"&"),i=i.replace(/=/g,"=");insertLinks(p,JSON.parse(i))}catch(i){k.error("error while parsing actor link text",i)}};function insertLinks(i,c){if(null==i.links)i.links=c;else for(let p in c)i.links[p]=c[p]}const addProperties=function(i,c){const p=getActor(i);try{let i=sanitizeText$5(c.text,getConfig$1());insertProperties(p,JSON.parse(i))}catch(i){k.error("error while parsing actor properties text",i)}};function insertProperties(i,c){if(null==i.properties)i.properties=c;else for(let p in c)i.properties[p]=c[p]}const addDetails=function(i,c){const p=getActor(i),b=document.getElementById(c.text);try{const i=b.innerHTML,c=JSON.parse(i);c.properties&&insertProperties(p,c.properties),c.links&&insertLinks(p,c.links)}catch(i){k.error("error while parsing actor details text",i)}},apply=function(i){if(Array.isArray(i))i.forEach((function(i){apply(i)}));else switch(i.type){case"sequenceIndex":Dd.push({from:void 0,to:void 0,message:{start:i.sequenceIndex,step:i.sequenceIndexStep,visible:i.sequenceVisible},wrap:!1,type:i.signalType});break;case"addParticipant":addActor(i.actor,i.actor,i.description,"participant");break;case"addActor":addActor(i.actor,i.actor,i.description,"actor");break;case"activeStart":case"activeEnd":addSignal(i.actor,void 0,void 0,i.signalType);break;case"addNote":addNote(i.actor,i.placement,i.text);break;case"addLinks":addLinks(i.actor,i.text);break;case"addALink":!function(i,c){const p=getActor(i);try{const i={};let k=sanitizeText$5(c.text,getConfig$1());var b=k.indexOf("@");k=k.replace(/&/g,"&"),k=k.replace(/=/g,"=");var _=k.slice(0,b-1).trim(),w=k.slice(b+1).trim();i[_]=w,insertLinks(p,i)}catch(i){k.error("error while parsing actor link text",i)}}(i.actor,i.text);break;case"addProperties":addProperties(i.actor,i.text);break;case"addDetails":addDetails(i.actor,i.text);break;case"addMessage":addSignal(i.from,i.to,i.msg,i.signalType);break;case"loopStart":addSignal(void 0,void 0,i.loopText,i.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":addSignal(void 0,void 0,void 0,i.signalType);break;case"rectStart":addSignal(void 0,void 0,i.color,i.signalType);break;case"optStart":addSignal(void 0,void 0,i.optText,i.signalType);break;case"altStart":case"else":addSignal(void 0,void 0,i.altText,i.signalType);break;case"setAccTitle":setAccTitle(i.text);break;case"parStart":case"and":addSignal(void 0,void 0,i.parText,i.signalType);break;case"criticalStart":addSignal(void 0,void 0,i.criticalText,i.signalType);break;case"option":addSignal(void 0,void 0,i.optionText,i.signalType);break;case"breakStart":addSignal(void 0,void 0,i.breakText,i.signalType)}},Md={addActor:addActor,addMessage:function(i,c,p,b){Dd.push({from:i,to:c,message:p.text,wrap:void 0===p.wrap&&autoWrap()||!!p.wrap,answer:b})},addSignal:addSignal,addLinks:addLinks,addDetails:addDetails,addProperties:addProperties,autoWrap:autoWrap,setWrap:function(i){Ad=i},enableSequenceNumbers:function(){Od=!0},disableSequenceNumbers:function(){Od=!1},showSequenceNumbers:()=>Od,getMessages:function(){return Dd},getActors:function(){return Ld},getActor:getActor,getActorKeys:function(){return Object.keys(Ld)},getActorProperty:function(i,c){if(void 0!==i&&void 0!==i.properties)return i.properties[c]},getAccTitle:getAccTitle,getDiagramTitle:getDiagramTitle,setDiagramTitle:setDiagramTitle,parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().sequence,clear:function(){Ld={},Dd=[],Od=!1,clear$g()},parseMessage:function(i){const c=i.trim(),p={text:c.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==c.match(/^:?wrap:/)||null===c.match(/^:?nowrap:/)&&void 0};return k.debug("parseMessage:",p),p},LINETYPE:Nd,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:addNote,setAccTitle:setAccTitle,apply:apply,setAccDescription:setAccDescription,getAccDescription:getAccDescription};let Id=[];const attachFunctions=()=>{Id.forEach((i=>{i()})),Id=[]},drawRect$1=function(i,c){const p=i.append("rect");return p.attr("x",c.x),p.attr("y",c.y),p.attr("fill",c.fill),p.attr("stroke",c.stroke),p.attr("width",c.width),p.attr("height",c.height),p.attr("rx",c.rx),p.attr("ry",c.ry),void 0!==c.class&&p.attr("class",c.class),p},addPopupInteraction=(i,c)=>{var p;p=()=>{const p=document.querySelectorAll(i);0!==p.length&&(p[0].addEventListener("mouseover",(function(){popupMenuUpFunc("actor"+c+"_popup")})),p[0].addEventListener("mouseout",(function(){popupMenuDownFunc("actor"+c+"_popup")})))},Id.push(p)},drawImage=function(i,c,p,b){const _=i.append("image");_.attr("x",c),_.attr("y",p);var k=T(b);_.attr("xlink:href",k)},drawEmbeddedImage=function(i,c,p,b){const _=i.append("use");_.attr("x",c),_.attr("y",p);var k=T(b);_.attr("xlink:href","#"+k)},popupMenuUpFunc=function(i){var c=document.getElementById(i);null!=c&&(c.style.display="block")},popupMenuDownFunc=function(i){var c=document.getElementById(i);null!=c&&(c.style.display="none")},drawText$1=function(i,c){let p=0,b=0;const _=c.text.split(Ri.lineBreakRegex);let k=[],w=0,yfunc=()=>c.y;if(void 0!==c.valign&&void 0!==c.textMargin&&c.textMargin>0)switch(c.valign){case"top":case"start":yfunc=()=>Math.round(c.y+c.textMargin);break;case"middle":case"center":yfunc=()=>Math.round(c.y+(p+b+c.textMargin)/2);break;case"bottom":case"end":yfunc=()=>Math.round(c.y+(p+b+2*c.textMargin)-c.textMargin)}if(void 0!==c.anchor&&void 0!==c.textMargin&&void 0!==c.width)switch(c.anchor){case"left":case"start":c.x=Math.round(c.x+c.textMargin),c.anchor="start",c.dominantBaseline="middle",c.alignmentBaseline="middle";break;case"middle":case"center":c.x=Math.round(c.x+c.width/2),c.anchor="middle",c.dominantBaseline="middle",c.alignmentBaseline="middle";break;case"right":case"end":c.x=Math.round(c.x+c.width-c.textMargin),c.anchor="end",c.dominantBaseline="middle",c.alignmentBaseline="middle"}for(let[T,S]of _.entries()){void 0!==c.textMargin&&0===c.textMargin&&void 0!==c.fontSize&&(w=T*c.fontSize);const _=i.append("text");if(_.attr("x",c.x),_.attr("y",yfunc()),void 0!==c.anchor&&_.attr("text-anchor",c.anchor).attr("dominant-baseline",c.dominantBaseline).attr("alignment-baseline",c.alignmentBaseline),void 0!==c.fontFamily&&_.style("font-family",c.fontFamily),void 0!==c.fontSize&&_.style("font-size",c.fontSize),void 0!==c.fontWeight&&_.style("font-weight",c.fontWeight),void 0!==c.fill&&_.attr("fill",c.fill),void 0!==c.class&&_.attr("class",c.class),void 0!==c.dy?_.attr("dy",c.dy):0!==w&&_.attr("dy",w),c.tspan){const i=_.append("tspan");i.attr("x",c.x),void 0!==c.fill&&i.attr("fill",c.fill),i.text(S)}else _.text(S);void 0!==c.valign&&void 0!==c.textMargin&&c.textMargin>0&&(b+=(_._groups||_)[0][0].getBBox().height,p=b),k.push(_)}return k},drawLabel$1=function(i,c){const p=i.append("polygon");return p.attr("points",function genPoints(i,c,p,b,_){return i+","+c+" "+(i+p)+","+c+" "+(i+p)+","+(c+b-_)+" "+(i+p-1.2*_)+","+(c+b)+" "+i+","+(c+b)}(c.x,c.y,c.width,c.height,7)),p.attr("class","labelBox"),c.y=c.y+c.height/2,drawText$1(i,c),p};let Bd=-1;const fixLifeLineHeights=(i,c)=>{i.selectAll&&i.selectAll(".actor-line").attr("class","200").attr("y2",c-55)},getTextObj$1=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},getNoteRect$1=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Fd=function(){function byText(i,c,p,b,_,k,w){_setTextAttrs(c.append("text").attr("x",p+_/2).attr("y",b+k/2+5).style("text-anchor","middle").text(i),w)}function byTspan(i,c,p,b,_,k,w,T){const{actorFontSize:S,actorFontFamily:O,actorFontWeight:N}=T;let R=S&&S.replace?S.replace("px",""):S;const Y=i.split(Ri.lineBreakRegex);for(let i=0;ip?S.width:p;const j=N.append("rect");if(j.attr("class","actorPopupMenuPanel"+R),j.attr("x",S.x),j.attr("y",S.height),j.attr("fill",S.fill),j.attr("stroke",S.stroke),j.attr("width",Y),j.attr("height",S.height),j.attr("rx",S.rx),j.attr("ry",S.ry),null!=k){var z=20;for(let i in k){var U=N.append("a"),H=T(k[i]);U.attr("xlink:href",H),U.attr("target","_blank"),$d(b)(i,U,S.x+10,S.height+z,Y,20,{class:"actor"},b),z+=30}}return j.attr("height",z),{height:S.height+z,width:Y}},drawImage:drawImage,drawEmbeddedImage:drawEmbeddedImage,anchorElement:function(i){return i.append("g")},drawActivation:function(i,c,p,b,_){const k=getNoteRect$1(),w=c.anchored;k.x=c.startx,k.y=c.starty,k.class="activation"+_%3,k.width=c.stopx-c.startx,k.height=p-c.starty,drawRect$1(w,k)},drawLoop:function(i,c,p,b){const{boxMargin:_,boxTextMargin:k,labelBoxHeight:w,labelBoxWidth:T,messageFontFamily:S,messageFontSize:O,messageFontWeight:N}=b,R=i.append("g"),drawLoopLine=function(i,c,p,b){return R.append("line").attr("x1",i).attr("y1",c).attr("x2",p).attr("y2",b).attr("class","loopLine")};drawLoopLine(c.startx,c.starty,c.stopx,c.starty),drawLoopLine(c.stopx,c.starty,c.stopx,c.stopy),drawLoopLine(c.startx,c.stopy,c.stopx,c.stopy),drawLoopLine(c.startx,c.starty,c.startx,c.stopy),void 0!==c.sections&&c.sections.forEach((function(i){drawLoopLine(c.startx,i.y,c.stopx,i.y).style("stroke-dasharray","3, 3")}));let Y=getTextObj$1();Y.text=p,Y.x=c.startx,Y.y=c.starty,Y.fontFamily=S,Y.fontSize=O,Y.fontWeight=N,Y.anchor="middle",Y.valign="middle",Y.tspan=!1,Y.width=T||50,Y.height=w||20,Y.textMargin=k,Y.class="labelText",drawLabel$1(R,Y),Y=getTextObj$1(),Y.text=c.title,Y.x=c.startx+T/2+(c.stopx-c.startx)/2,Y.y=c.starty+_+k,Y.anchor="middle",Y.valign="middle",Y.textMargin=k,Y.class="loopText",Y.fontFamily=S,Y.fontSize=O,Y.fontWeight=N,Y.wrap=!0;let j=drawText$1(R,Y);return void 0!==c.sectionTitles&&c.sectionTitles.forEach((function(i,p){if(i.message){Y.text=i.message,Y.x=c.startx+(c.stopx-c.startx)/2,Y.y=c.sections[p].y+_+k,Y.class="loopText",Y.anchor="middle",Y.valign="middle",Y.tspan=!1,Y.fontFamily=S,Y.fontSize=O,Y.fontWeight=N,Y.wrap=c.wrap,j=drawText$1(R,Y);let b=Math.round(j.map((i=>(i._groups||i)[0][0].getBBox().height)).reduce(((i,c)=>i+c)));c.sections[p].height+=b-(_+k)}})),c.height=Math.round(c.stopy-c.starty),R},drawBackgroundRect:function(i,c){drawRect$1(i,{x:c.startx,y:c.starty,width:c.stopx-c.startx,height:c.stopy-c.starty,fill:c.fill,class:"rect"}).lower()},insertArrowHead:function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(i){i.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},insertSequenceNumber:function(i){i.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(i){i.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},insertDatabaseIcon:function(i){i.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},insertComputerIcon:function(i){i.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},insertClockIcon:function(i){i.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},getTextObj:getTextObj$1,getNoteRect:getNoteRect$1,popupMenu:function(i){return"var pu = document.getElementById('"+i+"'); if (pu != null) { pu.style.display = 'block'; }"},popdownMenu:function(i){return"var pu = document.getElementById('"+i+"'); if (pu != null) { pu.style.display = 'none'; }"},fixLifeLineHeights:fixLifeLineHeights,sanitizeUrl:T};let Pd={};const Yd={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((i=>i.height||0)))+(0===this.loops.length?0:this.loops.map((i=>i.height||0)).reduce(((i,c)=>i+c)))+(0===this.messages.length?0:this.messages.map((i=>i.height||0)).reduce(((i,c)=>i+c)))+(0===this.notes.length?0:this.notes.map((i=>i.height||0)).reduce(((i,c)=>i+c)))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(i){this.actors.push(i)},addLoop:function(i){this.loops.push(i)},addMessage:function(i){this.messages.push(i)},addNote:function(i){this.notes.push(i)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,setConf$4(getConfig$1())},updateVal:function(i,c,p,b){void 0===i[c]?i[c]=p:i[c]=b(p,i[c])},updateBounds:function(i,c,p,b){const _=this;let k=0;function updateFn(w){return function updateItemBounds(T){k++;const S=_.sequenceItems.length-k+1;_.updateVal(T,"starty",c-S*Pd.boxMargin,Math.min),_.updateVal(T,"stopy",b+S*Pd.boxMargin,Math.max),_.updateVal(Yd.data,"startx",i-S*Pd.boxMargin,Math.min),_.updateVal(Yd.data,"stopx",p+S*Pd.boxMargin,Math.max),"activation"!==w&&(_.updateVal(T,"startx",i-S*Pd.boxMargin,Math.min),_.updateVal(T,"stopx",p+S*Pd.boxMargin,Math.max),_.updateVal(Yd.data,"starty",c-S*Pd.boxMargin,Math.min),_.updateVal(Yd.data,"stopy",b+S*Pd.boxMargin,Math.max))}}this.sequenceItems.forEach(updateFn()),this.activations.forEach(updateFn("activation"))},insert:function(i,c,p,b){const _=Math.min(i,p),k=Math.max(i,p),w=Math.min(c,b),T=Math.max(c,b);this.updateVal(Yd.data,"startx",_,Math.min),this.updateVal(Yd.data,"starty",w,Math.min),this.updateVal(Yd.data,"stopx",k,Math.max),this.updateVal(Yd.data,"stopy",T,Math.max),this.updateBounds(_,w,k,T)},newActivation:function(i,c,p){const b=p[i.from.actor],_=actorActivations(i.from.actor).length||0,k=b.x+b.width/2+(_-1)*Pd.activationWidth/2;this.activations.push({startx:k,starty:this.verticalPos+2,stopx:k+Pd.activationWidth,stopy:void 0,actor:i.from.actor,anchored:Rd.anchorElement(c)})},endActivation:function(i){const c=this.activations.map((function(i){return i.actor})).lastIndexOf(i.from.actor);return this.activations.splice(c,1)[0]},createLoop:function(i={message:void 0,wrap:!1,width:void 0},c){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:i.message,wrap:i.wrap,width:i.width,height:0,fill:c}},newLoop:function(i={message:void 0,wrap:!1,width:void 0},c){this.sequenceItems.push(this.createLoop(i,c))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(i){const c=this.sequenceItems.pop();c.sections=c.sections||[],c.sectionTitles=c.sectionTitles||[],c.sections.push({y:Yd.getVerticalPos(),height:0}),c.sectionTitles.push(i),this.sequenceItems.push(c)},bumpVerticalPos:function(i){this.verticalPos=this.verticalPos+i,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},messageFont=i=>({fontFamily:i.messageFontFamily,fontSize:i.messageFontSize,fontWeight:i.messageFontWeight}),noteFont=i=>({fontFamily:i.noteFontFamily,fontSize:i.noteFontSize,fontWeight:i.noteFontWeight}),actorFont=i=>({fontFamily:i.actorFontFamily,fontSize:i.actorFontSize,fontWeight:i.actorFontWeight});const drawActors=function(i,c,p,b,_,k){if(!0===_.hideUnusedParticipants){const i=new Set;k.forEach((c=>{i.add(c.from),i.add(c.to)})),p=p.filter((c=>i.has(c)))}let w=0,T=0,S=0;for(const _ of p){const p=c[_];p.width=p.width||Pd.width,p.height=Math.max(p.height||Pd.height,Pd.height),p.margin=p.margin||Pd.actorMargin,p.x=w+T,p.y=b;const k=Rd.drawActor(i,p,Pd);S=Math.max(S,k),Yd.insert(p.x,b,p.x+p.width,p.height),w+=p.width,T+=p.margin,Yd.models.addActor(p)}Yd.bumpVerticalPos(S)},drawActorsPopup=function(i,c,p,b){let _=0,k=0;for(const w of p){const p=c[w],T=getRequiredPopupWidth(p),S=Rd.drawPopup(i,p,T,Pd,Pd.forceMenus,b);S.height>_&&(_=S.height),S.width+p.x>k&&(k=S.width+p.x)}return{maxHeight:_,maxWidth:k}},setConf$4=function(i){Qa(Pd,i),i.fontFamily&&(Pd.actorFontFamily=Pd.noteFontFamily=Pd.messageFontFamily=i.fontFamily),i.fontSize&&(Pd.actorFontSize=Pd.noteFontSize=Pd.messageFontSize=i.fontSize),i.fontWeight&&(Pd.actorFontWeight=Pd.noteFontWeight=Pd.messageFontWeight=i.fontWeight)},actorActivations=function(i){return Yd.activations.filter((function(c){return c.actor===i}))},activationBounds=function(i,c){const p=c[i],b=actorActivations(i);return[b.reduce((function(i,c){return Math.min(i,c.startx)}),p.x+p.width/2),b.reduce((function(i,c){return Math.max(i,c.stopx)}),p.x+p.width/2)]};function adjustLoopHeightForWrap(i,c,p,b,_){Yd.bumpVerticalPos(p);let w=b;if(c.id&&c.message&&i[c.id]){const p=i[c.id].width,_=messageFont(Pd);c.message=Ns.wrapLabel(`[${c.message}]`,p-2*Pd.wrapPadding,_),c.width=p,c.wrap=!0;const T=Ns.calculateTextDimensions(c.message,_),S=Math.max(T.height,Pd.labelBoxHeight);w=b+S,k.debug(`${S} - ${c.message}`)}_(c),Yd.bumpVerticalPos(w)}const getRequiredPopupWidth=function(i){let c=0;const p=actorFont(Pd);for(const b in i.links){const i=Ns.calculateTextDimensions(b,p).width+2*Pd.wrapPadding+2*Pd.boxMargin;ci.actor)).lastIndexOf(i.from.actor);delete Yd.activations.splice(c,1)[0]}}void 0!==i.placement?(S=function(i,c,p){const b=c[i.from].x,_=c[i.to].x,w=i.wrap&&i.message;let T=Ns.calculateTextDimensions(w?Ns.wrapLabel(i.message,Pd.width,noteFont(Pd)):i.message,noteFont(Pd));const S={width:w?Pd.width:Math.max(Pd.width,T.width+2*Pd.noteMargin),height:0,startx:c[i.from].x,stopx:0,starty:0,stopy:0,message:i.message};return i.placement===p.db.PLACEMENT.RIGHTOF?(S.width=w?Math.max(Pd.width,T.width):Math.max(c[i.from].width/2+c[i.to].width/2,T.width+2*Pd.noteMargin),S.startx=b+(c[i.from].width+Pd.actorMargin)/2):i.placement===p.db.PLACEMENT.LEFTOF?(S.width=w?Math.max(Pd.width,T.width+2*Pd.noteMargin):Math.max(c[i.from].width/2+c[i.to].width/2,T.width+2*Pd.noteMargin),S.startx=b-S.width+(c[i.from].width-Pd.actorMargin)/2):i.to===i.from?(T=Ns.calculateTextDimensions(w?Ns.wrapLabel(i.message,Math.max(Pd.width,c[i.from].width),noteFont(Pd)):i.message,noteFont(Pd)),S.width=w?Math.max(Pd.width,c[i.from].width):Math.max(c[i.from].width,Pd.width,T.width+2*Pd.noteMargin),S.startx=b+(c[i.from].width-S.width)/2):(S.width=Math.abs(b+c[i.from].width/2-(_+c[i.to].width/2))+Pd.actorMargin,S.startx=b<_?b+c[i.from].width/2-Pd.actorMargin/2:_+c[i.to].width/2-Pd.actorMargin/2),w&&(S.message=Ns.wrapLabel(i.message,S.width-2*Pd.wrapPadding,noteFont(Pd))),k.debug(`NM:[${S.startx},${S.stopx},${S.starty},${S.stopy}:${S.width},${S.height}=${i.message}]`),S}(i,c,b),i.noteModel=S,w.forEach((i=>{T=i,T.from=Math.min(T.from,S.startx),T.to=Math.max(T.to,S.startx+S.width),T.width=Math.max(T.width,Math.abs(T.from-T.to))-Pd.labelBoxWidth}))):(O=function(i,c,p){let b=!1;if([p.db.LINETYPE.SOLID_OPEN,p.db.LINETYPE.DOTTED_OPEN,p.db.LINETYPE.SOLID,p.db.LINETYPE.DOTTED,p.db.LINETYPE.SOLID_CROSS,p.db.LINETYPE.DOTTED_CROSS,p.db.LINETYPE.SOLID_POINT,p.db.LINETYPE.DOTTED_POINT].includes(i.type)&&(b=!0),!b)return{};const _=activationBounds(i.from,c),k=activationBounds(i.to,c),w=_[0]<=k[0]?1:0,T=_[0]0&&w.forEach((p=>{if(T=p,O.startx===O.stopx){const p=c[i.from],b=c[i.to];T.from=Math.min(p.x-O.width/2,p.x-p.width/2,T.from),T.to=Math.max(b.x+O.width/2,b.x+p.width/2,T.to),T.width=Math.max(T.width,Math.abs(T.to-T.from))-Pd.labelBoxWidth}else T.from=Math.min(O.startx,T.from),T.to=Math.max(O.stopx,T.to),T.width=Math.max(T.width,O.width)-Pd.labelBoxWidth})))})),Yd.activations=[],k.debug("Loop type widths:",_),_},jd={bounds:Yd,drawActors:drawActors,drawActorsPopup:drawActorsPopup,setConf:setConf$4,draw:function(i,c,p,b){const{securityLevel:_,sequence:w}=getConfig$1();let T;Pd=w,"sandbox"===_&&(T=select("#i"+c));const S=select("sandbox"===_?T.nodes()[0].contentDocument.body:"body"),O="sandbox"===_?T.nodes()[0].contentDocument:document;Yd.init(),k.debug(b.db);const N="sandbox"===_?S.select(`[id="${c}"]`):select(`[id="${c}"]`),R=b.db.getActors(),Y=b.db.getActorKeys(),j=b.db.getMessages(),z=b.db.getDiagramTitle(),U=function getMaxMessageWidthPerActor(i,c,p){const b={};return c.forEach((function(c){if(i[c.to]&&i[c.from]){const _=i[c.to];if(c.placement===p.db.PLACEMENT.LEFTOF&&!_.prevActor)return;if(c.placement===p.db.PLACEMENT.RIGHTOF&&!_.nextActor)return;const k=void 0!==c.placement,w=!k,T=k?noteFont(Pd):messageFont(Pd),S=c.wrap?Ns.wrapLabel(c.message,Pd.width-2*Pd.wrapPadding,T):c.message,O=Ns.calculateTextDimensions(S,T).width+2*Pd.wrapPadding;w&&c.from===_.nextActor?b[c.to]=Math.max(b[c.to]||0,O):w&&c.from===_.prevActor?b[c.from]=Math.max(b[c.from]||0,O):w&&c.from===c.to?(b[c.from]=Math.max(b[c.from]||0,O/2),b[c.to]=Math.max(b[c.to]||0,O/2)):c.placement===p.db.PLACEMENT.RIGHTOF?b[c.from]=Math.max(b[c.from]||0,O):c.placement===p.db.PLACEMENT.LEFTOF?b[_.prevActor]=Math.max(b[_.prevActor]||0,O):c.placement===p.db.PLACEMENT.OVER&&(_.prevActor&&(b[_.prevActor]=Math.max(b[_.prevActor]||0,O/2)),_.nextActor&&(b[c.from]=Math.max(b[c.from]||0,O/2)))}})),k.debug("maxMessageWidthPerActor:",b),b}(R,j,b);Pd.height=function calculateActorMargins(i,c){let p=0;Object.keys(i).forEach((c=>{const b=i[c];b.wrap&&(b.description=Ns.wrapLabel(b.description,Pd.width-2*Pd.wrapPadding,actorFont(Pd)));const _=Ns.calculateTextDimensions(b.description,actorFont(Pd));b.width=b.wrap?Pd.width:Math.max(Pd.width,_.width+2*Pd.wrapPadding),b.height=b.wrap?Math.max(_.height,Pd.height):Pd.height,p=Math.max(p,b.height)}));for(const p in c){const b=i[p];if(!b)continue;const _=i[b.nextActor];if(!_)continue;const k=c[p]+Pd.actorMargin-b.width/2-_.width/2;b.margin=Math.max(k,Pd.actorMargin)}return Math.max(p,Pd.height)}(R,U),Rd.insertComputerIcon(N),Rd.insertDatabaseIcon(N),Rd.insertClockIcon(N),drawActors(N,R,Y,0,Pd,j);const H=calculateLoopBounds(j,R,U,b);Rd.insertArrowHead(N),Rd.insertArrowCrossHead(N),Rd.insertArrowFilledHead(N),Rd.insertSequenceNumber(N);let Z=1,K=1;const J=[];j.forEach((function(i){let c,p,_;switch(i.type){case b.db.LINETYPE.NOTE:p=i.noteModel,function(i,c){Yd.bumpVerticalPos(Pd.boxMargin),c.height=Pd.boxMargin,c.starty=Yd.getVerticalPos();const p=Rd.getNoteRect();p.x=c.startx,p.y=c.starty,p.width=c.width||Pd.width,p.class="note";const b=i.append("g"),_=Rd.drawRect(b,p),k=Rd.getTextObj();k.x=c.startx,k.y=c.starty,k.width=p.width,k.dy="1em",k.text=c.message,k.class="noteText",k.fontFamily=Pd.noteFontFamily,k.fontSize=Pd.noteFontSize,k.fontWeight=Pd.noteFontWeight,k.anchor=Pd.noteAlign,k.textMargin=Pd.noteMargin,k.valign="center";const w=drawText$1(b,k),T=Math.round(w.map((i=>(i._groups||i)[0][0].getBBox().height)).reduce(((i,c)=>i+c)));_.attr("height",T+2*Pd.noteMargin),c.height+=T+2*Pd.noteMargin,Yd.bumpVerticalPos(T+2*Pd.noteMargin),c.stopy=c.starty+T+2*Pd.noteMargin,c.stopx=c.startx+p.width,Yd.insert(c.startx,c.starty,c.stopx,c.stopy),Yd.models.addNote(c)}(N,p);break;case b.db.LINETYPE.ACTIVE_START:Yd.newActivation(i,N,R);break;case b.db.LINETYPE.ACTIVE_END:!function activeEnd(i,c){const p=Yd.endActivation(i);p.starty+18>c&&(p.starty=c-6,c+=12),Rd.drawActivation(N,p,c,Pd,actorActivations(i.from.actor).length),Yd.insert(p.startx,c-10,p.stopx,c)}(i,Yd.getVerticalPos());break;case b.db.LINETYPE.LOOP_START:adjustLoopHeightForWrap(H,i,Pd.boxMargin,Pd.boxMargin+Pd.boxTextMargin,(i=>Yd.newLoop(i)));break;case b.db.LINETYPE.LOOP_END:c=Yd.endLoop(),Rd.drawLoop(N,c,"loop",Pd),Yd.bumpVerticalPos(c.stopy-Yd.getVerticalPos()),Yd.models.addLoop(c);break;case b.db.LINETYPE.RECT_START:adjustLoopHeightForWrap(H,i,Pd.boxMargin,Pd.boxMargin,(i=>Yd.newLoop(void 0,i.message)));break;case b.db.LINETYPE.RECT_END:c=Yd.endLoop(),Rd.drawBackgroundRect(N,c),Yd.models.addLoop(c),Yd.bumpVerticalPos(c.stopy-Yd.getVerticalPos());break;case b.db.LINETYPE.OPT_START:adjustLoopHeightForWrap(H,i,Pd.boxMargin,Pd.boxMargin+Pd.boxTextMargin,(i=>Yd.newLoop(i)));break;case b.db.LINETYPE.OPT_END:c=Yd.endLoop(),Rd.drawLoop(N,c,"opt",Pd),Yd.bumpVerticalPos(c.stopy-Yd.getVerticalPos()),Yd.models.addLoop(c);break;case b.db.LINETYPE.ALT_START:adjustLoopHeightForWrap(H,i,Pd.boxMargin,Pd.boxMargin+Pd.boxTextMargin,(i=>Yd.newLoop(i)));break;case b.db.LINETYPE.ALT_ELSE:adjustLoopHeightForWrap(H,i,Pd.boxMargin+Pd.boxTextMargin,Pd.boxMargin,(i=>Yd.addSectionToLoop(i)));break;case b.db.LINETYPE.ALT_END:c=Yd.endLoop(),Rd.drawLoop(N,c,"alt",Pd),Yd.bumpVerticalPos(c.stopy-Yd.getVerticalPos()),Yd.models.addLoop(c);break;case b.db.LINETYPE.PAR_START:adjustLoopHeightForWrap(H,i,Pd.boxMargin,Pd.boxMargin+Pd.boxTextMargin,(i=>Yd.newLoop(i)));break;case b.db.LINETYPE.PAR_AND:adjustLoopHeightForWrap(H,i,Pd.boxMargin+Pd.boxTextMargin,Pd.boxMargin,(i=>Yd.addSectionToLoop(i)));break;case b.db.LINETYPE.PAR_END:c=Yd.endLoop(),Rd.drawLoop(N,c,"par",Pd),Yd.bumpVerticalPos(c.stopy-Yd.getVerticalPos()),Yd.models.addLoop(c);break;case b.db.LINETYPE.AUTONUMBER:Z=i.message.start||Z,K=i.message.step||K,i.message.visible?b.db.enableSequenceNumbers():b.db.disableSequenceNumbers();break;case b.db.LINETYPE.CRITICAL_START:adjustLoopHeightForWrap(H,i,Pd.boxMargin,Pd.boxMargin+Pd.boxTextMargin,(i=>Yd.newLoop(i)));break;case b.db.LINETYPE.CRITICAL_OPTION:adjustLoopHeightForWrap(H,i,Pd.boxMargin+Pd.boxTextMargin,Pd.boxMargin,(i=>Yd.addSectionToLoop(i)));break;case b.db.LINETYPE.CRITICAL_END:c=Yd.endLoop(),Rd.drawLoop(N,c,"critical",Pd),Yd.bumpVerticalPos(c.stopy-Yd.getVerticalPos()),Yd.models.addLoop(c);break;case b.db.LINETYPE.BREAK_START:adjustLoopHeightForWrap(H,i,Pd.boxMargin,Pd.boxMargin+Pd.boxTextMargin,(i=>Yd.newLoop(i)));break;case b.db.LINETYPE.BREAK_END:c=Yd.endLoop(),Rd.drawLoop(N,c,"break",Pd),Yd.bumpVerticalPos(c.stopy-Yd.getVerticalPos()),Yd.models.addLoop(c);break;default:try{_=i.msgModel,_.starty=Yd.getVerticalPos(),_.sequenceIndex=Z,_.sequenceVisible=b.db.showSequenceNumbers();const c=function boundMessage(i,c){Yd.bumpVerticalPos(10);const{startx:p,stopx:b,message:_}=c,k=Ri.splitBreaks(_).length,w=Ns.calculateTextDimensions(_,messageFont(Pd)),T=w.height/k;let S;c.height+=T,Yd.bumpVerticalPos(T);let O=w.height-10;const N=w.width;if(p===b){S=Yd.getVerticalPos()+O,Pd.rightAngles||(O+=Pd.boxMargin,S=Yd.getVerticalPos()+O),O+=30;const i=Math.max(N/2,Pd.width/2);Yd.insert(p-i,Yd.getVerticalPos()-10+O,b+i,Yd.getVerticalPos()+30+O)}else O+=Pd.boxMargin,S=Yd.getVerticalPos()+O,Yd.insert(p,S-10,b,S);return Yd.bumpVerticalPos(O),c.height+=O,c.stopy=c.starty+c.height,Yd.insert(c.fromBounds,c.starty,c.toBounds,c.stopy),S}(0,_);J.push({messageModel:_,lineStartY:c}),Yd.models.addMessage(_)}catch(i){k.error("error while drawing message",i)}}[b.db.LINETYPE.SOLID_OPEN,b.db.LINETYPE.DOTTED_OPEN,b.db.LINETYPE.SOLID,b.db.LINETYPE.DOTTED,b.db.LINETYPE.SOLID_CROSS,b.db.LINETYPE.DOTTED_CROSS,b.db.LINETYPE.SOLID_POINT,b.db.LINETYPE.DOTTED_POINT].includes(i.type)&&(Z+=K)})),J.forEach((i=>function(i,c,p,b){const{startx:_,stopx:k,starty:w,message:T,type:S,sequenceIndex:O,sequenceVisible:N}=c,R=Ns.calculateTextDimensions(T,messageFont(Pd)),Y=Rd.getTextObj();Y.x=_,Y.y=w+10,Y.width=k-_,Y.class="messageText",Y.dy="1em",Y.text=T,Y.fontFamily=Pd.messageFontFamily,Y.fontSize=Pd.messageFontSize,Y.fontWeight=Pd.messageFontWeight,Y.anchor=Pd.messageAlign,Y.valign="center",Y.textMargin=Pd.wrapPadding,Y.tspan=!1,drawText$1(i,Y);const j=R.width;let z;_===k?z=Pd.rightAngles?i.append("path").attr("d",`M ${_},${p} H ${_+Math.max(Pd.width/2,j/2)} V ${p+25} H ${_}`):i.append("path").attr("d","M "+_+","+p+" C "+(_+60)+","+(p-10)+" "+(_+60)+","+(p+30)+" "+_+","+(p+20)):(z=i.append("line"),z.attr("x1",_),z.attr("y1",p),z.attr("x2",k),z.attr("y2",p)),S===b.db.LINETYPE.DOTTED||S===b.db.LINETYPE.DOTTED_CROSS||S===b.db.LINETYPE.DOTTED_POINT||S===b.db.LINETYPE.DOTTED_OPEN?(z.style("stroke-dasharray","3, 3"),z.attr("class","messageLine1")):z.attr("class","messageLine0");let U="";Pd.arrowMarkerAbsolute&&(U=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,U=U.replace(/\(/g,"\\("),U=U.replace(/\)/g,"\\)")),z.attr("stroke-width",2),z.attr("stroke","none"),z.style("fill","none"),S!==b.db.LINETYPE.SOLID&&S!==b.db.LINETYPE.DOTTED||z.attr("marker-end","url("+U+"#arrowhead)"),S!==b.db.LINETYPE.SOLID_POINT&&S!==b.db.LINETYPE.DOTTED_POINT||z.attr("marker-end","url("+U+"#filled-head)"),S!==b.db.LINETYPE.SOLID_CROSS&&S!==b.db.LINETYPE.DOTTED_CROSS||z.attr("marker-end","url("+U+"#crosshead)"),(N||Pd.showSequenceNumbers)&&(z.attr("marker-start","url("+U+"#sequencenumber)"),i.append("text").attr("x",_).attr("y",p+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(O))}(N,i.messageModel,i.lineStartY,b))),Pd.mirrorActors&&(Yd.bumpVerticalPos(2*Pd.boxMargin),drawActors(N,R,Y,Yd.getVerticalPos(),Pd,j),Yd.bumpVerticalPos(Pd.boxMargin),fixLifeLineHeights(N,Yd.getVerticalPos()));const tt=drawActorsPopup(N,R,Y,O),{bounds:et}=Yd.getBounds();k.debug("For line height fix Querying: #"+c+" .actor-line");selectAll("#"+c+" .actor-line").attr("y2",et.stopy);let at=et.stopy-et.starty;atN&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},Mt={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return 41;case 1:case 44:return 50;case 2:case 45:return 51;case 3:case 46:return 52;case 4:case 47:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:case 11:case 13:case 14:case 15:case 16:case 56:case 58:case 64:break;case 12:case 79:return 5;case 17:case 34:return this.pushState("SCALE"),17;case 18:case 35:return 18;case 19:case 25:case 36:case 51:case 54:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 37:this.pushState("STATE");break;case 38:case 41:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;case 39:case 42:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;case 40:case 43:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;case 48:this.begin("STATE_STRING");break;case 49:return this.popState(),this.pushState("STATE_ID"),"AS";case 50:case 66:return this.popState(),"ID";case 52:return"STATE_DESCR";case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 57:return this.popState(),21;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:return"NOTE_TEXT";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),c.yytext=c.yytext.substr(2).trim(),31;case 69:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),31;case 70:case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return c.yytext=c.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};function Parser(){this.yy={}}return Dt.lexer=Mt,Parser.prototype=Dt,Dt.Parser=Parser,new Parser}();zd.parser=zd;const Wd=zd,stateDetector=(i,c)=>{var p;return"dagre-wrapper"!==(null==(p=null==c?void 0:c.state)?void 0:p.defaultRenderer)&&null!==i.match(/^\s*stateDiagram/)},stateDetectorV2=(i,c)=>{var p;return null!==i.match(/^\s*stateDiagram-v2/)||!(!i.match(/^\s*stateDiagram/)||"dagre-wrapper"!==(null==(p=null==c?void 0:c.state)?void 0:p.defaultRenderer))},Ud="state",Hd="relation",qd="default",Vd="divider",Gd="[*]",Xd="start",Zd="color",Kd="fill";let Qd="LR",Jd=[],tp={};let ep={root:{relations:[],states:{},documents:{}}},np=ep.root,rp=0,ip=0;const clone=i=>JSON.parse(JSON.stringify(i)),docTranslator=(i,c,p)=>{if(c.stmt===Hd)docTranslator(i,c.state1,!0),docTranslator(i,c.state2,!1);else if(c.stmt===Ud&&"[*]"===c.id&&(c.id=p?i.id+"_start":i.id+"_end",c.start=p),c.doc){const i=[];let p,b=[];for(p=0;p0&&b.length>0){const p={stmt:Ud,id:generateId$1(),type:"divider",doc:clone(b)};i.push(clone(p)),c.doc=i}c.doc.forEach((i=>docTranslator(c,i,!0)))}},addState=function(i,c="default",p=null,b=null,_=null,w=null,T=null,S=null){if(void 0===np.states[i]?(k.info("Adding state ",i,b),np.states[i]={id:i,descriptions:[],type:c,doc:p,note:_,classes:[],styles:[],textStyles:[]}):(np.states[i].doc||(np.states[i].doc=p),np.states[i].type||(np.states[i].type=c)),b&&(k.info("Setting state description",i,b),"string"==typeof b&&addDescription(i,b.trim()),"object"==typeof b&&b.forEach((c=>addDescription(i,c.trim())))),_&&(np.states[i].note=_,np.states[i].note.text=Ri.sanitizeText(np.states[i].note.text,getConfig$1())),w){k.info("Setting state classes",i,w);("string"==typeof w?[w]:w).forEach((c=>setCssClass(i,c.trim())))}if(T){k.info("Setting state styles",i,T);("string"==typeof T?[T]:T).forEach((c=>setStyle(i,c.trim())))}if(S){k.info("Setting state styles",i,T);("string"==typeof S?[S]:S).forEach((c=>setTextStyle(i,c.trim())))}},clear$1=function(i){ep={root:{relations:[],states:{},documents:{}}},np=ep.root,rp=0,tp={},i||clear$g()},getState=function(i){return np.states[i]};function startIdIfNeeded(i=""){let c=i;return i===Gd&&(rp++,c=`start${rp}`),c}function startTypeIfNeeded(i="",c="default"){return i===Gd?Xd:c}const addRelation=function(i,c,p){if("object"==typeof i)!function addRelationObjs(i,c,p){let b=startIdIfNeeded(i.id),_=startTypeIfNeeded(i.id,i.type),k=startIdIfNeeded(c.id),w=startTypeIfNeeded(c.id,c.type);addState(b,_,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),addState(k,w,c.doc,c.description,c.note,c.classes,c.styles,c.textStyles),np.relations.push({id1:b,id2:k,relationTitle:Ri.sanitizeText(p,getConfig$1())})}(i,c,p);else{const b=startIdIfNeeded(i),_=startTypeIfNeeded(i),k=function endIdIfNeeded(i=""){let c=i;return"[*]"===i&&(rp++,c=`end${rp}`),c}(c),w=function endTypeIfNeeded(i="",c="default"){return"[*]"===i?"end":c}(c);addState(b,_),addState(k,w),np.relations.push({id1:b,id2:k,title:Ri.sanitizeText(p,getConfig$1())})}},addDescription=function(i,c){const p=np.states[i],b=c.startsWith(":")?c.replace(":","").trim():c;p.descriptions.push(Ri.sanitizeText(b,getConfig$1()))},addStyleClass=function(i,c=""){void 0===tp[i]&&(tp[i]={id:i,styles:[],textStyles:[]});const p=tp[i];null!=c&&c.split(",").forEach((i=>{const c=i.replace(/([^;]*);/,"$1").trim();if(i.match(Zd)){const i=c.replace(Kd,"bgFill").replace(Zd,Kd);p.textStyles.push(i)}p.styles.push(c)}))},setCssClass=function(i,c){i.split(",").forEach((function(i){let p=getState(i);if(void 0===p){const c=i.trim();addState(c),p=getState(c)}p.classes.push(c)}))},setStyle=function(i,c){const p=getState(i);void 0!==p&&p.textStyles.push(c)},setTextStyle=function(i,c){const p=getState(i);void 0!==p&&p.textStyles.push(c)},ap={parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().state,addState:addState,clear:clear$1,getState:getState,getStates:function(){return np.states},getRelations:function(){return np.relations},getClasses:function(){return tp},getDirection:()=>Qd,addRelation:addRelation,getDividerId:()=>(ip++,"divider-id-"+ip),setDirection:i=>{Qd=i},cleanupLabel:function(i){return":"===i.substring(0,1)?i.substr(2).trim():i.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){k.info("Documents = ",ep)},getRootDoc:()=>Jd,setRootDoc:i=>{k.info("Setting root doc",i),Jd=i},getRootDocV2:()=>(docTranslator({id:"root"},{id:"root",doc:Jd},!0),{id:"root",doc:Jd}),extract:i=>{let c;c=i.doc?i.doc:i,k.info(c),clear$1(!0),k.info("Extract",c),c.forEach((i=>{switch(i.stmt){case Ud:addState(i.id,i.type,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles);break;case Hd:addRelation(i.state1,i.state2,i.description);break;case"classDef":addStyleClass(i.id,i.classes);break;case"applyClass":setCssClass(i.id,i.styleClass)}}))},trimColon:i=>i&&":"===i[0]?i.substr(1).trim():i.trim(),getAccTitle:getAccTitle,setAccTitle:setAccTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription,addStyleClass:addStyleClass,setCssClass:setCssClass,addDescription:addDescription,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle},sp={},idCache$1_set=(i,c)=>{sp[i]=c},drawDescrState=(i,c)=>{const p=i.append("text").attr("x",2*getConfig$1().state.padding).attr("y",getConfig$1().state.textHeight+1.3*getConfig$1().state.padding).attr("font-size",getConfig$1().state.fontSize).attr("class","state-title").text(c.descriptions[0]).node().getBBox(),b=p.height,_=i.append("text").attr("x",getConfig$1().state.padding).attr("y",b+.4*getConfig$1().state.padding+getConfig$1().state.dividerMargin+getConfig$1().state.textHeight).attr("class","state-description");let k=!0,w=!0;c.descriptions.forEach((function(i){k||(!function(i,c,p){const b=i.append("tspan").attr("x",2*getConfig$1().state.padding).text(c);p||b.attr("dy",getConfig$1().state.textHeight)}(_,i,w),w=!1),k=!1}));const T=i.append("line").attr("x1",getConfig$1().state.padding).attr("y1",getConfig$1().state.padding+b+getConfig$1().state.dividerMargin/2).attr("y2",getConfig$1().state.padding+b+getConfig$1().state.dividerMargin/2).attr("class","descr-divider"),S=_.node().getBBox(),O=Math.max(S.width,p.width);return T.attr("x2",O+3*getConfig$1().state.padding),i.insert("rect",":first-child").attr("x",getConfig$1().state.padding).attr("y",getConfig$1().state.padding).attr("width",O+2*getConfig$1().state.padding).attr("height",S.height+b+2*getConfig$1().state.padding).attr("rx",getConfig$1().state.radius),i},addTitleAndBox=(i,c,p)=>{const b=getConfig$1().state.padding,_=2*getConfig$1().state.padding,k=i.node().getBBox(),w=k.width,T=k.x,S=i.append("text").attr("x",0).attr("y",getConfig$1().state.titleShift).attr("font-size",getConfig$1().state.fontSize).attr("class","state-title").text(c.id),O=S.node().getBBox().width+_;let N,R=Math.max(O,w);R===w&&(R+=_);const Y=i.node().getBBox();c.doc,N=T-b,O>w&&(N=(w-R)/2+b),Math.abs(T-Y.x)w&&(N=T-(O-w)/2);const j=1-getConfig$1().state.textHeight;return i.insert("rect",":first-child").attr("x",N).attr("y",j).attr("class",p?"alt-composit":"composit").attr("width",R).attr("height",Y.height+getConfig$1().state.textHeight+getConfig$1().state.titleShift+1).attr("rx","0"),S.attr("x",N+b),O<=w&&S.attr("x",T+(R-_)/2-O/2+b),i.insert("rect",":first-child").attr("x",N).attr("y",getConfig$1().state.titleShift-getConfig$1().state.textHeight-getConfig$1().state.padding).attr("width",R).attr("height",3*getConfig$1().state.textHeight).attr("rx",getConfig$1().state.radius),i.insert("rect",":first-child").attr("x",N).attr("y",getConfig$1().state.titleShift-getConfig$1().state.textHeight-getConfig$1().state.padding).attr("width",R).attr("height",Y.height+3+2*getConfig$1().state.textHeight).attr("rx",getConfig$1().state.radius),i},drawNote=(i,c)=>{c.attr("class","state-note");const p=c.append("rect").attr("x",0).attr("y",getConfig$1().state.padding),b=c.append("g"),{textWidth:_,textHeight:k}=((i,c,p,b)=>{let _=0;const k=b.append("text");k.style("text-anchor","start"),k.attr("class","noteText");let w=i.replace(/\r\n/g," ");w=w.replace(/\n/g," ");const T=w.split(Ri.lineBreakRegex);let S=1.25*getConfig$1().state.noteMargin;for(const i of T){const b=i.trim();if(b.length>0){const i=k.append("tspan");i.text(b),0===S&&(S+=i.node().getBBox().height),_+=S,i.attr("x",c+getConfig$1().state.noteMargin),i.attr("y",p+_+1.25*getConfig$1().state.noteMargin)}}return{textWidth:k.node().getBBox().width,textHeight:_}})(i,0,0,b);return p.attr("height",k+2*getConfig$1().state.noteMargin),p.attr("width",_+2*getConfig$1().state.noteMargin),p},drawState=function(i,c){const p=c.id,b={id:p,label:c.id,width:0,height:0},_=i.append("g").attr("id",p).attr("class","stateGroup");"start"===c.type&&(i=>{i.append("circle").attr("class","start-state").attr("r",getConfig$1().state.sizeUnit).attr("cx",getConfig$1().state.padding+getConfig$1().state.sizeUnit).attr("cy",getConfig$1().state.padding+getConfig$1().state.sizeUnit)})(_),"end"===c.type&&(i=>{i.append("circle").attr("class","end-state-outer").attr("r",getConfig$1().state.sizeUnit+getConfig$1().state.miniPadding).attr("cx",getConfig$1().state.padding+getConfig$1().state.sizeUnit+getConfig$1().state.miniPadding).attr("cy",getConfig$1().state.padding+getConfig$1().state.sizeUnit+getConfig$1().state.miniPadding),i.append("circle").attr("class","end-state-inner").attr("r",getConfig$1().state.sizeUnit).attr("cx",getConfig$1().state.padding+getConfig$1().state.sizeUnit+2).attr("cy",getConfig$1().state.padding+getConfig$1().state.sizeUnit+2)})(_),"fork"!==c.type&&"join"!==c.type||((i,c)=>{let p=getConfig$1().state.forkWidth,b=getConfig$1().state.forkHeight;if(c.parentId){let i=p;p=b,b=i}i.append("rect").style("stroke","black").style("fill","black").attr("width",p).attr("height",b).attr("x",getConfig$1().state.padding).attr("y",getConfig$1().state.padding)})(_,c),"note"===c.type&&drawNote(c.note.text,_),"divider"===c.type&&(i=>{i.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",getConfig$1().state.textHeight).attr("class","divider").attr("x2",2*getConfig$1().state.textHeight).attr("y1",0).attr("y2",0)})(_),"default"===c.type&&0===c.descriptions.length&&((i,c)=>{const p=i.append("text").attr("x",2*getConfig$1().state.padding).attr("y",getConfig$1().state.textHeight+2*getConfig$1().state.padding).attr("font-size",getConfig$1().state.fontSize).attr("class","state-title").text(c.id),b=p.node().getBBox();i.insert("rect",":first-child").attr("x",getConfig$1().state.padding).attr("y",getConfig$1().state.padding).attr("width",b.width+2*getConfig$1().state.padding).attr("height",b.height+2*getConfig$1().state.padding).attr("rx",getConfig$1().state.radius)})(_,c),"default"===c.type&&c.descriptions.length>0&&drawDescrState(_,c);const k=_.node().getBBox();return b.width=k.width+2*getConfig$1().state.padding,b.height=k.height+2*getConfig$1().state.padding,idCache$1_set(p,b),b};let op=0;let lp;const cp={},renderDoc=(i,c,p,b,_,w,T)=>{const S=new Graph({compound:!0,multigraph:!0});let O,N=!0;for(O=0;O{const c=i.parentElement;let p=0,b=0;c&&(c.parentElement&&(p=c.parentElement.getBBox().width),b=parseInt(c.getAttribute("data-x-shift"),10),Number.isNaN(b)&&(b=0)),i.setAttribute("x1",0-b+8),i.setAttribute("x2",p-b-8)}))}else k.debug("No Node "+i+": "+JSON.stringify(S.node(i)))}));let H=U.getBBox();S.edges().forEach((function(i){void 0!==i&&void 0!==S.edge(i)&&(k.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(S.edge(i))),function(i,c,p){c.points=c.points.filter((i=>!Number.isNaN(i.y)));const b=c.points,_=line$1().x((function(i){return i.x})).y((function(i){return i.y})).curve(curveBasis),w=i.append("path").attr("d",_(b)).attr("id","edge"+op).attr("class","transition");let T="";if(getConfig$1().state.arrowMarkerAbsolute&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\("),T=T.replace(/\)/g,"\\)")),w.attr("marker-end","url("+T+"#"+function(i){switch(i){case ap.relationType.AGGREGATION:return"aggregation";case ap.relationType.EXTENSION:return"extension";case ap.relationType.COMPOSITION:return"composition";case ap.relationType.DEPENDENCY:return"dependency"}}(ap.relationType.DEPENDENCY)+"End)"),void 0!==p.title){const b=i.append("g").attr("class","stateLabel"),{x:_,y:w}=Ns.calcLabelPosition(c.points),T=Ri.getRows(p.title);let S=0;const O=[];let N=0,R=0;for(let i=0;i<=T.length;i++){const c=b.append("text").attr("text-anchor","middle").text(T[i]).attr("x",_).attr("y",w+S),p=c.node().getBBox();if(N=Math.max(N,p.width),R=Math.min(R,p.x),k.info(p.x,_,w+S),0===S){const i=c.node().getBBox();S=i.height,k.info("Title height",S,w)}O.push(c)}let Y=S*T.length;if(T.length>1){const i=(T.length-1)*S*.5;O.forEach(((c,p)=>c.attr("y",w+p*S-i))),Y=S*T.length}const j=b.node().getBBox();b.insert("rect",":first-child").attr("class","box").attr("x",_-N/2-getConfig$1().state.padding/2).attr("y",w-Y/2-getConfig$1().state.padding/2-3.5).attr("width",N+getConfig$1().state.padding).attr("height",Y+getConfig$1().state.padding),k.info(j)}op++}(c,S.edge(i),S.edge(i).relation))})),H=U.getBBox();const Z={id:p||"root",label:p||"root",width:0,height:0};return Z.width=H.width+2*lp.padding,Z.height=H.height+2*lp.padding,k.debug("Doc rendered",Z,S),Z},hp={setConf:function(){},draw:function(i,c,p,b){lp=getConfig$1().state;const _=getConfig$1().securityLevel;let w;"sandbox"===_&&(w=select("#i"+c));const T=select("sandbox"===_?w.nodes()[0].contentDocument.body:"body"),S="sandbox"===_?w.nodes()[0].contentDocument:document;k.debug("Rendering diagram "+i);const O=T.select(`[id='${c}']`);O.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z");new Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));const N=b.db.getRootDoc();renderDoc(N,O,void 0,!1,T,S,b);const R=lp.padding,Y=O.node().getBBox(),j=Y.width+2*R,z=Y.height+2*R;configureSvgSize(O,z,1.75*j,lp.useMaxWidth),O.attr("viewBox",`${Y.x-lp.padding} ${Y.y-lp.padding} `+j+" "+z)}},up="rect",dp="rectWithTitle",pp="statediagram",fp="transition",gp="parent",yp="note",mp="----parent",bp="fill:none",_p="fill: #333",xp="text",vp="normal";let kp={},wp=0;function stateDomId(i="",c=0,p="",b="----"){return`state-${i}${null!==p&&p.length>0?`${b}${p}`:""}-${c}`}const setupNode=(i,c,p,b,_,w)=>{const T=p.id,S=function getClassesFromDbInfo(i){return null==i?"":i.classes?i.classes.join(" "):""}(b[T]);if("root"!==T){let c=up;!0===p.start&&(c="start"),!1===p.start&&(c="end"),p.type!==qd&&(c=p.type),kp[T]||(kp[T]={id:T,shape:c,description:Ri.sanitizeText(T,getConfig$1()),classes:`${S} statediagram-state`});const b=kp[T];p.description&&(Array.isArray(b.description)?(b.shape=dp,b.description.push(p.description)):b.description.length>0?(b.shape=dp,b.description===T?b.description=[p.description]:b.description=[b.description,p.description]):(b.shape=up,b.description=p.description),b.description=Ri.sanitizeTextOrArray(b.description,getConfig$1())),1===b.description.length&&b.shape===dp&&(b.shape=up),!b.type&&p.doc&&(k.info("Setting cluster for ",T,getDir(p)),b.type="group",b.dir=getDir(p),b.shape=p.type===Vd?"divider":"roundedWithTitle",b.classes=b.classes+" statediagram-cluster "+(w?"statediagram-cluster-alt":""));const _={labelStyle:"",shape:b.shape,labelText:b.description,classes:b.classes,style:"",id:T,dir:b.dir,domId:stateDomId(T,wp),type:b.type,padding:15};if(p.note){const c={labelStyle:"",shape:"note",labelText:p.note.text,classes:"statediagram-note",style:"",id:T+"----note-"+wp,domId:stateDomId(T,wp,yp),type:b.type,padding:15},k={labelStyle:"",shape:"noteGroup",labelText:p.note.text,classes:b.classes,style:"",id:T+mp,domId:stateDomId(T,wp,gp),type:"group",padding:0};wp++;const w=T+mp;i.setNode(w,k),i.setNode(c.id,c),i.setNode(T,_),i.setParent(T,w),i.setParent(c.id,w);let S=T,O=c.id;"left of"===p.note.position&&(S=c.id,O=T),i.setEdge(S,O,{arrowhead:"none",arrowType:"",style:bp,labelStyle:"",classes:"transition note-edge",arrowheadStyle:_p,labelpos:"c",labelType:xp,thickness:vp})}else i.setNode(T,_)}c&&"root"!==c.id&&(k.trace("Setting node ",T," to be child of its parent ",c.id),i.setParent(T,c.id)),p.doc&&(k.trace("Adding nodes children "),setupDoc(i,p,p.doc,b,_,!w))},setupDoc=(i,c,p,b,_,w)=>{k.trace("items",p),p.forEach((p=>{switch(p.stmt){case Ud:case qd:setupNode(i,c,p,b,_,w);break;case Hd:{setupNode(i,c,p.state1,b,_,w),setupNode(i,c,p.state2,b,_,w);const k={id:"edge"+wp,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:bp,labelStyle:"",label:Ri.sanitizeText(p.description,getConfig$1()),arrowheadStyle:_p,labelpos:"c",labelType:xp,thickness:vp,classes:fp};i.setEdge(p.state1.id,p.state2.id,k,wp),wp++}}}))},getDir=(i,c="TB")=>{let p=c;if(i.doc)for(let c=0;cN&&pt.push("'"+this.terminals_[at]+"'");yt=j.showPosition?"Parse error on line "+(S+1)+":\n"+j.showPosition()+"\nExpecting "+pt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":"Parse error on line "+(S+1)+": Unexpected "+(K==R?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:H,expected:pt})}if(tt[0]instanceof Array&&tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+K);switch(tt[0]){case 1:p.push(K),_.push(j.yytext),k.push(j.yylloc),p.push(tt[1]),K=null,O=j.yyleng,T=j.yytext,S=j.yylineno,H=j.yylloc;break;case 2:if(ot=this.productions_[tt[1]][1],gt.$=_[_.length-ot],gt._$={first_line:k[k.length-(ot||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ot||1)].first_column,last_column:k[k.length-1].last_column},Z&&(gt._$.range=[k[k.length-(ot||1)].range[0],k[k.length-1].range[1]]),void 0!==(et=this.performAction.apply(gt,[T,O,S,z.yy,tt[1],_,k].concat(Y))))return et;ot&&(p=p.slice(0,-1*ot*2),_=_.slice(0,-1*ot),k=k.slice(0,-1*ot)),p.push(this.productions_[tt[1]][0]),_.push(gt.$),k.push(gt._$),ut=w[p[p.length-2]][p[p.length-1]],p.push(ut);break;case 3:return!0}}return!0}},Y={EOF:1,parseError:function parseError(i,c){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,c)},setInput:function(i,c){return this.yy=c||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var c=i.length,p=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===b.length?this.yylloc.first_column:0)+b[b.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),c=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+c+"^"},test_match:function(i,c){var p,b,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),(b=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],p=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var k in _)this[k]=_[k];return!1}return!1},next:function(){if(this.done)return this.EOF;var i,c,p,b;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),k=0;k<_.length;k++)if((p=this._input.match(this.rules[_[k]]))&&(!c||p[0].length>c[0].length)){if(c=p,b=k,this.options.backtrack_lexer){if(!1!==(i=this.test_match(p,_[k])))return i;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(i=this.test_match(c,_[b]))&&i:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function lex(){var i=this.next();return i||this.lex()},begin:function begin(i){this.conditionStack.push(i)},popState:function popState(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function _currentRules(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function topState(i){return(i=this.conditionStack.length-1-Math.abs(i||0))>=0?this.conditionStack[i]:"INITIAL"},pushState:function pushState(i){this.begin(i)},stateStackSize:function stateStackSize(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function anonymous(i,c,p,b){switch(p){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};function Parser(){this.yy={}}return R.lexer=Y,Parser.prototype=R,R.Parser=Parser,new Parser}();Cp.parser=Cp;const Sp=Cp,journeyDetector=i=>null!==i.match(/^\s*journey/);let Ep="";const Ap=[],Lp=[],Dp=[],compileTasks=function(){let i=!0;for(const[c,p]of Dp.entries())Dp[c].processed,i=i&&p.processed;return i},Op={parseDirective:function(i,c,p){nf.parseDirective(this,i,c,p)},getConfig:()=>getConfig$1().journey,clear:function(){Ap.length=0,Lp.length=0,Ep="",Dp.length=0,clear$g()},setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,setAccTitle:setAccTitle,getAccTitle:getAccTitle,setAccDescription:setAccDescription,getAccDescription:getAccDescription,addSection:function(i){Ep=i,Ap.push(i)},getSections:function(){return Ap},getTasks:function(){let i=compileTasks();let c=0;for(;!i&&c<100;)i=compileTasks(),c++;return Lp.push(...Dp),Lp},addTask:function(i,c){const p=c.substr(1).split(":");let b=0,_=[];1===p.length?(b=Number(p[0]),_=[]):(b=Number(p[0]),_=p[1].split(","));const k=_.map((i=>i.trim())),w={section:Ep,type:Ep,people:k,task:i,score:b};Dp.push(w)},addTaskOrg:function(i){const c={section:Ep,type:Ep,description:i,task:i,classes:[]};Lp.push(c)},getActors:function(){return function(){const i=[];return Lp.forEach((c=>{c.people&&i.push(...c.people)})),[...new Set(i)].sort()}()}},drawRect=function(i,c){const p=i.append("rect");return p.attr("x",c.x),p.attr("y",c.y),p.attr("fill",c.fill),p.attr("stroke",c.stroke),p.attr("width",c.width),p.attr("height",c.height),p.attr("rx",c.rx),p.attr("ry",c.ry),void 0!==c.class&&p.attr("class",c.class),p},drawCircle=function(i,c){const p=i.append("circle");return p.attr("cx",c.cx),p.attr("cy",c.cy),p.attr("class","actor-"+c.pos),p.attr("fill",c.fill),p.attr("stroke",c.stroke),p.attr("r",c.r),void 0!==p.class&&p.attr("class",p.class),void 0!==c.title&&p.append("title").text(c.title),p},drawText=function(i,c){const p=c.text.replace(/ /gi," "),b=i.append("text");b.attr("x",c.x),b.attr("y",c.y),b.attr("class","legend"),b.style("text-anchor",c.anchor),void 0!==c.class&&b.attr("class",c.class);const _=b.append("tspan");return _.attr("x",c.x+2*c.textMargin),_.text(p),b};let Np=-1;const getNoteRect=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Mp=function(){function byText(i,c,p,b,_,k,w,T){_setTextAttrs(c.append("text").attr("x",p+_/2).attr("y",b+k/2+5).style("font-color",T).style("text-anchor","middle").text(i),w)}function byTspan(i,c,p,b,_,k,w,T,S){const{taskFontSize:O,taskFontFamily:N}=T,R=i.split(/ /gi);for(let i=0;i3?function smile(i){const b=d3arc().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(p/2.2);i.append("path").attr("class","mouth").attr("d",b).attr("transform","translate("+c.cx+","+(c.cy+2)+")")}(_):c.score<3?function sad(i){const b=d3arc().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(p/2.2);i.append("path").attr("class","mouth").attr("d",b).attr("transform","translate("+c.cx+","+(c.cy+7)+")")}(_):function ambivalent(i){i.append("line").attr("class","mouth").attr("stroke",2).attr("x1",c.cx-5).attr("y1",c.cy+7).attr("x2",c.cx+5).attr("y2",c.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(_)}(_,{cx:b,cy:300+30*(5-c.score),score:c.score});const k=getNoteRect();k.x=c.x,k.y=c.y,k.fill=c.fill,k.width=p.width,k.height=p.height,k.class="task task-type-"+c.num,k.rx=3,k.ry=3,drawRect(_,k);let w=c.x+14;c.people.forEach((i=>{const p=c.actors[i].color,b={cx:w,cy:c.y,r:7,fill:p,stroke:"#000",title:i,pos:c.actors[i].position};drawCircle(_,b),w+=10})),Mp(p)(c.task,_,k.x,k.y,k.width,k.height,{class:"task"},p,c.colour)},svgDraw_initGraphics=function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},Fp={};const $p=getConfig$1().journey,Rp=$p.leftMargin,Pp={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(i,c,p,b){void 0===i[c]?i[c]=p:i[c]=b(p,i[c])},updateBounds:function(i,c,p,b){const _=getConfig$1().journey,k=this;let w=0;this.sequenceItems.forEach(function updateFn(T){return function updateItemBounds(S){w++;const O=k.sequenceItems.length-w+1;k.updateVal(S,"starty",c-O*_.boxMargin,Math.min),k.updateVal(S,"stopy",b+O*_.boxMargin,Math.max),k.updateVal(Pp.data,"startx",i-O*_.boxMargin,Math.min),k.updateVal(Pp.data,"stopx",p+O*_.boxMargin,Math.max),"activation"!==T&&(k.updateVal(S,"startx",i-O*_.boxMargin,Math.min),k.updateVal(S,"stopx",p+O*_.boxMargin,Math.max),k.updateVal(Pp.data,"starty",c-O*_.boxMargin,Math.min),k.updateVal(Pp.data,"stopy",b+O*_.boxMargin,Math.max))}}())},insert:function(i,c,p,b){const _=Math.min(i,p),k=Math.max(i,p),w=Math.min(c,b),T=Math.max(c,b);this.updateVal(Pp.data,"startx",_,Math.min),this.updateVal(Pp.data,"starty",w,Math.min),this.updateVal(Pp.data,"stopx",k,Math.max),this.updateVal(Pp.data,"stopy",T,Math.max),this.updateBounds(_,w,k,T)},bumpVerticalPos:function(i){this.verticalPos=this.verticalPos+i,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Yp=$p.sectionFills,jp=$p.sectionColours,drawTasks=function(i,c,p){const b=getConfig$1().journey;let _="";const k=p+(2*b.height+b.diagramMarginY);let w=0,T="#CCC",S="black",O=0;for(const[p,N]of c.entries()){if(_!==N.section){T=Yp[w%Yp.length],O=w%Yp.length,S=jp[w%jp.length];const c={x:p*b.taskMargin+p*b.width+Rp,y:50,text:N.section,fill:T,num:O,colour:S};svgDraw_drawSection(i,c,b),_=N.section,w++}const c=N.people.reduce(((i,c)=>(Fp[c]&&(i[c]=Fp[c]),i)),{});N.x=p*b.taskMargin+p*b.width+Rp,N.y=k,N.width=b.diagramMarginX,N.height=b.diagramMarginY,N.colour=S,N.fill=T,N.num=O,N.actors=c,svgDraw_drawTask(i,N,b),Pp.insert(N.x,N.y,N.x+N.width+b.taskMargin,450)}},zp={setConf:function(i){Object.keys(i).forEach((function(c){$p[c]=i[c]}))},draw:function(i,c,p,b){const _=getConfig$1().journey;b.db.clear(),b.parser.parse(i+"\n");const k=getConfig$1().securityLevel;let w;"sandbox"===k&&(w=select("#i"+c));const T=select("sandbox"===k?w.nodes()[0].contentDocument.body:"body");Pp.init();const S=T.select("#"+c);svgDraw_initGraphics(S);const O=b.db.getTasks(),N=b.db.getDiagramTitle(),R=b.db.getActors();for(const i in Fp)delete Fp[i];let Y=0;R.forEach((i=>{Fp[i]={color:_.actorColours[Y%_.actorColours.length],position:Y},Y++})),function drawActorLegend(i){const c=getConfig$1().journey;let p=60;Object.keys(Fp).forEach((b=>{const _=Fp[b].color,k={cx:20,cy:p,r:7,fill:_,stroke:"#000",pos:Fp[b].position};Ip(i,k);const w={x:40,y:p+7,fill:"#666",text:b,textMargin:5|c.boxTextMargin};Bp(i,w),p+=20}))}(S),Pp.insert(0,0,Rp,50*Object.keys(Fp).length),drawTasks(S,O,0);const j=Pp.getBounds();N&&S.append("text").text(N).attr("x",Rp).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const z=j.stopy-j.starty+2*_.diagramMarginY,U=Rp+j.stopx+2*_.diagramMarginX;configureSvgSize(S,z,U,_.useMaxWidth),S.append("line").attr("x1",Rp).attr("y1",4*_.height).attr("x2",U-Rp-4).attr("y2",4*_.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const H=N?70:0;S.attr("viewBox",`${j.startx} -25 ${U} ${z+H}`),S.attr("preserveAspectRatio","xMinYMin meet"),S.attr("height",z+H+25)}};let Wp={};const Up={setConf:function(i){Wp={...Wp,...i}},draw:(i,c,p)=>{try{k.debug("Renering svg for syntax error\n");const i=select("#"+c),b=i.append("g");b.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),b.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),b.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),b.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),b.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),b.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),b.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),b.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+p),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){k.error("Error while rendering info diagram"),k.error(function getErrorMessage(i){return i instanceof Error?i.message:String(i)}(i))}}};let Hp=!1;const addDiagrams=()=>{Hp||(Hp=!0,registerDiagram("error",{db:{clear:()=>{}},styles:errorStyles,renderer:Up,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},(i=>"error"===i.toLowerCase().trim())),registerDiagram("c4",{parser:Io,db:qo,renderer:Jo,styles:c4Styles,init:i=>{Jo.setConf(i.c4)}},c4Detector),registerDiagram("class",{parser:el,db:cl,renderer:Lh,styles:classStyles,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,cl.clear()}},classDetector),registerDiagram("classDiagram",{parser:el,db:cl,renderer:zh,styles:classStyles,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,cl.clear()}},classDetectorV2),registerDiagram("er",{parser:Uh,db:Vh,renderer:iu,styles:erStyles},erDetector),registerDiagram("gantt",{parser:Eu,db:Gu,renderer:Zu,styles:ganttStyles},ganttDetector),registerDiagram("info",{parser:Qu,db:ed,renderer:nd,styles:infoStyles},infoDetector),registerDiagram("pie",{parser:id,db:od,renderer:ud,styles:pieStyles},pieDetector),registerDiagram("requirement",{parser:pd,db:_d,renderer:Td,styles:requirementStyles},requirementDetector),registerDiagram("sequence",{parser:Sd,db:Md,renderer:jd,styles:sequenceStyles,init:i=>{if(i.sequence||(i.sequence={}),i.sequence.arrowMarkerAbsolute=i.arrowMarkerAbsolute,"sequenceDiagram"in i)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");Md.setWrap(i.wrap),jd.setConf(i.sequence)}},sequenceDetector),registerDiagram("state",{parser:Wd,db:ap,renderer:hp,styles:stateStyles,init:i=>{i.state||(i.state={}),i.state.arrowMarkerAbsolute=i.arrowMarkerAbsolute,ap.clear()}},stateDetector),registerDiagram("stateDiagram",{parser:Wd,db:ap,renderer:Tp,styles:stateStyles,init:i=>{i.state||(i.state={}),i.state.arrowMarkerAbsolute=i.arrowMarkerAbsolute,ap.clear()}},stateDetectorV2),registerDiagram("journey",{parser:Sp,db:Op,renderer:zp,styles:journeyStyles,init:i=>{zp.setConf(i.journey),Op.clear()}},journeyDetector),registerDiagram("flowchart",{parser:su,db:ku,renderer:Cu,styles:flowStyles,init:i=>{i.flowchart||(i.flowchart={}),i.flowchart.arrowMarkerAbsolute=i.arrowMarkerAbsolute,flowRenderer_setConf(i.flowchart),ku.clear(),ku.setGen("gen-1")}},flowDetector),registerDiagram("flowchart-v2",{parser:su,db:ku,renderer:Cu,styles:flowStyles,init:i=>{i.flowchart||(i.flowchart={}),i.flowchart.arrowMarkerAbsolute=i.arrowMarkerAbsolute,setConfig({flowchart:{arrowMarkerAbsolute:i.arrowMarkerAbsolute}}),Cu.setConf(i.flowchart),ku.clear(),ku.setGen("gen-2")}},flowDetectorV2),registerDiagram("gitGraph",{parser:ao,db:vo,renderer:No,styles:gitGraphStyles},gitGraphDetector))};class Diagram{constructor(i,c){var p,b;__publicField(this,"type","graph"),__publicField(this,"parser"),__publicField(this,"renderer"),__publicField(this,"db"),__publicField(this,"detectTypeFailed",!1),this.txt=i;const _=getConfig$1();this.txt=i;try{this.type=detectType(i,_)}catch(i){this.handleError(i,c),this.type="error",this.detectTypeFailed=!0}const w=getDiagram(this.type);k.debug("Type "+this.type),this.db=w.db,null==(b=(p=this.db).clear)||b.call(p),this.renderer=w.renderer,this.parser=w.parser;const T=this.parser.parse.bind(this.parser);this.parser.parse=i=>T(function extractFrontMatter(i,c){var p;const b=i.match(Ga);if(b){const _=Va(b[1],{schema:qa});return(null==_?void 0:_.title)&&(null==(p=c.setDiagramTitle)||p.call(c,_.title)),i.slice(b[0].length)}return i}(i,this.db)),this.parser.parser.yy=this.db,w.init&&(w.init(_),k.debug("Initialized diagram "+this.type,_)),this.txt+="\n",this.parse(this.txt,c)}parse(i,c){var p,b;if(this.detectTypeFailed)return!1;try{return i+="\n",null==(b=(p=this.db).clear)||b.call(p),this.parser.parse(i),!0}catch(i){this.handleError(i,c)}return!1}handleError(i,c){if(void 0===c)throw i;isDetailedError(i)?c(i.str,i.hash):c(i)}getParser(){return this.parser}getType(){return this.type}}const getDiagramFromText=(i,c)=>{const p=detectType(i,getConfig$1());try{getDiagram(p)}catch(b){const _=Ka[p].loader;if(!_)throw new Error(`Diagram ${p} not found.`);return _().then((({diagram:b})=>(registerDiagram(p,b,void 0),new Diagram(i,c))))}return new Diagram(i,c)},qp=Diagram;const Vp=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],Gp="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Xp="sandbox",Zp="loose",Kp="http://www.w3.org/1999/xlink",Qp="http://www.w3.org/1999/xhtml",Jp=["foreignobject"],tf=["dominant-baseline"];const encodeEntities=function(i){let c=i;return c=c.replace(/style.*:\S*#.*;/g,(function(i){return i.substring(0,i.length-1)})),c=c.replace(/classDef.*:\S*#.*;/g,(function(i){return i.substring(0,i.length-1)})),c=c.replace(/#\w+;/g,(function(i){const c=i.substring(1,i.length-1);return/^\+?\d+$/.test(c)?"fl°°"+c+"¶ß":"fl°"+c+"¶ß"})),c},decodeEntities=function(i){let c=i;return c=c.replace(/fl°°/g,""),c=c.replace(/fl°/g,"&"),c=c.replace(/¶ß/g,";"),c},cssImportantStyles=(i,c,p=[])=>`\n.${i} ${c} { ${p.join(" !important; ")} !important; }`,createUserStyles=(i,c,p,b)=>{const _=((i,c,p={})=>{var b;let _="";if(void 0!==i.themeCSS&&(_+=`\n${i.themeCSS}`),void 0!==i.fontFamily&&(_+=`\n:root { --mermaid-font-family: ${i.fontFamily}}`),void 0!==i.altFontFamily&&(_+=`\n:root { --mermaid-alt-font-family: ${i.altFontFamily}}`),!isEmpty(p)&&Vp.includes(c)){const c=["> *","span"],k=["rect","polygon","ellipse","circle","path"],w=i.htmlLabels||(null==(b=i.flowchart)?void 0:b.htmlLabels)?c:k;for(const i in p){const c=p[i];isEmpty(c.styles)||w.forEach((i=>{_+=cssImportantStyles(c.id,i,c.styles)})),isEmpty(c.textStyles)||(_+=cssImportantStyles(c.id,"tspan",c.textStyles))}}return _})(i,c,p);return serialize(compile(`${b}{${getStyles$2(c,_,i.themeVariables)}}`),stringify)},cleanUpSvgCode=(i="",c,p)=>{let b=i;return p||c||(b=b.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),b=decodeEntities(b),b=b.replace(/ /g," "),b},putIntoIFrame=(i="",c)=>`