congo/assets/lib/mermaid/mermaid.min.js

1285 lines
878 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(function(ln,Wr){typeof exports=="object"&&typeof module<"u"?module.exports=Wr():typeof define=="function"&&define.amd?define(Wr):(ln=typeof globalThis<"u"?globalThis:ln||self,ln.mermaid=Wr())})(this,function(){"use strict";var XY=Object.defineProperty;var KY=(ln,Wr,Bi)=>Wr in ln?XY(ln,Wr,{enumerable:!0,configurable:!0,writable:!0,value:Bi}):ln[Wr]=Bi;var za=(ln,Wr,Bi)=>(KY(ln,typeof Wr!="symbol"?Wr+"":Wr,Bi),Bi);var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wr(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Bi={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ln,function(){var r;function n(){return r.apply(null,arguments)}function i(h){return h instanceof Array||Object.prototype.toString.call(h)==="[object Array]"}function s(h){return h!=null&&Object.prototype.toString.call(h)==="[object Object]"}function a(h,y){return Object.prototype.hasOwnProperty.call(h,y)}function o(h){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(h).length===0;for(var y in h)if(a(h,y))return;return 1}function l(h){return h===void 0}function u(h){return typeof h=="number"||Object.prototype.toString.call(h)==="[object Number]"}function d(h){return h instanceof Date||Object.prototype.toString.call(h)==="[object Date]"}function f(h,y){for(var _=[],S=h.length,R=0;R<S;++R)_.push(y(h[R],R));return _}function p(h,y){for(var _ in y)a(y,_)&&(h[_]=y[_]);return a(y,"toString")&&(h.toString=y.toString),a(y,"valueOf")&&(h.valueOf=y.valueOf),h}function g(h,y,_,S){return xr(h,y,_,S,!0).utc()}function b(h){return h._pf==null&&(h._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),h._pf}function k(h){if(h._isValid==null){var y=b(h),_=L.call(y.parsedDateParts,function(S){return S!=null}),_=!isNaN(h._d.getTime())&&y.overflow<0&&!y.empty&&!y.invalidEra&&!y.invalidMonth&&!y.invalidWeekday&&!y.weekdayMismatch&&!y.nullInput&&!y.invalidFormat&&!y.userInvalidated&&(!y.meridiem||y.meridiem&&_);if(h._strict&&(_=_&&y.charsLeftOver===0&&y.unusedTokens.length===0&&y.bigHour===void 0),Object.isFrozen!=null&&Object.isFrozen(h))return _;h._isValid=_}return h._isValid}function T(h){var y=g(NaN);return h!=null?p(b(y),h):b(y).userInvalidated=!0,y}var L=Array.prototype.some||function(h){for(var y=Object(this),_=y.length>>>0,S=0;S<_;S++)if(S in y&&h.call(this,y[S],S,y))return!0;return!1},E=n.momentProperties=[],I=!1;function V(h,y){var _,S,R,it=E.length;if(l(y._isAMomentObject)||(h._isAMomentObject=y._isAMomentObject),l(y._i)||(h._i=y._i),l(y._f)||(h._f=y._f),l(y._l)||(h._l=y._l),l(y._strict)||(h._strict=y._strict),l(y._tzm)||(h._tzm=y._tzm),l(y._isUTC)||(h._isUTC=y._isUTC),l(y._offset)||(h._offset=y._offset),l(y._pf)||(h._pf=b(y)),l(y._locale)||(h._locale=y._locale),0<it)for(_=0;_<it;_++)l(R=y[S=E[_]])||(h[S]=R);return h}function H(h){V(this,h),this._d=new Date(h._d!=null?h._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),I===!1&&(I=!0,n.updateOffset(this),I=!1)}function G(h){return h instanceof H||h!=null&&h._isAMomentObject!=null}function Y(h){n.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+h)}function W(h,y){var _=!0;return p(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,h),_){for(var S,R,it=[],mt=arguments.length,Ct=0;Ct<mt;Ct++){if(S="",typeof arguments[Ct]=="object"){for(R in S+=`
[`+Ct+"] ",arguments[0])a(arguments[0],R)&&(S+=R+": "+arguments[0][R]+", ");S=S.slice(0,-2)}else S=arguments[Ct];it.push(S)}Y(h+`
Arguments: `+Array.prototype.slice.call(it).join("")+`
`+new Error().stack),_=!1}return y.apply(this,arguments)},y)}var N={};function D(h,y){n.deprecationHandler!=null&&n.deprecationHandler(h,y),N[h]||(Y(y),N[h]=!0)}function w(h){return typeof Function<"u"&&h instanceof Function||Object.prototype.toString.call(h)==="[object Function]"}function v(h,y){var _,S=p({},h);for(_ in y)a(y,_)&&(s(h[_])&&s(y[_])?(S[_]={},p(S[_],h[_]),p(S[_],y[_])):y[_]!=null?S[_]=y[_]:delete S[_]);for(_ in h)a(h,_)&&!a(y,_)&&s(h[_])&&(S[_]=p({},S[_]));return S}function M(h){h!=null&&this.set(h)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var m=Object.keys||function(h){var y,_=[];for(y in h)a(h,y)&&_.push(y);return _};function Q(h,y,_){var S=""+Math.abs(h);return(0<=h?_?"+":"":"-")+Math.pow(10,Math.max(0,y-S.length)).toString().substr(1)+S}var x=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ct=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Dt={},kt={};function j(h,y,_,S){var R=typeof S=="string"?function(){return this[S]()}:S;h&&(kt[h]=R),y&&(kt[y[0]]=function(){return Q(R.apply(this,arguments),y[1],y[2])}),_&&(kt[_]=function(){return this.localeData().ordinal(R.apply(this,arguments),h)})}function ot(h,y){return h.isValid()?(y=rt(y,h.localeData()),Dt[y]=Dt[y]||function(_){for(var S,R=_.match(x),it=0,mt=R.length;it<mt;it++)kt[R[it]]?R[it]=kt[R[it]]:R[it]=(S=R[it]).match(/\[[\s\S]/)?S.replace(/^\[|\]$/g,""):S.replace(/\\/g,"");return function(Ct){for(var Pt="",It=0;It<mt;It++)Pt+=w(R[It])?R[It].call(Ct,_):R[It];return Pt}}(y),Dt[y](h)):h.localeData().invalidDate()}function rt(h,y){var _=5;function S(R){return y.longDateFormat(R)||R}for(ct.lastIndex=0;0<=_&&ct.test(h);)h=h.replace(ct,S),ct.lastIndex=0,--_;return h}var nt={};function ut(h,y){var _=h.toLowerCase();nt[_]=nt[_+"s"]=nt[y]=h}function _t(h){return typeof h=="string"?nt[h]||nt[h.toLowerCase()]:void 0}function K(h){var y,_,S={};for(_ in h)a(h,_)&&(y=_t(_))&&(S[y]=h[_]);return S}var Ot={};function P(h,y){Ot[h]=y}function z(h){return h%4==0&&h%100!=0||h%400==0}function X(h){return h<0?Math.ceil(h)||0:Math.floor(h)}function F(y){var y=+y,_=0;return _=y!=0&&isFinite(y)?X(y):_}function O(h,y){return function(_){return _!=null?(J(this,h,_),n.updateOffset(this,y),this):A(this,h)}}function A(h,y){return h.isValid()?h._d["get"+(h._isUTC?"UTC":"")+y]():NaN}function J(h,y,_){h.isValid()&&!isNaN(_)&&(y==="FullYear"&&z(h.year())&&h.month()===1&&h.date()===29?(_=F(_),h._d["set"+(h._isUTC?"UTC":"")+y](_,h.month(),dt(_,h.month()))):h._d["set"+(h._isUTC?"UTC":"")+y](_))}var C=/\d/,ce=/\d\d/,ht=/\d{3}/,Ps=/\d{4}/,Ji=/[+-]?\d{6}/,U=/\d\d?/,Yt=/\d\d\d\d?/,et=/\d\d\d\d\d\d?/,Mt=/\d{1,3}/,ts=/\d{1,4}/,Qi=/[+-]?\d{1,6}/,Tt=/\d+/,gt=/[+-]?\d+/,Et=/Z|[+-]\d\d:?\d\d/gi,wt=/Z|[+-]\d\d(?::?\d\d)?/gi,pt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function st(h,y,_){jt[h]=w(y)?y:function(S,R){return S&&_?_:y}}function le(h,y){return a(jt,h)?jt[h](y._strict,y._locale):new RegExp(Xt(h.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(_,S,R,it,mt){return S||R||it||mt})))}function Xt(h){return h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var jt={},Kt={};function Gt(h,y){var _,S,R=y;for(typeof h=="string"&&(h=[h]),u(y)&&(R=function(it,mt){mt[y]=F(it)}),S=h.length,_=0;_<S;_++)Kt[h[_]]=R}function Ee(h,y){Gt(h,function(_,S,R,it){R._w=R._w||{},y(_,R._w,R,it)})}var Ht,Vt=0,Ft=1,xt=2,ft=3,Lt=4,bt=5,Ut=6,at=7,ie=8;function dt(h,y){if(isNaN(h)||isNaN(y))return NaN;var _=(y%(_=12)+_)%_;return h+=(y-_)/12,_==1?z(h)?29:28:31-_%7%2}Ht=Array.prototype.indexOf||function(h){for(var y=0;y<this.length;++y)if(this[y]===h)return y;return-1},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(h){return this.localeData().monthsShort(this,h)}),j("MMMM",0,0,function(h){return this.localeData().months(this,h)}),ut("month","M"),P("month",8),st("M",U),st("MM",U,ce),st("MMM",function(h,y){return y.monthsShortRegex(h)}),st("MMMM",function(h,y){return y.monthsRegex(h)}),Gt(["M","MM"],function(h,y){y[Ft]=F(h)-1}),Gt(["MMM","MMMM"],function(h,y,_,S){S=_._locale.monthsParse(h,S,_._strict),S!=null?y[Ft]=S:b(_).invalidMonth=h});var ee="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),fe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),be=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,_e=pt,ke=pt;function $t(h,y){var _;if(h.isValid()){if(typeof y=="string"){if(/^\d+$/.test(y))y=F(y);else if(!u(y=h.localeData().monthsParse(y)))return}_=Math.min(h.date(),dt(h.year(),y)),h._d["set"+(h._isUTC?"UTC":"")+"Month"](y,_)}}function se(h){return h!=null?($t(this,h),n.updateOffset(this,!0),this):A(this,"Month")}function ye(){function h(mt,Ct){return Ct.length-mt.length}for(var y,_=[],S=[],R=[],it=0;it<12;it++)y=g([2e3,it]),_.push(this.monthsShort(y,"")),S.push(this.months(y,"")),R.push(this.months(y,"")),R.push(this.monthsShort(y,""));for(_.sort(h),S.sort(h),R.sort(h),it=0;it<12;it++)_[it]=Xt(_[it]),S[it]=Xt(S[it]);for(it=0;it<24;it++)R[it]=Xt(R[it]);this._monthsRegex=new RegExp("^("+R.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+_.join("|")+")","i")}function Jt(h){return z(h)?366:365}j("Y",0,0,function(){var h=this.year();return h<=9999?Q(h,4):"+"+h}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),ut("year","y"),P("year",1),st("Y",gt),st("YY",U,ce),st("YYYY",ts,Ps),st("YYYYY",Qi,Ji),st("YYYYYY",Qi,Ji),Gt(["YYYYY","YYYYYY"],Vt),Gt("YYYY",function(h,y){y[Vt]=h.length===2?n.parseTwoDigitYear(h):F(h)}),Gt("YY",function(h,y){y[Vt]=n.parseTwoDigitYear(h)}),Gt("Y",function(h,y){y[Vt]=parseInt(h,10)}),n.parseTwoDigitYear=function(h){return F(h)+(68<F(h)?1900:2e3)};var Ku=O("FullYear",!0);function Nn(h,y,_,S,R,it,mt){var Ct;return h<100&&0<=h?(Ct=new Date(h+400,y,_,S,R,it,mt),isFinite(Ct.getFullYear())&&Ct.setFullYear(h)):Ct=new Date(h,y,_,S,R,it,mt),Ct}function Xr(h){var y;return h<100&&0<=h?((y=Array.prototype.slice.call(arguments))[0]=h+400,y=new Date(Date.UTC.apply(null,y)),isFinite(y.getUTCFullYear())&&y.setUTCFullYear(h)):y=new Date(Date.UTC.apply(null,arguments)),y}function De(h,y,_){return _=7+y-_,_-(7+Xr(h,0,_).getUTCDay()-y)%7-1}function ae(h,mt,Ct,S,R){var it,mt=1+7*(mt-1)+(7+Ct-S)%7+De(h,S,R),Ct=mt<=0?Jt(it=h-1)+mt:mt>Jt(h)?(it=h+1,mt-Jt(h)):(it=h,mt);return{year:it,dayOfYear:Ct}}function Be(h,y,_){var S,R,it=De(h.year(),y,_),it=Math.floor((h.dayOfYear()-it-1)/7)+1;return it<1?S=it+Re(R=h.year()-1,y,_):it>Re(h.year(),y,_)?(S=it-Re(h.year(),y,_),R=h.year()+1):(R=h.year(),S=it),{week:S,year:R}}function Re(h,R,_){var S=De(h,R,_),R=De(h+1,R,_);return(Jt(h)-S+R)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ut("week","w"),ut("isoWeek","W"),P("week",5),P("isoWeek",5),st("w",U),st("ww",U,ce),st("W",U),st("WW",U,ce),Ee(["w","ww","W","WW"],function(h,y,_,S){y[S.substr(0,1)]=F(h)});function Pe(h,y){return h.slice(y,7).concat(h.slice(0,y))}j("d",0,"do","day"),j("dd",0,0,function(h){return this.localeData().weekdaysMin(this,h)}),j("ddd",0,0,function(h){return this.localeData().weekdaysShort(this,h)}),j("dddd",0,0,function(h){return this.localeData().weekdays(this,h)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ut("day","d"),ut("weekday","e"),ut("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),st("d",U),st("e",U),st("E",U),st("dd",function(h,y){return y.weekdaysMinRegex(h)}),st("ddd",function(h,y){return y.weekdaysShortRegex(h)}),st("dddd",function(h,y){return y.weekdaysRegex(h)}),Ee(["dd","ddd","dddd"],function(h,y,_,S){S=_._locale.weekdaysParse(h,S,_._strict),S!=null?y.d=S:b(_).invalidWeekday=h}),Ee(["d","e","E"],function(h,y,_,S){y[S]=F(h)});var Ye="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ar=pt,zt=pt,Z=pt;function At(){function h(It,ue){return ue.length-It.length}for(var y,_,S,R=[],it=[],mt=[],Ct=[],Pt=0;Pt<7;Pt++)S=g([2e3,1]).day(Pt),y=Xt(this.weekdaysMin(S,"")),_=Xt(this.weekdaysShort(S,"")),S=Xt(this.weekdays(S,"")),R.push(y),it.push(_),mt.push(S),Ct.push(y),Ct.push(_),Ct.push(S);R.sort(h),it.sort(h),mt.sort(h),Ct.sort(h),this._weekdaysRegex=new RegExp("^("+Ct.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+mt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+it.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+R.join("|")+")","i")}function Nt(){return this.hours()%12||12}function pe(h,y){j(h,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),y)})}function Me(h,y){return y._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Nt),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)}),j("hmmss",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),pe("a",!0),pe("A",!1),ut("hour","h"),P("hour",13),st("a",Me),st("A",Me),st("H",U),st("h",U),st("k",U),st("HH",U,ce),st("hh",U,ce),st("kk",U,ce),st("hmm",Yt),st("hmmss",et),st("Hmm",Yt),st("Hmmss",et),Gt(["H","HH"],ft),Gt(["k","kk"],function(h,y,_){h=F(h),y[ft]=h===24?0:h}),Gt(["a","A"],function(h,y,_){_._isPm=_._locale.isPM(h),_._meridiem=h}),Gt(["h","hh"],function(h,y,_){y[ft]=F(h),b(_).bigHour=!0}),Gt("hmm",function(h,y,_){var S=h.length-2;y[ft]=F(h.substr(0,S)),y[Lt]=F(h.substr(S)),b(_).bigHour=!0}),Gt("hmmss",function(h,y,_){var S=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,S)),y[Lt]=F(h.substr(S,2)),y[bt]=F(h.substr(R)),b(_).bigHour=!0}),Gt("Hmm",function(h,y,_){var S=h.length-2;y[ft]=F(h.substr(0,S)),y[Lt]=F(h.substr(S))}),Gt("Hmmss",function(h,y,_){var S=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,S)),y[Lt]=F(h.substr(S,2)),y[bt]=F(h.substr(R))}),pt=O("Hours",!0);var Le,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:ee,monthsShort:fe,week:{dow:0,doy:6},weekdays:Ye,weekdaysMin:$e,weekdaysShort:Ie,meridiemParse:/[ap]\.?m?\.?/i},ve={},Ne={};function Xi(h){return h&&h.toLowerCase().replace("_","-")}function Ki(h){for(var y,_,S,R,it=0;it<h.length;){for(y=(R=Xi(h[it]).split("-")).length,_=(_=Xi(h[it+1]))?_.split("-"):null;0<y;){if(S=zr(R.slice(0,y).join("-")))return S;if(_&&_.length>=y&&function(mt,Ct){for(var Pt=Math.min(mt.length,Ct.length),It=0;It<Pt;It+=1)if(mt[It]!==Ct[It])return It;return Pt}(R,_)>=y-1)break;y--}it++}return Le}function zr(h){var y;if(ve[h]===void 0&&!0&&t&&t.exports&&h.match("^[^/\\\\]*$")!=null)try{y=Le._abbr,Wr("./locale/"+h),qt(y)}catch{ve[h]=null}return ve[h]}function qt(h,y){return h&&((y=l(y)?oe(h):te(h,y))?Le=y:typeof console<"u"&&console.warn&&console.warn("Locale "+h+" not found. Did you forget to load it?")),Le._abbr}function te(h,y){if(y===null)return delete ve[h],null;var _,S=We;if(y.abbr=h,ve[h]!=null)D("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."),S=ve[h]._config;else if(y.parentLocale!=null)if(ve[y.parentLocale]!=null)S=ve[y.parentLocale]._config;else{if((_=zr(y.parentLocale))==null)return Ne[y.parentLocale]||(Ne[y.parentLocale]=[]),Ne[y.parentLocale].push({name:h,config:y}),null;S=_._config}return ve[h]=new M(v(S,y)),Ne[h]&&Ne[h].forEach(function(R){te(R.name,R.config)}),qt(h),ve[h]}function oe(h){var y;if(!(h=h&&h._locale&&h._locale._abbr?h._locale._abbr:h))return Le;if(!i(h)){if(y=zr(h))return y;h=[h]}return Ki(h)}function Rt(h){var y=h._a;return y&&b(h).overflow===-2&&(y=y[Ft]<0||11<y[Ft]?Ft:y[xt]<1||y[xt]>dt(y[Vt],y[Ft])?xt:y[ft]<0||24<y[ft]||y[ft]===24&&(y[Lt]!==0||y[bt]!==0||y[Ut]!==0)?ft:y[Lt]<0||59<y[Lt]?Lt:y[bt]<0||59<y[bt]?bt:y[Ut]<0||999<y[Ut]?Ut:-1,b(h)._overflowDayOfYear&&(y<Vt||xt<y)&&(y=xt),b(h)._overflowWeeks&&y===-1&&(y=at),b(h)._overflowWeekday&&y===-1&&(y=ie),b(h).overflow=y),h}var Ve=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,q=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Is=/Z|[+-]\d\d(?::?\d\d)?/,tt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Sr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Wu=/^\/?Date\((-?\d+)/i,Rd=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Hu={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Gu(h){var y,_,S,R,it,mt,Pt=h._i,Ct=Ve.exec(Pt)||q.exec(Pt),Pt=tt.length,It=Sr.length;if(Ct){for(b(h).iso=!0,y=0,_=Pt;y<_;y++)if(tt[y][1].exec(Ct[1])){R=tt[y][0],S=tt[y][2]!==!1;break}if(R==null)h._isValid=!1;else{if(Ct[3]){for(y=0,_=It;y<_;y++)if(Sr[y][1].exec(Ct[3])){it=(Ct[2]||" ")+Sr[y][0];break}if(it==null)return void(h._isValid=!1)}if(S||it==null){if(Ct[4]){if(!Is.exec(Ct[4]))return void(h._isValid=!1);mt="Z"}h._f=R+(it||"")+(mt||""),ll(h)}else h._isValid=!1}}else h._isValid=!1}function or(h,y,_,S,R,it){return h=[function(mt){mt=parseInt(mt,10);{if(mt<=49)return 2e3+mt;if(mt<=999)return 1900+mt}return mt}(h),fe.indexOf(y),parseInt(_,10),parseInt(S,10),parseInt(R,10)],it&&h.push(parseInt(it,10)),h}function Zn(h){var y,_,S,R,it=Rd.exec(h._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));it?(y=or(it[4],it[3],it[2],it[5],it[6],it[7]),_=it[1],S=y,R=h,_&&Ie.indexOf(_)!==new Date(S[0],S[1],S[2]).getDay()?(b(R).weekdayMismatch=!0,R._isValid=!1):(h._a=y,h._tzm=(_=it[8],S=it[9],R=it[10],_?Hu[_]:S?0:60*(((_=parseInt(R,10))-(S=_%100))/100)+S),h._d=Xr.apply(null,h._a),h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),b(h).rfc2822=!0)):h._isValid=!1}function Qn(h,y,_){return h!=null?h:y!=null?y:_}function Os(h){var y,_,S,R,it,mt,Ct,Pt,It,ue,re,He=[];if(!h._d){for(S=h,R=new Date(n.now()),_=S._useUTC?[R.getUTCFullYear(),R.getUTCMonth(),R.getUTCDate()]:[R.getFullYear(),R.getMonth(),R.getDate()],h._w&&h._a[xt]==null&&h._a[Ft]==null&&((R=(S=h)._w).GG!=null||R.W!=null||R.E!=null?(Pt=1,It=4,it=Qn(R.GG,S._a[Vt],Be(Se(),1,4).year),mt=Qn(R.W,1),((Ct=Qn(R.E,1))<1||7<Ct)&&(ue=!0)):(Pt=S._locale._week.dow,It=S._locale._week.doy,re=Be(Se(),Pt,It),it=Qn(R.gg,S._a[Vt],re.year),mt=Qn(R.w,re.week),R.d!=null?((Ct=R.d)<0||6<Ct)&&(ue=!0):R.e!=null?(Ct=R.e+Pt,(R.e<0||6<R.e)&&(ue=!0)):Ct=Pt),mt<1||mt>Re(it,Pt,It)?b(S)._overflowWeeks=!0:ue!=null?b(S)._overflowWeekday=!0:(re=ae(it,mt,Ct,Pt,It),S._a[Vt]=re.year,S._dayOfYear=re.dayOfYear)),h._dayOfYear!=null&&(R=Qn(h._a[Vt],_[Vt]),(h._dayOfYear>Jt(R)||h._dayOfYear===0)&&(b(h)._overflowDayOfYear=!0),ue=Xr(R,0,h._dayOfYear),h._a[Ft]=ue.getUTCMonth(),h._a[xt]=ue.getUTCDate()),y=0;y<3&&h._a[y]==null;++y)h._a[y]=He[y]=_[y];for(;y<7;y++)h._a[y]=He[y]=h._a[y]==null?y===2?1:0:h._a[y];h._a[ft]===24&&h._a[Lt]===0&&h._a[bt]===0&&h._a[Ut]===0&&(h._nextDay=!0,h._a[ft]=0),h._d=(h._useUTC?Xr:Nn).apply(null,He),it=h._useUTC?h._d.getUTCDay():h._d.getDay(),h._tzm!=null&&h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),h._nextDay&&(h._a[ft]=24),h._w&&h._w.d!==void 0&&h._w.d!==it&&(b(h).weekdayMismatch=!0)}}function ll(h){if(h._f===n.ISO_8601)Gu(h);else if(h._f===n.RFC_2822)Zn(h);else{h._a=[],b(h).empty=!0;for(var y,_,S,R,it,mt=""+h._i,Ct=mt.length,Pt=0,It=rt(h._f,h._locale).match(x)||[],ue=It.length,re=0;re<ue;re++)_=It[re],(y=(mt.match(le(_,h))||[])[0])&&(0<(S=mt.substr(0,mt.indexOf(y))).length&&b(h).unusedInput.push(S),mt=mt.slice(mt.indexOf(y)+y.length),Pt+=y.length),kt[_]?(y?b(h).empty=!1:b(h).unusedTokens.push(_),S=_,it=h,(R=y)!=null&&a(Kt,S)&&Kt[S](R,it._a,it,S)):h._strict&&!y&&b(h).unusedTokens.push(_);b(h).charsLeftOver=Ct-Pt,0<mt.length&&b(h).unusedInput.push(mt),h._a[ft]<=12&&b(h).bigHour===!0&&0<h._a[ft]&&(b(h).bigHour=void 0),b(h).parsedDateParts=h._a.slice(0),b(h).meridiem=h._meridiem,h._a[ft]=function(He,lr,On){return On==null?lr:He.meridiemHour!=null?He.meridiemHour(lr,On):He.isPM!=null?((He=He.isPM(On))&&lr<12&&(lr+=12),lr=He||lr!==12?lr:0):lr}(h._locale,h._a[ft],h._meridiem),(Ct=b(h).era)!==null&&(h._a[Vt]=h._locale.erasConvertYear(Ct,h._a[Vt])),Os(h),Rt(h)}}function qu(h){var y,_,S,R=h._i,it=h._f;return h._locale=h._locale||oe(h._l),R===null||it===void 0&&R===""?T({nullInput:!0}):(typeof R=="string"&&(h._i=R=h._locale.preparse(R)),G(R)?new H(Rt(R)):(d(R)?h._d=R:i(it)?function(mt){var Ct,Pt,It,ue,re,He,lr=!1,On=mt._f.length;if(On===0)return b(mt).invalidFormat=!0,mt._d=new Date(NaN);for(ue=0;ue<On;ue++)re=0,He=!1,Ct=V({},mt),mt._useUTC!=null&&(Ct._useUTC=mt._useUTC),Ct._f=mt._f[ue],ll(Ct),k(Ct)&&(He=!0),re=(re+=b(Ct).charsLeftOver)+10*b(Ct).unusedTokens.length,b(Ct).score=re,lr?re<It&&(It=re,Pt=Ct):(It==null||re<It||He)&&(It=re,Pt=Ct,He&&(lr=!0));p(mt,Pt||Ct)}(h):it?ll(h):l(it=(R=h)._i)?R._d=new Date(n.now()):d(it)?R._d=new Date(it.valueOf()):typeof it=="string"?(_=R,(y=Wu.exec(_._i))!==null?_._d=new Date(+y[1]):(Gu(_),_._isValid===!1&&(delete _._isValid,Zn(_),_._isValid===!1&&(delete _._isValid,_._strict?_._isValid=!1:n.createFromInputFallback(_))))):i(it)?(R._a=f(it.slice(0),function(mt){return parseInt(mt,10)}),Os(R)):s(it)?(y=R)._d||(S=(_=K(y._i)).day===void 0?_.date:_.day,y._a=f([_.year,_.month,S,_.hour,_.minute,_.second,_.millisecond],function(mt){return mt&&parseInt(mt,10)}),Os(y)):u(it)?R._d=new Date(it):n.createFromInputFallback(R),k(h)||(h._d=null),h))}function xr(h,y,_,S,R){var it={};return y!==!0&&y!==!1||(S=y,y=void 0),_!==!0&&_!==!1||(S=_,_=void 0),(s(h)&&o(h)||i(h)&&h.length===0)&&(h=void 0),it._isAMomentObject=!0,it._useUTC=it._isUTC=R,it._l=_,it._i=h,it._f=y,it._strict=S,(R=new H(Rt(qu(R=it))))._nextDay&&(R.add(1,"d"),R._nextDay=void 0),R}function Se(h,y,_,S){return xr(h,y,_,S,!1)}n.createFromInputFallback=W("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(h){h._d=new Date(h._i+(h._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){},Yt=W("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?h<this?this:h:T()}),et=W("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?this<h?this:h:T()});function Or(h,y){var _,S;if(!(y=y.length===1&&i(y[0])?y[0]:y).length)return Se();for(_=y[0],S=1;S<y.length;++S)y[S].isValid()&&!y[S][h](_)||(_=y[S]);return _}var Ai=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Bn(y){var y=K(y),_=y.year||0,S=y.quarter||0,R=y.month||0,it=y.week||y.isoWeek||0,mt=y.day||0,Ct=y.hour||0,Pt=y.minute||0,It=y.second||0,ue=y.millisecond||0;this._isValid=function(re){var He,lr,On=!1,Wd=Ai.length;for(He in re)if(a(re,He)&&(Ht.call(Ai,He)===-1||re[He]!=null&&isNaN(re[He])))return!1;for(lr=0;lr<Wd;++lr)if(re[Ai[lr]]){if(On)return!1;parseFloat(re[Ai[lr]])!==F(re[Ai[lr]])&&(On=!0)}return!0}(y),this._milliseconds=+ue+1e3*It+6e4*Pt+1e3*Ct*60*60,this._days=+mt+7*it,this._months=+R+3*S+12*_,this._data={},this._locale=oe(),this._bubble()}function Li(h){return h instanceof Bn}function Kr(h){return h<0?-1*Math.round(-1*h):Math.round(h)}function cl(h,y){j(h,0,0,function(){var _=this.utcOffset(),S="+";return _<0&&(_=-_,S="-"),S+Q(~~(_/60),2)+y+Q(~~_%60,2)})}cl("Z",":"),cl("ZZ",""),st("Z",wt),st("ZZ",wt),Gt(["Z","ZZ"],function(h,y,_){_._useUTC=!0,_._tzm=Rs(wt,h)});var Pa=/([\+\-]|\d\d)/gi;function Rs(h,_){var _=(_||"").match(h);return _===null?null:(_=60*(h=((_[_.length-1]||[])+"").match(Pa)||["-",0,0])[1]+F(h[2]))===0?0:h[0]==="+"?_:-_}function Zr(h,y){var _;return y._isUTC?(y=y.clone(),_=(G(h)||d(h)?h:Se(h)).valueOf()-y.valueOf(),y._d.setTime(y._d.valueOf()+_),n.updateOffset(y,!1),y):Se(h).local()}function Fd(h){return-Math.round(h._d.getTimezoneOffset())}function cb(){return!!this.isValid()&&this._isUTC&&this._offset===0}n.updateOffset=function(){};var UY=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zY=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function In(h,y){var _,S=h,R=null;return Li(h)?S={ms:h._milliseconds,d:h._days,M:h._months}:u(h)||!isNaN(+h)?(S={},y?S[y]=+h:S.milliseconds=+h):(R=UY.exec(h))?(_=R[1]==="-"?-1:1,S={y:0,d:F(R[xt])*_,h:F(R[ft])*_,m:F(R[Lt])*_,s:F(R[bt])*_,ms:F(Kr(1e3*R[Ut]))*_}):(R=zY.exec(h))?(_=R[1]==="-"?-1:1,S={y:Fs(R[2],_),M:Fs(R[3],_),w:Fs(R[4],_),d:Fs(R[5],_),h:Fs(R[6],_),m:Fs(R[7],_),s:Fs(R[8],_)}):S==null?S={}:typeof S=="object"&&("from"in S||"to"in S)&&(y=function(it,mt){var Ct;return!it.isValid()||!mt.isValid()?{milliseconds:0,months:0}:(mt=Zr(mt,it),it.isBefore(mt)?Ct=ub(it,mt):((Ct=ub(mt,it)).milliseconds=-Ct.milliseconds,Ct.months=-Ct.months),Ct)}(Se(S.from),Se(S.to)),(S={}).ms=y.milliseconds,S.M=y.months),R=new Bn(S),Li(h)&&a(h,"_locale")&&(R._locale=h._locale),Li(h)&&a(h,"_isValid")&&(R._isValid=h._isValid),R}function Fs(h,y){return h=h&&parseFloat(h.replace(",",".")),(isNaN(h)?0:h)*y}function ub(h,y){var _={};return _.months=y.month()-h.month()+12*(y.year()-h.year()),h.clone().add(_.months,"M").isAfter(y)&&--_.months,_.milliseconds=+y-+h.clone().add(_.months,"M"),_}function hb(h,y){return function(_,S){var R;return S===null||isNaN(+S)||(D(y,"moment()."+y+"(period, number) is deprecated. Please use moment()."+y+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),R=_,_=S,S=R),db(this,In(_,S),h),this}}function db(h,mt,_,S){var R=mt._milliseconds,it=Kr(mt._days),mt=Kr(mt._months);h.isValid()&&(S=S==null||S,mt&&$t(h,A(h,"Month")+mt*_),it&&J(h,"Date",A(h,"Date")+it*_),R&&h._d.setTime(h._d.valueOf()+R*_),S&&n.updateOffset(h,it||mt))}In.fn=Bn.prototype,In.invalid=function(){return In(NaN)},ee=hb(1,"add"),Ye=hb(-1,"subtract");function fb(h){return typeof h=="string"||h instanceof String}function WY(h){return G(h)||d(h)||fb(h)||u(h)||function(y){var _=i(y),S=!1;return _&&(S=y.filter(function(R){return!u(R)&&fb(y)}).length===0),_&&S}(h)||function(y){var _,S,R=s(y)&&!o(y),it=!1,mt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Ct=mt.length;for(_=0;_<Ct;_+=1)S=mt[_],it=it||a(y,S);return R&&it}(h)||h==null}function ju(h,R){if(h.date()<R.date())return-ju(R,h);var _=12*(R.year()-h.year())+(R.month()-h.month()),S=h.clone().add(_,"months"),R=R-S<0?(R-S)/(S-h.clone().add(_-1,"months")):(R-S)/(h.clone().add(1+_,"months")-S);return-(_+R)||0}function pb(h){return h===void 0?this._locale._abbr:((h=oe(h))!=null&&(this._locale=h),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",$e=W("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(h){return h===void 0?this.localeData():this.locale(h)});function gb(){return this._locale}var yb=126227808e5;function Ya(h,y){return(h%y+y)%y}function mb(h,y,_){return h<100&&0<=h?new Date(h+400,y,_)-yb:new Date(h,y,_).valueOf()}function bb(h,y,_){return h<100&&0<=h?Date.UTC(h+400,y,_)-yb:Date.UTC(h,y,_)}function Pd(h,y){return y.erasAbbrRegex(h)}function Yd(){for(var h=[],y=[],_=[],S=[],R=this.eras(),it=0,mt=R.length;it<mt;++it)y.push(Xt(R[it].name)),h.push(Xt(R[it].abbr)),_.push(Xt(R[it].narrow)),S.push(Xt(R[it].name)),S.push(Xt(R[it].abbr)),S.push(Xt(R[it].narrow));this._erasRegex=new RegExp("^("+S.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+y.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+_.join("|")+")","i")}function $u(h,y){j(0,[h,h.length],0,y)}function _b(h,y,_,S,R){var it;return h==null?Be(this,S,R).year:(it=Re(h,S,R),function(mt,Ct,Pt,It,ue){return mt=ae(mt,Ct,Pt,It,ue),Ct=Xr(mt.year,0,mt.dayOfYear),this.year(Ct.getUTCFullYear()),this.month(Ct.getUTCMonth()),this.date(Ct.getUTCDate()),this}.call(this,h,y=it<y?it:y,_,S,R))}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),st("N",Pd),st("NN",Pd),st("NNN",Pd),st("NNNN",function(h,y){return y.erasNameRegex(h)}),st("NNNNN",function(h,y){return y.erasNarrowRegex(h)}),Gt(["N","NN","NNN","NNNN","NNNNN"],function(h,y,_,S){S=_._locale.erasParse(h,S,_._strict),S?b(_).era=S:b(_).invalidEra=h}),st("y",Tt),st("yy",Tt),st("yyy",Tt),st("yyyy",Tt),st("yo",function(h,y){return y._eraYearOrdinalRegex||Tt}),Gt(["y","yy","yyy","yyyy"],Vt),Gt(["yo"],function(h,y,_,S){var R;_._locale._eraYearOrdinalRegex&&(R=h.match(_._locale._eraYearOrdinalRegex)),_._locale.eraYearOrdinalParse?y[Vt]=_._locale.eraYearOrdinalParse(h,R):y[Vt]=parseInt(h,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),$u("gggg","weekYear"),$u("ggggg","weekYear"),$u("GGGG","isoWeekYear"),$u("GGGGG","isoWeekYear"),ut("weekYear","gg"),ut("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),st("G",gt),st("g",gt),st("GG",U,ce),st("gg",U,ce),st("GGGG",ts,Ps),st("gggg",ts,Ps),st("GGGGG",Qi,Ji),st("ggggg",Qi,Ji),Ee(["gggg","ggggg","GGGG","GGGGG"],function(h,y,_,S){y[S.substr(0,2)]=F(h)}),Ee(["gg","GG"],function(h,y,_,S){y[S]=n.parseTwoDigitYear(h)}),j("Q",0,"Qo","quarter"),ut("quarter","Q"),P("quarter",7),st("Q",C),Gt("Q",function(h,y){y[Ft]=3*(F(h)-1)}),j("D",["DD",2],"Do","date"),ut("date","D"),P("date",9),st("D",U),st("DD",U,ce),st("Do",function(h,y){return h?y._dayOfMonthOrdinalParse||y._ordinalParse:y._dayOfMonthOrdinalParseLenient}),Gt(["D","DD"],xt),Gt("Do",function(h,y){y[xt]=F(h.match(U)[0])}),ts=O("Date",!0),j("DDD",["DDDD",3],"DDDo","dayOfYear"),ut("dayOfYear","DDD"),P("dayOfYear",4),st("DDD",Mt),st("DDDD",ht),Gt(["DDD","DDDD"],function(h,y,_){_._dayOfYear=F(h)}),j("m",["mm",2],0,"minute"),ut("minute","m"),P("minute",14),st("m",U),st("mm",U,ce),Gt(["m","mm"],Lt);var Zi,Ps=O("Minutes",!1),Qi=(j("s",["ss",2],0,"second"),ut("second","s"),P("second",15),st("s",U),st("ss",U,ce),Gt(["s","ss"],bt),O("Seconds",!1));for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),ut("millisecond","ms"),P("millisecond",16),st("S",Mt,C),st("SS",Mt,ce),st("SSS",Mt,ht),Zi="SSSS";Zi.length<=9;Zi+="S")st(Zi,Tt);function HY(h,y){y[Ut]=F(1e3*("0."+h))}for(Zi="S";Zi.length<=9;Zi+="S")Gt(Zi,HY);Ji=O("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName"),C=H.prototype;function xb(h){return h}C.add=ee,C.calendar=function(_,R){arguments.length===1&&(arguments[0]?WY(arguments[0])?(_=arguments[0],R=void 0):function(it){for(var mt=s(it)&&!o(it),Ct=!1,Pt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],It=0;It<Pt.length;It+=1)Ct=Ct||a(it,Pt[It]);return mt&&Ct}(arguments[0])&&(R=arguments[0],_=void 0):R=_=void 0);var _=_||Se(),S=Zr(_,this).startOf("day"),S=n.calendarFormat(this,S)||"sameElse",R=R&&(w(R[S])?R[S].call(this,_):R[S]);return this.format(R||this.localeData().calendar(S,this,Se(_)))},C.clone=function(){return new H(this)},C.diff=function(h,y,_){var S,R,it;if(!this.isValid())return NaN;if(!(S=Zr(h,this)).isValid())return NaN;switch(R=6e4*(S.utcOffset()-this.utcOffset()),y=_t(y)){case"year":it=ju(this,S)/12;break;case"month":it=ju(this,S);break;case"quarter":it=ju(this,S)/3;break;case"second":it=(this-S)/1e3;break;case"minute":it=(this-S)/6e4;break;case"hour":it=(this-S)/36e5;break;case"day":it=(this-S-R)/864e5;break;case"week":it=(this-S-R)/6048e5;break;default:it=this-S}return _?it:X(it)},C.endOf=function(h){var y,_;if((h=_t(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(_=this._isUTC?bb:mb,h){case"year":y=_(this.year()+1,0,1)-1;break;case"quarter":y=_(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":y=_(this.year(),this.month()+1,1)-1;break;case"week":y=_(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":y=_(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":y=_(this.year(),this.month(),this.date()+1)-1;break;case"hour":y=this._d.valueOf(),y+=36e5-Ya(y+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":y=this._d.valueOf(),y+=6e4-Ya(y,6e4)-1;break;case"second":y=this._d.valueOf(),y+=1e3-Ya(y,1e3)-1;break}return this._d.setTime(y),n.updateOffset(this,!0),this},C.format=function(h){return h=h||(this.isUtc()?n.defaultFormatUtc:n.defaultFormat),h=ot(this,h),this.localeData().postformat(h)},C.from=function(h,y){return this.isValid()&&(G(h)&&h.isValid()||Se(h).isValid())?In({to:this,from:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},C.fromNow=function(h){return this.from(Se(),h)},C.to=function(h,y){return this.isValid()&&(G(h)&&h.isValid()||Se(h).isValid())?In({from:this,to:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},C.toNow=function(h){return this.to(Se(),h)},C.get=function(h){return w(this[h=_t(h)])?this[h]():this},C.invalidAt=function(){return b(this).overflow},C.isAfter=function(h,y){return h=G(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=_t(y)||"millisecond")==="millisecond"?this.valueOf()>h.valueOf():h.valueOf()<this.clone().startOf(y).valueOf())},C.isBefore=function(h,y){return h=G(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=_t(y)||"millisecond")==="millisecond"?this.valueOf()<h.valueOf():this.clone().endOf(y).valueOf()<h.valueOf())},C.isBetween=function(h,y,_,S){return h=G(h)?h:Se(h),y=G(y)?y:Se(y),!!(this.isValid()&&h.isValid()&&y.isValid())&&((S=S||"()")[0]==="("?this.isAfter(h,_):!this.isBefore(h,_))&&(S[1]===")"?this.isBefore(y,_):!this.isAfter(y,_))},C.isSame=function(_,y){var _=G(_)?_:Se(_);return!(!this.isValid()||!_.isValid())&&((y=_t(y)||"millisecond")==="millisecond"?this.valueOf()===_.valueOf():(_=_.valueOf(),this.clone().startOf(y).valueOf()<=_&&_<=this.clone().endOf(y).valueOf()))},C.isSameOrAfter=function(h,y){return this.isSame(h,y)||this.isAfter(h,y)},C.isSameOrBefore=function(h,y){return this.isSame(h,y)||this.isBefore(h,y)},C.isValid=function(){return k(this)},C.lang=$e,C.locale=pb,C.localeData=gb,C.max=et,C.min=Yt,C.parsingFlags=function(){return p({},b(this))},C.set=function(h,y){if(typeof h=="object")for(var _=function(it){var mt,Ct=[];for(mt in it)a(it,mt)&&Ct.push({unit:mt,priority:Ot[mt]});return Ct.sort(function(Pt,It){return Pt.priority-It.priority}),Ct}(h=K(h)),S=_.length,R=0;R<S;R++)this[_[R].unit](h[_[R].unit]);else if(w(this[h=_t(h)]))return this[h](y);return this},C.startOf=function(h){var y,_;if((h=_t(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(_=this._isUTC?bb:mb,h){case"year":y=_(this.year(),0,1);break;case"quarter":y=_(this.year(),this.month()-this.month()%3,1);break;case"month":y=_(this.year(),this.month(),1);break;case"week":y=_(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":y=_(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":y=_(this.year(),this.month(),this.date());break;case"hour":y=this._d.valueOf(),y-=Ya(y+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":y=this._d.valueOf(),y-=Ya(y,6e4);break;case"second":y=this._d.valueOf(),y-=Ya(y,1e3);break}return this._d.setTime(y),n.updateOffset(this,!0),this},C.subtract=Ye,C.toArray=function(){var h=this;return[h.year(),h.month(),h.date(),h.hour(),h.minute(),h.second(),h.millisecond()]},C.toObject=function(){var h=this;return{years:h.year(),months:h.month(),date:h.date(),hours:h.hours(),minutes:h.minutes(),seconds:h.seconds(),milliseconds:h.milliseconds()}},C.toDate=function(){return new Date(this.valueOf())},C.toISOString=function(h){if(!this.isValid())return null;var y=(h=h!==!0)?this.clone().utc():this;return y.year()<0||9999<y.year()?ot(y,h?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):w(Date.prototype.toISOString)?h?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ot(y,"Z")):ot(y,h?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},C.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var h,y="moment",_="";return this.isLocal()||(y=this.utcOffset()===0?"moment.utc":"moment.parseZone",_="Z"),y="["+y+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(y+h+"-MM-DD[T]HH:mm:ss.SSS"+(_+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(C[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},C.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},C.eraName=function(){for(var h,y=this.localeData().eras(),_=0,S=y.length;_<S;++_)if(h=this.clone().startOf("day").valueOf(),y[_].since<=h&&h<=y[_].until||y[_].until<=h&&h<=y[_].since)return y[_].name;return""},C.eraNarrow=function(){for(var h,y=this.localeData().eras(),_=0,S=y.length;_<S;++_)if(h=this.clone().startOf("day").valueOf(),y[_].since<=h&&h<=y[_].until||y[_].until<=h&&h<=y[_].since)return y[_].narrow;return""},C.eraAbbr=function(){for(var h,y=this.localeData().eras(),_=0,S=y.length;_<S;++_)if(h=this.clone().startOf("day").valueOf(),y[_].since<=h&&h<=y[_].until||y[_].until<=h&&h<=y[_].since)return y[_].abbr;return""},C.eraYear=function(){for(var h,y,_=this.localeData().eras(),S=0,R=_.length;S<R;++S)if(h=_[S].since<=_[S].until?1:-1,y=this.clone().startOf("day").valueOf(),_[S].since<=y&&y<=_[S].until||_[S].until<=y&&y<=_[S].since)return(this.year()-n(_[S].since).year())*h+_[S].offset;return this.year()},C.year=Ku,C.isLeapYear=function(){return z(this.year())},C.weekYear=function(h){return _b.call(this,h,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},C.isoWeekYear=function(h){return _b.call(this,h,this.isoWeek(),this.isoWeekday(),1,4)},C.quarter=C.quarters=function(h){return h==null?Math.ceil((this.month()+1)/3):this.month(3*(h-1)+this.month()%3)},C.month=se,C.daysInMonth=function(){return dt(this.year(),this.month())},C.week=C.weeks=function(h){var y=this.localeData().week(this);return h==null?y:this.add(7*(h-y),"d")},C.isoWeek=C.isoWeeks=function(h){var y=Be(this,1,4).week;return h==null?y:this.add(7*(h-y),"d")},C.weeksInYear=function(){var h=this.localeData()._week;return Re(this.year(),h.dow,h.doy)},C.weeksInWeekYear=function(){var h=this.localeData()._week;return Re(this.weekYear(),h.dow,h.doy)},C.isoWeeksInYear=function(){return Re(this.year(),1,4)},C.isoWeeksInISOWeekYear=function(){return Re(this.isoWeekYear(),1,4)},C.date=ts,C.day=C.days=function(h){if(!this.isValid())return h!=null?this:NaN;var y,_,S=this._isUTC?this._d.getUTCDay():this._d.getDay();return h!=null?(y=h,_=this.localeData(),h=typeof y!="string"?y:isNaN(y)?typeof(y=_.weekdaysParse(y))=="number"?y:null:parseInt(y,10),this.add(h-S,"d")):S},C.weekday=function(h){if(!this.isValid())return h!=null?this:NaN;var y=(this.day()+7-this.localeData()._week.dow)%7;return h==null?y:this.add(h-y,"d")},C.isoWeekday=function(h){return this.isValid()?h!=null?(y=h,_=this.localeData(),_=typeof y=="string"?_.weekdaysParse(y)%7||7:isNaN(y)?null:y,this.day(this.day()%7?_:_-7)):this.day()||7:h!=null?this:NaN;var y,_},C.dayOfYear=function(h){var y=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return h==null?y:this.add(h-y,"d")},C.hour=C.hours=pt,C.minute=C.minutes=Ps,C.second=C.seconds=Qi,C.millisecond=C.milliseconds=Ji,C.utcOffset=function(h,y,_){var S,R=this._offset||0;if(!this.isValid())return h!=null?this:NaN;if(h==null)return this._isUTC?R:Fd(this);if(typeof h=="string"){if((h=Rs(wt,h))===null)return this}else Math.abs(h)<16&&!_&&(h*=60);return!this._isUTC&&y&&(S=Fd(this)),this._offset=h,this._isUTC=!0,S!=null&&this.add(S,"m"),R!==h&&(!y||this._changeInProgress?db(this,In(h-R,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this},C.utc=function(h){return this.utcOffset(0,h)},C.local=function(h){return this._isUTC&&(this.utcOffset(0,h),this._isUTC=!1,h&&this.subtract(Fd(this),"m")),this},C.parseZone=function(){var h;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((h=Rs(Et,this._i))!=null?this.utcOffset(h):this.utcOffset(0,!0)),this},C.hasAlignedHourOffset=function(h){return!!this.isValid()&&(h=h?Se(h).utcOffset():0,(this.utcOffset()-h)%60==0)},C.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},C.isLocal=function(){return!!this.isValid()&&!this._isUTC},C.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},C.isUtc=cb,C.isUTC=cb,C.zoneAbbr=function(){return this._isUTC?"UTC":""},C.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},C.dates=W("dates accessor is deprecated. Use date instead.",ts),C.months=W("months accessor is deprecated. Use month instead",se),C.years=W("years accessor is deprecated. Use year instead",Ku),C.zone=W("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(h,y){return h!=null?(this.utcOffset(h=typeof h!="string"?-h:h,y),this):-this.utcOffset()}),C.isDSTShifted=W("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var h,y={};return V(y,this),(y=qu(y))._a?(h=(y._isUTC?g:Se)(y._a),this._isDSTShifted=this.isValid()&&0<function(_,S,R){for(var it=Math.min(_.length,S.length),mt=Math.abs(_.length-S.length),Ct=0,Pt=0;Pt<it;Pt++)(R&&_[Pt]!==S[Pt]||!R&&F(_[Pt])!==F(S[Pt]))&&Ct++;return Ct+mt}(y._a,h.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),ce=M.prototype;function Xu(h,y,_,it){var R=oe(),it=g().set(it,y);return R[_](it,h)}function vb(h,y,_){if(u(h)&&(y=h,h=void 0),h=h||"",y!=null)return Xu(h,y,_,"month");for(var S=[],R=0;R<12;R++)S[R]=Xu(h,R,_,"month");return S}function Vd(h,y,_,S){y=(typeof h=="boolean"?u(y)&&(_=y,y=void 0):(y=h,h=!1,u(_=y)&&(_=y,y=void 0)),y||"");var R,it=oe(),mt=h?it._week.dow:0,Ct=[];if(_!=null)return Xu(y,(_+mt)%7,S,"day");for(R=0;R<7;R++)Ct[R]=Xu(y,(R+mt)%7,S,"day");return Ct}ce.calendar=function(h,y,_){return w(h=this._calendar[h]||this._calendar.sameElse)?h.call(y,_):h},ce.longDateFormat=function(h){var y=this._longDateFormat[h],_=this._longDateFormat[h.toUpperCase()];return y||!_?y:(this._longDateFormat[h]=_.match(x).map(function(S){return S==="MMMM"||S==="MM"||S==="DD"||S==="dddd"?S.slice(1):S}).join(""),this._longDateFormat[h])},ce.invalidDate=function(){return this._invalidDate},ce.ordinal=function(h){return this._ordinal.replace("%d",h)},ce.preparse=xb,ce.postformat=xb,ce.relativeTime=function(h,y,_,S){var R=this._relativeTime[_];return w(R)?R(h,y,_,S):R.replace(/%d/i,h)},ce.pastFuture=function(h,y){return w(h=this._relativeTime[0<h?"future":"past"])?h(y):h.replace(/%s/i,y)},ce.set=function(h){var y,_;for(_ in h)a(h,_)&&(w(y=h[_])?this[_]=y:this["_"+_]=y);this._config=h,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ce.eras=function(h,y){for(var _,S=this._eras||oe("en")._eras,R=0,it=S.length;R<it;++R){switch(typeof S[R].since){case"string":_=n(S[R].since).startOf("day"),S[R].since=_.valueOf();break}switch(typeof S[R].until){case"undefined":S[R].until=1/0;break;case"string":_=n(S[R].until).startOf("day").valueOf(),S[R].until=_.valueOf();break}}return S},ce.erasParse=function(h,y,_){var S,R,it,mt,Ct,Pt=this.eras();for(h=h.toUpperCase(),S=0,R=Pt.length;S<R;++S)if(it=Pt[S].name.toUpperCase(),mt=Pt[S].abbr.toUpperCase(),Ct=Pt[S].narrow.toUpperCase(),_)switch(y){case"N":case"NN":case"NNN":if(mt===h)return Pt[S];break;case"NNNN":if(it===h)return Pt[S];break;case"NNNNN":if(Ct===h)return Pt[S];break}else if(0<=[it,mt,Ct].indexOf(h))return Pt[S]},ce.erasConvertYear=function(h,y){var _=h.since<=h.until?1:-1;return y===void 0?n(h.since).year():n(h.since).year()+(y-h.offset)*_},ce.erasAbbrRegex=function(h){return a(this,"_erasAbbrRegex")||Yd.call(this),h?this._erasAbbrRegex:this._erasRegex},ce.erasNameRegex=function(h){return a(this,"_erasNameRegex")||Yd.call(this),h?this._erasNameRegex:this._erasRegex},ce.erasNarrowRegex=function(h){return a(this,"_erasNarrowRegex")||Yd.call(this),h?this._erasNarrowRegex:this._erasRegex},ce.months=function(h,y){return h?(i(this._months)?this._months:this._months[(this._months.isFormat||be).test(y)?"format":"standalone"])[h.month()]:i(this._months)?this._months:this._months.standalone},ce.monthsShort=function(h,y){return h?(i(this._monthsShort)?this._monthsShort:this._monthsShort[be.test(y)?"format":"standalone"])[h.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ce.monthsParse=function(h,y,_){var S,R;if(this._monthsParseExact)return function(re,mt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Pt=0;Pt<12;++Pt)ue=g([2e3,Pt]),this._shortMonthsParse[Pt]=this.monthsShort(ue,"").toLocaleLowerCase(),this._longMonthsParse[Pt]=this.months(ue,"").toLocaleLowerCase();return Ct?mt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:mt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1||(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1||(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null}.call(this,h,y,_);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),S=0;S<12;S++)if(R=g([2e3,S]),_&&!this._longMonthsParse[S]&&(this._longMonthsParse[S]=new RegExp("^"+this.months(R,"").replace(".","")+"$","i"),this._shortMonthsParse[S]=new RegExp("^"+this.monthsShort(R,"").replace(".","")+"$","i")),_||this._monthsParse[S]||(R="^"+this.months(R,"")+"|^"+this.monthsShort(R,""),this._monthsParse[S]=new RegExp(R.replace(".",""),"i")),_&&y==="MMMM"&&this._longMonthsParse[S].test(h)||_&&y==="MMM"&&this._shortMonthsParse[S].test(h)||!_&&this._monthsParse[S].test(h))return S},ce.monthsRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ye.call(this),h?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=ke),this._monthsStrictRegex&&h?this._monthsStrictRegex:this._monthsRegex)},ce.monthsShortRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ye.call(this),h?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=_e),this._monthsShortStrictRegex&&h?this._monthsShortStrictRegex:this._monthsShortRegex)},ce.week=function(h){return Be(h,this._week.dow,this._week.doy).week},ce.firstDayOfYear=function(){return this._week.doy},ce.firstDayOfWeek=function(){return this._week.dow},ce.weekdays=function(h,y){return y=i(this._weekdays)?this._weekdays:this._weekdays[h&&h!==!0&&this._weekdays.isFormat.test(y)?"format":"standalone"],h===!0?Pe(y,this._week.dow):h?y[h.day()]:y},ce.weekdaysMin=function(h){return h===!0?Pe(this._weekdaysMin,this._week.dow):h?this._weekdaysMin[h.day()]:this._weekdaysMin},ce.weekdaysShort=function(h){return h===!0?Pe(this._weekdaysShort,this._week.dow):h?this._weekdaysShort[h.day()]:this._weekdaysShort},ce.weekdaysParse=function(h,y,_){var S,R;if(this._weekdaysParseExact)return function(re,mt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Pt=0;Pt<7;++Pt)ue=g([2e3,1]).day(Pt),this._minWeekdaysParse[Pt]=this.weekdaysMin(ue,"").toLocaleLowerCase(),this._shortWeekdaysParse[Pt]=this.weekdaysShort(ue,"").toLocaleLowerCase(),this._weekdaysParse[Pt]=this.weekdays(ue,"").toLocaleLowerCase();return Ct?mt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1?It:null:mt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:mt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:mt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null}.call(this,h,y,_);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),S=0;S<7;S++)if(R=g([2e3,1]).day(S),_&&!this._fullWeekdaysParse[S]&&(this._fullWeekdaysParse[S]=new RegExp("^"+this.weekdays(R,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[S]=new RegExp("^"+this.weekdaysShort(R,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[S]=new RegExp("^"+this.weekdaysMin(R,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[S]||(R="^"+this.weekdays(R,"")+"|^"+this.weekdaysShort(R,"")+"|^"+this.weekdaysMin(R,""),this._weekdaysParse[S]=new RegExp(R.replace(".",""),"i")),_&&y==="dddd"&&this._fullWeekdaysParse[S].test(h)||_&&y==="ddd"&&this._shortWeekdaysParse[S].test(h)||_&&y==="dd"&&this._minWeekdaysParse[S].test(h)||!_&&this._weekdaysParse[S].test(h))return S},ce.weekdaysRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||At.call(this),h?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=ar),this._weekdaysStrictRegex&&h?this._weekdaysStrictRegex:this._weekdaysRegex)},ce.weekdaysShortRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||At.call(this),h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ce.weekdaysMinRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||At.call(this),h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Z),this._weekdaysMinStrictRegex&&h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ce.isPM=function(h){return(h+"").toLowerCase().charAt(0)==="p"},ce.meridiem=function(h,y,_){return 11<h?_?"pm":"PM":_?"am":"AM"},qt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(h){var y=h%10;return h+(F(h%100/10)===1?"th":y==1?"st":y==2?"nd":y==3?"rd":"th")}}),n.lang=W("moment.lang is deprecated. Use moment.locale instead.",qt),n.langData=W("moment.langData is deprecated. Use moment.localeData instead.",oe);var Di=Math.abs;function kb(h,y,_,S){return y=In(y,_),h._milliseconds+=S*y._milliseconds,h._days+=S*y._days,h._months+=S*y._months,h._bubble()}function wb(h){return h<0?Math.floor(h):Math.ceil(h)}function Tb(h){return 4800*h/146097}function Ud(h){return 146097*h/4800}function Mi(h){return function(){return this.as(h)}}Mt=Mi("ms"),ht=Mi("s"),ee=Mi("m"),et=Mi("h"),Yt=Mi("d"),Ye=Mi("w"),pt=Mi("M"),Ps=Mi("Q"),Qi=Mi("y");function Ys(h){return function(){return this.isValid()?this._data[h]:NaN}}var Ji=Ys("milliseconds"),ts=Ys("seconds"),Ku=Ys("minutes"),ce=Ys("hours"),GY=Ys("days"),qY=Ys("months"),jY=Ys("years"),Ni=Math.round,Va={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $Y(h,y,_,S){var It=In(h).abs(),ue=Ni(It.as("s")),R=Ni(It.as("m")),it=Ni(It.as("h")),mt=Ni(It.as("d")),Ct=Ni(It.as("M")),Pt=Ni(It.as("w")),It=Ni(It.as("y")),ue=(ue<=_.ss?["s",ue]:ue<_.s&&["ss",ue])||R<=1&&["m"]||R<_.m&&["mm",R]||it<=1&&["h"]||it<_.h&&["hh",it]||mt<=1&&["d"]||mt<_.d&&["dd",mt];return(ue=(ue=_.w!=null?ue||Pt<=1&&["w"]||Pt<_.w&&["ww",Pt]:ue)||Ct<=1&&["M"]||Ct<_.M&&["MM",Ct]||It<=1&&["y"]||["yy",It])[2]=y,ue[3]=0<+h,ue[4]=S,function(re,He,lr,On,Wd){return Wd.relativeTime(He||1,!!lr,re,On)}.apply(null,ue)}var zd=Math.abs;function Ua(h){return(0<h)-(h<0)||+h}function Zu(){if(!this.isValid())return this.localeData().invalidDate();var h,y,_,S,R,it,mt,Ct=zd(this._milliseconds)/1e3,Pt=zd(this._days),It=zd(this._months),ue=this.asSeconds();return ue?(h=X(Ct/60),y=X(h/60),Ct%=60,h%=60,_=X(It/12),It%=12,S=Ct?Ct.toFixed(3).replace(/\.?0+$/,""):"",R=Ua(this._months)!==Ua(ue)?"-":"",it=Ua(this._days)!==Ua(ue)?"-":"",mt=Ua(this._milliseconds)!==Ua(ue)?"-":"",(ue<0?"-":"")+"P"+(_?R+_+"Y":"")+(It?R+It+"M":"")+(Pt?it+Pt+"D":"")+(y||h||Ct?"T":"")+(y?mt+y+"H":"")+(h?mt+h+"M":"")+(Ct?mt+S+"S":"")):"P0D"}var Ce=Bn.prototype;return Ce.isValid=function(){return this._isValid},Ce.abs=function(){var h=this._data;return this._milliseconds=Di(this._milliseconds),this._days=Di(this._days),this._months=Di(this._months),h.milliseconds=Di(h.milliseconds),h.seconds=Di(h.seconds),h.minutes=Di(h.minutes),h.hours=Di(h.hours),h.months=Di(h.months),h.years=Di(h.years),this},Ce.add=function(h,y){return kb(this,h,y,1)},Ce.subtract=function(h,y){return kb(this,h,y,-1)},Ce.as=function(h){if(!this.isValid())return NaN;var y,_,S=this._milliseconds;if((h=_t(h))==="month"||h==="quarter"||h==="year")switch(y=this._days+S/864e5,_=this._months+Tb(y),h){case"month":return _;case"quarter":return _/3;case"year":return _/12}else switch(y=this._days+Math.round(Ud(this._months)),h){case"week":return y/7+S/6048e5;case"day":return y+S/864e5;case"hour":return 24*y+S/36e5;case"minute":return 1440*y+S/6e4;case"second":return 86400*y+S/1e3;case"millisecond":return Math.floor(864e5*y)+S;default:throw new Error("Unknown unit "+h)}},Ce.asMilliseconds=Mt,Ce.asSeconds=ht,Ce.asMinutes=ee,Ce.asHours=et,Ce.asDays=Yt,Ce.asWeeks=Ye,Ce.asMonths=pt,Ce.asQuarters=Ps,Ce.asYears=Qi,Ce.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12):NaN},Ce._bubble=function(){var h=this._milliseconds,y=this._days,_=this._months,S=this._data;return 0<=h&&0<=y&&0<=_||h<=0&&y<=0&&_<=0||(h+=864e5*wb(Ud(_)+y),_=y=0),S.milliseconds=h%1e3,h=X(h/1e3),S.seconds=h%60,h=X(h/60),S.minutes=h%60,h=X(h/60),S.hours=h%24,y+=X(h/24),_+=h=X(Tb(y)),y-=wb(Ud(h)),h=X(_/12),_%=12,S.days=y,S.months=_,S.years=h,this},Ce.clone=function(){return In(this)},Ce.get=function(h){return h=_t(h),this.isValid()?this[h+"s"]():NaN},Ce.milliseconds=Ji,Ce.seconds=ts,Ce.minutes=Ku,Ce.hours=ce,Ce.days=GY,Ce.weeks=function(){return X(this.days()/7)},Ce.months=qY,Ce.years=jY,Ce.humanize=function(h,y){if(!this.isValid())return this.localeData().invalidDate();var _=!1,S=Va;return typeof h=="object"&&(y=h,h=!1),typeof h=="boolean"&&(_=h),typeof y=="object"&&(S=Object.assign({},Va,y),y.s!=null&&y.ss==null&&(S.ss=y.s-1)),h=this.localeData(),y=$Y(this,!_,S,h),_&&(y=h.pastFuture(+this,y)),h.postformat(y)},Ce.toISOString=Zu,Ce.toString=Zu,Ce.toJSON=Zu,Ce.locale=pb,Ce.localeData=gb,Ce.toIsoString=W("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zu),Ce.lang=$e,j("X",0,0,"unix"),j("x",0,0,"valueOf"),st("x",gt),st("X",/[+-]?\d+(\.\d{1,3})?/),Gt("X",function(h,y,_){_._d=new Date(1e3*parseFloat(h))}),Gt("x",function(h,y,_){_._d=new Date(F(h))}),n.version="2.29.4",r=Se,n.fn=C,n.min=function(){return Or("isBefore",[].slice.call(arguments,0))},n.max=function(){return Or("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=g,n.unix=function(h){return Se(1e3*h)},n.months=function(h,y){return vb(h,y,"months")},n.isDate=d,n.locale=qt,n.invalid=T,n.duration=In,n.isMoment=G,n.weekdays=function(h,y,_){return Vd(h,y,_,"weekdays")},n.parseZone=function(){return Se.apply(null,arguments).parseZone()},n.localeData=oe,n.isDuration=Li,n.monthsShort=function(h,y){return vb(h,y,"monthsShort")},n.weekdaysMin=function(h,y,_){return Vd(h,y,_,"weekdaysMin")},n.defineLocale=te,n.updateLocale=function(h,y){var _,S;return y!=null?(S=We,ve[h]!=null&&ve[h].parentLocale!=null?ve[h].set(v(ve[h]._config,y)):(y=v(S=(_=zr(h))!=null?_._config:S,y),_==null&&(y.abbr=h),(S=new M(y)).parentLocale=ve[h],ve[h]=S),qt(h)):ve[h]!=null&&(ve[h].parentLocale!=null?(ve[h]=ve[h].parentLocale,h===qt()&&qt(h)):ve[h]!=null&&delete ve[h]),ve[h]},n.locales=function(){return m(ve)},n.weekdaysShort=function(h,y,_){return Vd(h,y,_,"weekdaysShort")},n.normalizeUnits=_t,n.relativeTimeRounding=function(h){return h===void 0?Ni:typeof h=="function"&&(Ni=h,!0)},n.relativeTimeThreshold=function(h,y){return Va[h]!==void 0&&(y===void 0?Va[h]:(Va[h]=y,h==="s"&&(Va.ss=y-1),!0))},n.calendarFormat=function(h,y){return(h=h.diff(y,"days",!0))<-6?"sameElse":h<-1?"lastWeek":h<0?"lastDay":h<1?"sameDay":h<2?"nextDay":h<7?"nextWeek":"sameElse"},n.prototype=C,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n})})(Bi);const cn=Bi.exports,Jn={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},B={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Qu=function(t="fatal"){let e=Jn.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Jn&&(e=Jn[t])):typeof t=="number"&&(e=t),B.trace=()=>{},B.debug=()=>{},B.info=()=>{},B.warn=()=>{},B.error=()=>{},B.fatal=()=>{},e<=Jn.fatal&&(B.fatal=console.error?console.error.bind(console,Qr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Qr("FATAL"))),e<=Jn.error&&(B.error=console.error?console.error.bind(console,Qr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Qr("ERROR"))),e<=Jn.warn&&(B.warn=console.warn?console.warn.bind(console,Qr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Qr("WARN"))),e<=Jn.info&&(B.info=console.info?console.info.bind(console,Qr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Qr("INFO"))),e<=Jn.debug&&(B.debug=console.debug?console.debug.bind(console,Qr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qr("DEBUG"))),e<=Jn.trace&&(B.trace=console.debug?console.debug.bind(console,Qr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Qr("TRACE")))},Qr=t=>`%c${cn().format("ss.SSS")} : ${t} : `;var Ju={};Object.defineProperty(Ju,"__esModule",{value:!0});var ti=Ju.sanitizeUrl=void 0,Eb=/^([^\w]*)(javascript|data|vbscript)/im,Cb=/&#(\w+)(^\w|;)?/g,Sb=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ab=/^([^:]+):/gm,Lb=[".","/"];function Db(t){return Lb.indexOf(t[0])>-1}function Mb(t){return t.replace(Cb,function(e,r){return String.fromCharCode(r)})}function Nb(t){var e=Mb(t||"").replace(Sb,"").trim();if(!e)return"about:blank";if(Db(e))return e;var r=e.match(Ab);if(!r)return e;var n=r[0];return Eb.test(n)?"about:blank":e}ti=Ju.sanitizeUrl=Nb;function ul(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Bb(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function th(t){let e,r,n;t.length!==2?(e=ul,r=(o,l)=>ul(t(o),l),n=(o,l)=>t(o)-l):(e=t===ul||t===Bb?t:Ib,r=t,n=t);function i(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<0?u=f+1:d=f}while(u<d)}return u}function s(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<=0?u=f+1:d=f}while(u<d)}return u}function a(o,l,u=0,d=o.length){const f=i(o,l,u,d-1);return f>u&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:i,center:a,right:s}}function Ib(){return 0}function Ob(t){return t===null?NaN:+t}const Rb=th(ul).right;th(Ob).center;const Fb=Rb;class Hd extends Map{constructor(e,r=Vb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(Gd(this,e))}has(e){return super.has(Gd(this,e))}set(e,r){return super.set(Pb(this,e),r)}delete(e){return super.delete(Yb(this,e))}}function Gd({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function Pb({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function Yb({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function Vb(t){return t!==null&&typeof t=="object"?t.valueOf():t}var eh=Math.sqrt(50),rh=Math.sqrt(10),nh=Math.sqrt(2);function Ub(t,e,r){var n,i=-1,s,a,o;if(e=+e,t=+t,r=+r,t===e&&r>0)return[t];if((n=e<t)&&(s=t,t=e,e=s),(o=qd(t,e,r))===0||!isFinite(o))return[];if(o>0){let l=Math.round(t/o),u=Math.round(e/o);for(l*o<t&&++l,u*o>e&&--u,a=new Array(s=u-l+1);++i<s;)a[i]=(l+i)*o}else{o=-o;let l=Math.round(t*o),u=Math.round(e*o);for(l/o<t&&++l,u/o>e&&--u,a=new Array(s=u-l+1);++i<s;)a[i]=(l+i)/o}return n&&a.reverse(),a}function qd(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),s=n/Math.pow(10,i);return i>=0?(s>=eh?10:s>=rh?5:s>=nh?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(s>=eh?10:s>=rh?5:s>=nh?2:1)}function ih(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),s=n/i;return s>=eh?i*=10:s>=rh?i*=5:s>=nh&&(i*=2),e<t?-i:i}function zb(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function Wb(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function Hb(t){return t}var hl=1,sh=2,ah=3,dl=4,jd=1e-6;function Gb(t){return"translate("+t+",0)"}function qb(t){return"translate(0,"+t+")"}function jb(t){return e=>+t(e)}function $b(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Xb(){return!this.__axis}function $d(t,e){var r=[],n=null,i=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===hl||t===dl?-1:1,d=t===dl||t===sh?"x":"y",f=t===hl||t===ah?Gb:qb;function p(g){var b=n==null?e.ticks?e.ticks.apply(e,r):e.domain():n,k=i==null?e.tickFormat?e.tickFormat.apply(e,r):Hb:i,T=Math.max(s,0)+o,L=e.range(),E=+L[0]+l,I=+L[L.length-1]+l,V=(e.bandwidth?$b:jb)(e.copy(),l),H=g.selection?g.selection():g,G=H.selectAll(".domain").data([null]),Y=H.selectAll(".tick").data(b,e).order(),W=Y.exit(),N=Y.enter().append("g").attr("class","tick"),D=Y.select("line"),w=Y.select("text");G=G.merge(G.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Y=Y.merge(N),D=D.merge(N.append("line").attr("stroke","currentColor").attr(d+"2",u*s)),w=w.merge(N.append("text").attr("fill","currentColor").attr(d,u*T).attr("dy",t===hl?"0em":t===ah?"0.71em":"0.32em")),g!==H&&(G=G.transition(g),Y=Y.transition(g),D=D.transition(g),w=w.transition(g),W=W.transition(g).attr("opacity",jd).attr("transform",function(v){return isFinite(v=V(v))?f(v+l):this.getAttribute("transform")}),N.attr("opacity",jd).attr("transform",function(v){var M=this.parentNode.__axis;return f((M&&isFinite(M=M(v))?M:V(v))+l)})),W.remove(),G.attr("d",t===dl||t===sh?a?"M"+u*a+","+E+"H"+l+"V"+I+"H"+u*a:"M"+l+","+E+"V"+I:a?"M"+E+","+u*a+"V"+l+"H"+I+"V"+u*a:"M"+E+","+l+"H"+I),Y.attr("opacity",1).attr("transform",function(v){return f(V(v)+l)}),D.attr(d+"2",u*s),w.attr(d,u*T).text(k),H.filter(Xb).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===sh?"start":t===dl?"end":"middle"),H.each(function(){this.__axis=V})}return p.scale=function(g){return arguments.length?(e=g,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),p):r.slice()},p.tickValues=function(g){return arguments.length?(n=g==null?null:Array.from(g),p):n&&n.slice()},p.tickFormat=function(g){return arguments.length?(i=g,p):i},p.tickSize=function(g){return arguments.length?(s=a=+g,p):s},p.tickSizeInner=function(g){return arguments.length?(s=+g,p):s},p.tickSizeOuter=function(g){return arguments.length?(a=+g,p):a},p.tickPadding=function(g){return arguments.length?(o=+g,p):o},p.offset=function(g){return arguments.length?(l=+g,p):l},p}function Kb(t){return $d(hl,t)}function Zb(t){return $d(ah,t)}var Qb={value:()=>{}};function Xd(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new fl(r)}function fl(t){this._=t}function Jb(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}fl.prototype=Xd.prototype={constructor:fl,on:function(t,e){var r=this._,n=Jb(t+"",r),i,s=-1,a=n.length;if(arguments.length<2){for(;++s<a;)if((i=(t=n[s]).type)&&(i=t5(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<a;)if(i=(t=n[s]).type)r[i]=Kd(r[i],t.name,e);else if(e==null)for(i in r)r[i]=Kd(r[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new fl(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,s;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],n=0,i=s.length;n<i;++n)s[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,s=n.length;i<s;++i)n[i].value.apply(e,r)}};function t5(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function Kd(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=Qb,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var oh="http://www.w3.org/1999/xhtml";const Zd={svg:"http://www.w3.org/2000/svg",xhtml:oh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pl(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Zd.hasOwnProperty(e)?{space:Zd[e],local:t}:t}function e5(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===oh&&e.documentElement.namespaceURI===oh?e.createElement(t):e.createElementNS(r,t)}}function r5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Qd(t){var e=pl(t);return(e.local?r5:e5)(e)}function n5(){}function lh(t){return t==null?n5:function(){return this.querySelector(t)}}function i5(t){typeof t!="function"&&(t=lh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var s=e[i],a=s.length,o=n[i]=new Array(a),l,u,d=0;d<a;++d)(l=s[d])&&(u=t.call(l,l.__data__,d,s))&&("__data__"in l&&(u.__data__=l.__data__),o[d]=u);return new Ar(n,this._parents)}function Jd(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function s5(){return[]}function tf(t){return t==null?s5:function(){return this.querySelectorAll(t)}}function a5(t){return function(){return Jd(t.apply(this,arguments))}}function o5(t){typeof t=="function"?t=a5(t):t=tf(t);for(var e=this._groups,r=e.length,n=[],i=[],s=0;s<r;++s)for(var a=e[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&(n.push(t.call(l,l.__data__,u,a)),i.push(l));return new Ar(n,i)}function ef(t){return function(){return this.matches(t)}}function rf(t){return function(e){return e.matches(t)}}var l5=Array.prototype.find;function c5(t){return function(){return l5.call(this.children,t)}}function u5(){return this.firstElementChild}function h5(t){return this.select(t==null?u5:c5(typeof t=="function"?t:rf(t)))}var d5=Array.prototype.filter;function f5(){return Array.from(this.children)}function p5(t){return function(){return d5.call(this.children,t)}}function g5(t){return this.selectAll(t==null?f5:p5(typeof t=="function"?t:rf(t)))}function y5(t){typeof t!="function"&&(t=ef(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var s=e[i],a=s.length,o=n[i]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new Ar(n,this._parents)}function nf(t){return new Array(t.length)}function m5(){return new Ar(this._enter||this._groups.map(nf),this._parents)}function gl(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}gl.prototype={constructor:gl,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function b5(t){return function(){return t}}function _5(t,e,r,n,i,s){for(var a=0,o,l=e.length,u=s.length;a<u;++a)(o=e[a])?(o.__data__=s[a],n[a]=o):r[a]=new gl(t,s[a]);for(;a<l;++a)(o=e[a])&&(i[a]=o)}function x5(t,e,r,n,i,s,a){var o,l,u=new Map,d=e.length,f=s.length,p=new Array(d),g;for(o=0;o<d;++o)(l=e[o])&&(p[o]=g=a.call(l,l.__data__,o,e)+"",u.has(g)?i[o]=l:u.set(g,l));for(o=0;o<f;++o)g=a.call(t,s[o],o,s)+"",(l=u.get(g))?(n[o]=l,l.__data__=s[o],u.delete(g)):r[o]=new gl(t,s[o]);for(o=0;o<d;++o)(l=e[o])&&u.get(p[o])===l&&(i[o]=l)}function v5(t){return t.__data__}function k5(t,e){if(!arguments.length)return Array.from(this,v5);var r=e?x5:_5,n=this._parents,i=this._groups;typeof t!="function"&&(t=b5(t));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),u=0;u<s;++u){var d=n[u],f=i[u],p=f.length,g=w5(t.call(d,d&&d.__data__,u,n)),b=g.length,k=o[u]=new Array(b),T=a[u]=new Array(b),L=l[u]=new Array(p);r(d,f,k,T,L,g,e);for(var E=0,I=0,V,H;E<b;++E)if(V=k[E]){for(E>=I&&(I=E+1);!(H=T[I])&&++I<b;);V._next=H||null}}return a=new Ar(a,n),a._enter=o,a._exit=l,a}function w5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function T5(){return new Ar(this._exit||this._groups.map(nf),this._parents)}function E5(t,e,r){var n=this.enter(),i=this,s=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?s.remove():r(s),n&&i?n.merge(i).order():i}function C5(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,s=n.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var u=r[l],d=n[l],f=u.length,p=o[l]=new Array(f),g,b=0;b<f;++b)(g=u[b]||d[b])&&(p[b]=g);for(;l<i;++l)o[l]=r[l];return new Ar(o,this._parents)}function S5(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,s=n[i],a;--i>=0;)(a=n[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function A5(t){t||(t=L5);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}for(var r=this._groups,n=r.length,i=new Array(n),s=0;s<n;++s){for(var a=r[s],o=a.length,l=i[s]=new Array(o),u,d=0;d<o;++d)(u=a[d])&&(l[d]=u);l.sort(e)}return new Ar(i,this._parents).order()}function L5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function D5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function M5(){return Array.from(this)}function N5(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,s=n.length;i<s;++i){var a=n[i];if(a)return a}return null}function B5(){let t=0;for(const e of this)++t;return t}function I5(){return!this.node()}function O5(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],s=0,a=i.length,o;s<a;++s)(o=i[s])&&t.call(o,o.__data__,s,i);return this}function R5(t){return function(){this.removeAttribute(t)}}function F5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function P5(t,e){return function(){this.setAttribute(t,e)}}function Y5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function V5(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function U5(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function z5(t,e){var r=pl(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?F5:R5:typeof e=="function"?r.local?U5:V5:r.local?Y5:P5)(r,e))}function sf(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function W5(t){return function(){this.style.removeProperty(t)}}function H5(t,e,r){return function(){this.style.setProperty(t,e,r)}}function G5(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function q5(t,e,r){return arguments.length>1?this.each((e==null?W5:typeof e=="function"?G5:H5)(t,e,r==null?"":r)):Vs(this.node(),t)}function Vs(t,e){return t.style.getPropertyValue(e)||sf(t).getComputedStyle(t,null).getPropertyValue(e)}function j5(t){return function(){delete this[t]}}function $5(t,e){return function(){this[t]=e}}function X5(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function K5(t,e){return arguments.length>1?this.each((e==null?j5:typeof e=="function"?X5:$5)(t,e)):this.node()[t]}function af(t){return t.trim().split(/^|\s+/)}function ch(t){return t.classList||new of(t)}function of(t){this._node=t,this._names=af(t.getAttribute("class")||"")}of.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function lf(t,e){for(var r=ch(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function cf(t,e){for(var r=ch(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function Z5(t){return function(){lf(this,t)}}function Q5(t){return function(){cf(this,t)}}function J5(t,e){return function(){(e.apply(this,arguments)?lf:cf)(this,t)}}function t_(t,e){var r=af(t+"");if(arguments.length<2){for(var n=ch(this.node()),i=-1,s=r.length;++i<s;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?J5:e?Z5:Q5)(r,e))}function e_(){this.textContent=""}function r_(t){return function(){this.textContent=t}}function n_(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function i_(t){return arguments.length?this.each(t==null?e_:(typeof t=="function"?n_:r_)(t)):this.node().textContent}function s_(){this.innerHTML=""}function a_(t){return function(){this.innerHTML=t}}function o_(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function l_(t){return arguments.length?this.each(t==null?s_:(typeof t=="function"?o_:a_)(t)):this.node().innerHTML}function c_(){this.nextSibling&&this.parentNode.appendChild(this)}function u_(){return this.each(c_)}function h_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function d_(){return this.each(h_)}function f_(t){var e=typeof t=="function"?t:Qd(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function p_(){return null}function g_(t,e){var r=typeof t=="function"?t:Qd(t),n=e==null?p_:typeof e=="function"?e:lh(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function y_(){var t=this.parentNode;t&&t.removeChild(this)}function m_(){return this.each(y_)}function b_(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function __(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function x_(t){return this.select(t?__:b_)}function v_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function k_(t){return function(e){t.call(this,e,this.__data__)}}function w_(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function T_(t){return function(){var e=this.__on;if(!!e){for(var r=0,n=-1,i=e.length,s;r<i;++r)s=e[r],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++n]=s;++n?e.length=n:delete this.__on}}}function E_(t,e,r){return function(){var n=this.__on,i,s=k_(e);if(n){for(var a=0,o=n.length;a<o;++a)if((i=n[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=r),i.value=e;return}}this.addEventListener(t.type,s,r),i={type:t.type,name:t.name,value:e,listener:s,options:r},n?n.push(i):this.__on=[i]}}function C_(t,e,r){var n=w_(t+""),i,s=n.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,d;l<u;++l)for(i=0,d=o[l];i<s;++i)if((a=n[i]).type===d.type&&a.name===d.name)return d.value}return}for(o=e?E_:T_,i=0;i<s;++i)this.each(o(n[i],e,r));return this}function uf(t,e,r){var n=sf(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function S_(t,e){return function(){return uf(this,t,e)}}function A_(t,e){return function(){return uf(this,t,e.apply(this,arguments))}}function L_(t,e){return this.each((typeof e=="function"?A_:S_)(t,e))}function*D_(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,s=n.length,a;i<s;++i)(a=n[i])&&(yield a)}var uh=[null];function Ar(t,e){this._groups=t,this._parents=e}function Wa(){return new Ar([[document.documentElement]],uh)}function M_(){return this}Ar.prototype=Wa.prototype={constructor:Ar,select:i5,selectAll:o5,selectChild:h5,selectChildren:g5,filter:y5,data:k5,enter:m5,exit:T5,join:E5,merge:C5,selection:M_,order:S5,sort:A5,call:D5,nodes:M5,node:N5,size:B5,empty:I5,each:O5,attr:z5,style:q5,property:K5,classed:t_,text:i_,html:l_,raise:u_,lower:d_,append:f_,insert:g_,remove:m_,clone:x_,datum:v_,on:C_,dispatch:L_,[Symbol.iterator]:D_};function St(t){return typeof t=="string"?new Ar([[document.querySelector(t)]],[document.documentElement]):new Ar([[t]],uh)}function hh(t){return typeof t=="string"?new Ar([document.querySelectorAll(t)],[document.documentElement]):new Ar([Jd(t)],uh)}function Ha(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function yl(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function es(){}var Ga=.7,ml=1/Ga,Us="\\s*([+-]?\\d+)\\s*",qa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",N_=/^#([0-9a-f]{3,8})$/,B_=new RegExp(`^rgb\\(${Us},${Us},${Us}\\)$`),I_=new RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`),O_=new RegExp(`^rgba\\(${Us},${Us},${Us},${qa}\\)$`),R_=new RegExp(`^rgba\\(${Rn},${Rn},${Rn},${qa}\\)$`),F_=new RegExp(`^hsl\\(${qa},${Rn},${Rn}\\)$`),P_=new RegExp(`^hsla\\(${qa},${Rn},${Rn},${qa}\\)$`),hf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ha(es,rs,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:df,formatHex:df,formatHex8:Y_,formatHsl:V_,formatRgb:ff,toString:ff});function df(){return this.rgb().formatHex()}function Y_(){return this.rgb().formatHex8()}function V_(){return _f(this).formatHsl()}function ff(){return this.rgb().formatRgb()}function rs(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=N_.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?pf(e):r===3?new vr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?bl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?bl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=B_.exec(t))?new vr(e[1],e[2],e[3],1):(e=I_.exec(t))?new vr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=O_.exec(t))?bl(e[1],e[2],e[3],e[4]):(e=R_.exec(t))?bl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=F_.exec(t))?bf(e[1],e[2]/100,e[3]/100,1):(e=P_.exec(t))?bf(e[1],e[2]/100,e[3]/100,e[4]):hf.hasOwnProperty(t)?pf(hf[t]):t==="transparent"?new vr(NaN,NaN,NaN,0):null}function pf(t){return new vr(t>>16&255,t>>8&255,t&255,1)}function bl(t,e,r,n){return n<=0&&(t=e=r=NaN),new vr(t,e,r,n)}function gf(t){return t instanceof es||(t=rs(t)),t?(t=t.rgb(),new vr(t.r,t.g,t.b,t.opacity)):new vr}function dh(t,e,r,n){return arguments.length===1?gf(t):new vr(t,e,r,n==null?1:n)}function vr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Ha(vr,dh,yl(es,{brighter(t){return t=t==null?ml:Math.pow(ml,t),new vr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ga:Math.pow(Ga,t),new vr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new vr(ns(this.r),ns(this.g),ns(this.b),_l(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:yf,formatHex:yf,formatHex8:U_,formatRgb:mf,toString:mf}));function yf(){return`#${is(this.r)}${is(this.g)}${is(this.b)}`}function U_(){return`#${is(this.r)}${is(this.g)}${is(this.b)}${is((isNaN(this.opacity)?1:this.opacity)*255)}`}function mf(){const t=_l(this.opacity);return`${t===1?"rgb(":"rgba("}${ns(this.r)}, ${ns(this.g)}, ${ns(this.b)}${t===1?")":`, ${t})`}`}function _l(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ns(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function is(t){return t=ns(t),(t<16?"0":"")+t.toString(16)}function bf(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new un(t,e,r,n)}function _f(t){if(t instanceof un)return new un(t.h,t.s,t.l,t.opacity);if(t instanceof es||(t=rs(t)),!t)return new un;if(t instanceof un)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),s=Math.max(e,r,n),a=NaN,o=s-i,l=(s+i)/2;return o?(e===s?a=(r-n)/o+(r<n)*6:r===s?a=(n-e)/o+2:a=(e-r)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new un(a,o,l,t.opacity)}function z_(t,e,r,n){return arguments.length===1?_f(t):new un(t,e,r,n==null?1:n)}function un(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Ha(un,z_,yl(es,{brighter(t){return t=t==null?ml:Math.pow(ml,t),new un(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ga:Math.pow(Ga,t),new un(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new vr(fh(t>=240?t-240:t+120,i,n),fh(t,i,n),fh(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new un(xf(this.h),xl(this.s),xl(this.l),_l(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 t=_l(this.opacity);return`${t===1?"hsl(":"hsla("}${xf(this.h)}, ${xl(this.s)*100}%, ${xl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function xf(t){return t=(t||0)%360,t<0?t+360:t}function xl(t){return Math.max(0,Math.min(1,t||0))}function fh(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const W_=Math.PI/180,H_=180/Math.PI,vl=18,vf=.96422,kf=1,wf=.82521,Tf=4/29,zs=6/29,Ef=3*zs*zs,G_=zs*zs*zs;function Cf(t){if(t instanceof Fn)return new Fn(t.l,t.a,t.b,t.opacity);if(t instanceof ei)return Sf(t);t instanceof vr||(t=gf(t));var e=mh(t.r),r=mh(t.g),n=mh(t.b),i=ph((.2225045*e+.7168786*r+.0606169*n)/kf),s,a;return e===r&&r===n?s=a=i:(s=ph((.4360747*e+.3850649*r+.1430804*n)/vf),a=ph((.0139322*e+.0971045*r+.7141733*n)/wf)),new Fn(116*i-16,500*(s-i),200*(i-a),t.opacity)}function q_(t,e,r,n){return arguments.length===1?Cf(t):new Fn(t,e,r,n==null?1:n)}function Fn(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}Ha(Fn,q_,yl(es,{brighter(t){return new Fn(this.l+vl*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new Fn(this.l-vl*(t==null?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=vf*gh(e),t=kf*gh(t),r=wf*gh(r),new vr(yh(3.1338561*e-1.6168667*t-.4906146*r),yh(-.9787684*e+1.9161415*t+.033454*r),yh(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function ph(t){return t>G_?Math.pow(t,1/3):t/Ef+Tf}function gh(t){return t>zs?t*t*t:Ef*(t-Tf)}function yh(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function mh(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function j_(t){if(t instanceof ei)return new ei(t.h,t.c,t.l,t.opacity);if(t instanceof Fn||(t=Cf(t)),t.a===0&&t.b===0)return new ei(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*H_;return new ei(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function bh(t,e,r,n){return arguments.length===1?j_(t):new ei(t,e,r,n==null?1:n)}function ei(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function Sf(t){if(isNaN(t.h))return new Fn(t.l,0,0,t.opacity);var e=t.h*W_;return new Fn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ha(ei,bh,yl(es,{brighter(t){return new ei(this.h,this.c,this.l+vl*(t==null?1:t),this.opacity)},darker(t){return new ei(this.h,this.c,this.l-vl*(t==null?1:t),this.opacity)},rgb(){return Sf(this).rgb()}}));const kl=t=>()=>t;function Af(t,e){return function(r){return t+r*e}}function $_(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function X_(t,e){var r=e-t;return r?Af(t,r>180||r<-180?r-360*Math.round(r/360):r):kl(isNaN(t)?e:t)}function K_(t){return(t=+t)==1?ja:function(e,r){return r-e?$_(e,r,t):kl(isNaN(e)?r:e)}}function ja(t,e){var r=e-t;return r?Af(t,r):kl(isNaN(t)?e:t)}const wl=function t(e){var r=K_(e);function n(i,s){var a=r((i=dh(i)).r,(s=dh(s)).r),o=r(i.g,s.g),l=r(i.b,s.b),u=ja(i.opacity,s.opacity);return function(d){return i.r=a(d),i.g=o(d),i.b=l(d),i.opacity=u(d),i+""}}return n.gamma=t,n}(1);function Z_(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(s){for(i=0;i<r;++i)n[i]=t[i]*(1-s)+e[i]*s;return n}}function Q_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function J_(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),s=new Array(r),a;for(a=0;a<n;++a)i[a]=vh(t[a],e[a]);for(;a<r;++a)s[a]=e[a];return function(o){for(a=0;a<n;++a)s[a]=i[a](o);return s}}function tx(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function hn(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function ex(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=vh(t[i],e[i]):n[i]=e[i];return function(s){for(i in r)n[i]=r[i](s);return n}}var _h=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xh=new RegExp(_h.source,"g");function rx(t){return function(){return t}}function nx(t){return function(e){return t(e)+""}}function Lf(t,e){var r=_h.lastIndex=xh.lastIndex=0,n,i,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(n=_h.exec(t))&&(i=xh.exec(e));)(s=i.index)>r&&(s=e.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(n=n[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:hn(n,i)})),r=xh.lastIndex;return r<e.length&&(s=e.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?nx(l[0].x):rx(e):(e=l.length,function(u){for(var d=0,f;d<e;++d)o[(f=l[d]).i]=f.x(u);return o.join("")})}function vh(t,e){var r=typeof e,n;return e==null||r==="boolean"?kl(e):(r==="number"?hn:r==="string"?(n=rs(e))?(e=n,wl):Lf:e instanceof rs?wl:e instanceof Date?tx:Q_(e)?Z_:Array.isArray(e)?J_:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ex:hn)(t,e)}function ix(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var Df=180/Math.PI,kh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Mf(t,e,r,n,i,s){var a,o,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*Df,skewX:Math.atan(l)*Df,scaleX:a,scaleY:o}}var Tl;function sx(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?kh:Mf(e.a,e.b,e.c,e.d,e.e,e.f)}function ax(t){return t==null||(Tl||(Tl=document.createElementNS("http://www.w3.org/2000/svg","g")),Tl.setAttribute("transform",t),!(t=Tl.transform.baseVal.consolidate()))?kh:(t=t.matrix,Mf(t.a,t.b,t.c,t.d,t.e,t.f))}function Nf(t,e,r,n){function i(u){return u.length?u.pop()+" ":""}function s(u,d,f,p,g,b){if(u!==f||d!==p){var k=g.push("translate(",null,e,null,r);b.push({i:k-4,x:hn(u,f)},{i:k-2,x:hn(d,p)})}else(f||p)&&g.push("translate("+f+e+p+r)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(i(f)+"rotate(",null,n)-2,x:hn(u,d)})):d&&f.push(i(f)+"rotate("+d+n)}function o(u,d,f,p){u!==d?p.push({i:f.push(i(f)+"skewX(",null,n)-2,x:hn(u,d)}):d&&f.push(i(f)+"skewX("+d+n)}function l(u,d,f,p,g,b){if(u!==f||d!==p){var k=g.push(i(g)+"scale(",null,",",null,")");b.push({i:k-4,x:hn(u,f)},{i:k-2,x:hn(d,p)})}else(f!==1||p!==1)&&g.push(i(g)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=t(u),d=t(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),o(u.skewX,d.skewX,f,p),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(g){for(var b=-1,k=p.length,T;++b<k;)f[(T=p[b]).i]=T.x(g);return f.join("")}}}var ox=Nf(sx,"px, ","px)","deg)"),lx=Nf(ax,", ",")",")");function cx(t){return function(e,r){var n=t((e=bh(e)).h,(r=bh(r)).h),i=ja(e.c,r.c),s=ja(e.l,r.l),a=ja(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=i(o),e.l=s(o),e.opacity=a(o),e+""}}}const ux=cx(X_);var Ws=0,$a=0,Xa=0,Bf=1e3,El,Ka,Cl=0,ss=0,Sl=0,Za=typeof performance=="object"&&performance.now?performance:Date,If=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wh(){return ss||(If(hx),ss=Za.now()+Sl)}function hx(){ss=0}function Al(){this._call=this._time=this._next=null}Al.prototype=Of.prototype={constructor:Al,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?wh():+r)+(e==null?0:+e),!this._next&&Ka!==this&&(Ka?Ka._next=this:El=this,Ka=this),this._call=t,this._time=r,Th()},stop:function(){this._call&&(this._call=null,this._time=1/0,Th())}};function Of(t,e,r){var n=new Al;return n.restart(t,e,r),n}function dx(){wh(),++Ws;for(var t=El,e;t;)(e=ss-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ws}function Rf(){ss=(Cl=Za.now())+Sl,Ws=$a=0;try{dx()}finally{Ws=0,px(),ss=0}}function fx(){var t=Za.now(),e=t-Cl;e>Bf&&(Sl-=e,Cl=t)}function px(){for(var t,e=El,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:El=r);Ka=t,Th(n)}function Th(t){if(!Ws){$a&&($a=clearTimeout($a));var e=t-ss;e>24?(t<1/0&&($a=setTimeout(Rf,t-Za.now()-Sl)),Xa&&(Xa=clearInterval(Xa))):(Xa||(Cl=Za.now(),Xa=setInterval(fx,Bf)),Ws=1,If(Rf))}}function Ff(t,e,r){var n=new Al;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var gx=Xd("start","end","cancel","interrupt"),yx=[],Pf=0,Yf=1,Eh=2,Ll=3,Vf=4,Ch=5,Dl=6;function Ml(t,e,r,n,i,s){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;mx(t,r,{name:e,index:n,group:i,on:gx,tween:yx,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Pf})}function Sh(t,e){var r=dn(t,e);if(r.state>Pf)throw new Error("too late; already scheduled");return r}function Pn(t,e){var r=dn(t,e);if(r.state>Ll)throw new Error("too late; already running");return r}function dn(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function mx(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=Of(s,0,r.time);function s(u){r.state=Yf,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,p,g;if(r.state!==Yf)return l();for(d in n)if(g=n[d],g.name===r.name){if(g.state===Ll)return Ff(a);g.state===Vf?(g.state=Dl,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete n[d]):+d<e&&(g.state=Dl,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete n[d])}if(Ff(function(){r.state===Ll&&(r.state=Vf,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=Eh,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Eh){for(r.state=Ll,i=new Array(p=r.tween.length),d=0,f=-1;d<p;++d)(g=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(i[++f]=g);i.length=f+1}}function o(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=Ch,1),f=-1,p=i.length;++f<p;)i[f].call(t,d);r.state===Ch&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Dl,r.timer.stop(),delete n[e];for(var u in n)return;delete t.__transition}}function bx(t,e){var r=t.__transition,n,i,s=!0,a;if(!!r){e=e==null?null:e+"";for(a in r){if((n=r[a]).name!==e){s=!1;continue}i=n.state>Eh&&n.state<Ch,n.state=Dl,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[a]}s&&delete t.__transition}}function _x(t){return this.each(function(){bx(this,t)})}function xx(t,e){var r,n;return function(){var i=Pn(this,t),s=i.tween;if(s!==r){n=r=s;for(var a=0,o=n.length;a<o;++a)if(n[a].name===e){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function vx(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var s=Pn(this,t),a=s.tween;if(a!==n){i=(n=a).slice();for(var o={name:e,value:r},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=o;break}l===u&&i.push(o)}s.tween=i}}function kx(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=dn(this.node(),r).tween,i=0,s=n.length,a;i<s;++i)if((a=n[i]).name===t)return a.value;return null}return this.each((e==null?xx:vx)(r,t,e))}function Ah(t,e,r){var n=t._id;return t.each(function(){var i=Pn(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return dn(i,n).value[e]}}function Uf(t,e){var r;return(typeof e=="number"?hn:e instanceof rs?wl:(r=rs(e))?(e=r,wl):Lf)(t,e)}function wx(t){return function(){this.removeAttribute(t)}}function Tx(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ex(t,e,r){var n,i=r+"",s;return function(){var a=this.getAttribute(t);return a===i?null:a===n?s:s=e(n=a,r)}}function Cx(t,e,r){var n,i=r+"",s;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===n?s:s=e(n=a,r)}}function Sx(t,e,r){var n,i,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=o+"",a===l?null:a===n&&l===i?s:(i=l,s=e(n=a,o)))}}function Ax(t,e,r){var n,i,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=o+"",a===l?null:a===n&&l===i?s:(i=l,s=e(n=a,o)))}}function Lx(t,e){var r=pl(t),n=r==="transform"?lx:Uf;return this.attrTween(t,typeof e=="function"?(r.local?Ax:Sx)(r,n,Ah(this,"attr."+t,e)):e==null?(r.local?Tx:wx)(r):(r.local?Cx:Ex)(r,n,e))}function Dx(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function Mx(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Nx(t,e){var r,n;function i(){var s=e.apply(this,arguments);return s!==n&&(r=(n=s)&&Mx(t,s)),r}return i._value=e,i}function Bx(t,e){var r,n;function i(){var s=e.apply(this,arguments);return s!==n&&(r=(n=s)&&Dx(t,s)),r}return i._value=e,i}function Ix(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=pl(t);return this.tween(r,(n.local?Nx:Bx)(n,e))}function Ox(t,e){return function(){Sh(this,t).delay=+e.apply(this,arguments)}}function Rx(t,e){return e=+e,function(){Sh(this,t).delay=e}}function Fx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ox:Rx)(e,t)):dn(this.node(),e).delay}function Px(t,e){return function(){Pn(this,t).duration=+e.apply(this,arguments)}}function Yx(t,e){return e=+e,function(){Pn(this,t).duration=e}}function Vx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Px:Yx)(e,t)):dn(this.node(),e).duration}function Ux(t,e){if(typeof e!="function")throw new Error;return function(){Pn(this,t).ease=e}}function zx(t){var e=this._id;return arguments.length?this.each(Ux(e,t)):dn(this.node(),e).ease}function Wx(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Pn(this,t).ease=r}}function Hx(t){if(typeof t!="function")throw new Error;return this.each(Wx(this._id,t))}function Gx(t){typeof t!="function"&&(t=ef(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var s=e[i],a=s.length,o=n[i]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new ri(n,this._parents,this._name,this._id)}function qx(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,s=Math.min(n,i),a=new Array(n),o=0;o<s;++o)for(var l=e[o],u=r[o],d=l.length,f=a[o]=new Array(d),p,g=0;g<d;++g)(p=l[g]||u[g])&&(f[g]=p);for(;o<n;++o)a[o]=e[o];return new ri(a,this._parents,this._name,this._id)}function jx(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function $x(t,e,r){var n,i,s=jx(e)?Sh:Pn;return function(){var a=s(this,t),o=a.on;o!==n&&(i=(n=o).copy()).on(e,r),a.on=i}}function Xx(t,e){var r=this._id;return arguments.length<2?dn(this.node(),r).on.on(t):this.each($x(r,t,e))}function Kx(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Zx(){return this.on("end.remove",Kx(this._id))}function Qx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=lh(t));for(var n=this._groups,i=n.length,s=new Array(i),a=0;a<i;++a)for(var o=n[a],l=o.length,u=s[a]=new Array(l),d,f,p=0;p<l;++p)(d=o[p])&&(f=t.call(d,d.__data__,p,o))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,Ml(u[p],e,r,p,u,dn(d,r)));return new ri(s,this._parents,e,r)}function Jx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=tf(t));for(var n=this._groups,i=n.length,s=[],a=[],o=0;o<i;++o)for(var l=n[o],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=t.call(d,d.__data__,f,l),g,b=dn(d,r),k=0,T=p.length;k<T;++k)(g=p[k])&&Ml(g,e,r,k,p,b);s.push(p),a.push(d)}return new ri(s,a,e,r)}var t6=Wa.prototype.constructor;function e6(){return new t6(this._groups,this._parents)}function r6(t,e){var r,n,i;return function(){var s=Vs(this,t),a=(this.style.removeProperty(t),Vs(this,t));return s===a?null:s===r&&a===n?i:i=e(r=s,n=a)}}function zf(t){return function(){this.style.removeProperty(t)}}function n6(t,e,r){var n,i=r+"",s;return function(){var a=Vs(this,t);return a===i?null:a===n?s:s=e(n=a,r)}}function i6(t,e,r){var n,i,s;return function(){var a=Vs(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),Vs(this,t))),a===l?null:a===n&&l===i?s:(i=l,s=e(n=a,o))}}function s6(t,e){var r,n,i,s="style."+e,a="end."+s,o;return function(){var l=Pn(this,t),u=l.on,d=l.value[s]==null?o||(o=zf(e)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),l.on=n}}function a6(t,e,r){var n=(t+="")=="transform"?ox:Uf;return e==null?this.styleTween(t,r6(t,n)).on("end.style."+t,zf(t)):typeof e=="function"?this.styleTween(t,i6(t,n,Ah(this,"style."+t,e))).each(s6(this._id,t)):this.styleTween(t,n6(t,n,e),r).on("end.style."+t,null)}function o6(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function l6(t,e,r){var n,i;function s(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&o6(t,a,r)),n}return s._value=e,s}function c6(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,l6(t,e,r==null?"":r))}function u6(t){return function(){this.textContent=t}}function h6(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function d6(t){return this.tween("text",typeof t=="function"?h6(Ah(this,"text",t)):u6(t==null?"":t+""))}function f6(t){return function(e){this.textContent=t.call(this,e)}}function p6(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&f6(i)),e}return n._value=t,n}function g6(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,p6(t))}function y6(){for(var t=this._name,e=this._id,r=Wf(),n=this._groups,i=n.length,s=0;s<i;++s)for(var a=n[s],o=a.length,l,u=0;u<o;++u)if(l=a[u]){var d=dn(l,e);Ml(l,t,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ri(n,this._parents,t,r)}function m6(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};r.each(function(){var u=Pn(this,n),d=u.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),i===0&&s()})}var b6=0;function ri(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Wf(){return++b6}var ni=Wa.prototype;ri.prototype={constructor:ri,select:Qx,selectAll:Jx,selectChild:ni.selectChild,selectChildren:ni.selectChildren,filter:Gx,merge:qx,selection:e6,transition:y6,call:ni.call,nodes:ni.nodes,node:ni.node,size:ni.size,empty:ni.empty,each:ni.each,on:Xx,attr:Lx,attrTween:Ix,style:a6,styleTween:c6,text:d6,textTween:g6,remove:Zx,tween:kx,delay:Fx,duration:Vx,ease:zx,easeVarying:Hx,end:m6,[Symbol.iterator]:ni[Symbol.iterator]};function _6(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var x6={time:null,delay:0,duration:250,ease:_6};function v6(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function k6(t){var e,r;t instanceof ri?(e=t._id,t=t._name):(e=Wf(),(r=x6).time=wh(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,s=0;s<i;++s)for(var a=n[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&Ml(l,t,e,u,a,r||v6(l,e));return new ri(n,this._parents,t,e)}Wa.prototype.interrupt=_x,Wa.prototype.transition=k6;const Lh=Math.PI,Dh=2*Lh,as=1e-6,w6=Dh-as;function Mh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Nh(){return new Mh}Mh.prototype=Nh.prototype={constructor:Mh,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,s){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+s)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var s=this._x1,a=this._y1,o=r-t,l=n-e,u=s-t,d=a-e,f=u*u+d*d;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>as)if(!(Math.abs(d*o-l*u)>as)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var p=r-s,g=n-a,b=o*o+l*l,k=p*p+g*g,T=Math.sqrt(b),L=Math.sqrt(f),E=i*Math.tan((Lh-Math.acos((b+f-k)/(2*T*L)))/2),I=E/L,V=E/T;Math.abs(I-1)>as&&(this._+="L"+(t+I*u)+","+(e+I*d)),this._+="A"+i+","+i+",0,0,"+ +(d*p>u*g)+","+(this._x1=t+V*o)+","+(this._y1=e+V*l)}},arc:function(t,e,r,n,i,s){t=+t,e=+e,r=+r,s=!!s;var a=r*Math.cos(n),o=r*Math.sin(n),l=t+a,u=e+o,d=1^s,f=s?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>as||Math.abs(this._y1-u)>as)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%Dh+Dh),f>w6?this._+="A"+r+","+r+",0,1,"+d+","+(t-a)+","+(e-o)+"A"+r+","+r+",0,1,"+d+","+(this._x1=l)+","+(this._y1=u):f>as&&(this._+="A"+r+","+r+",0,"+ +(f>=Lh)+","+d+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function T6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function E6(t,e){return fetch(t,e).then(T6)}function C6(t){return(e,r)=>E6(e,r).then(n=>new DOMParser().parseFromString(n,t))}var S6=C6("image/svg+xml");function A6(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Nl(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Hs(t){return t=Nl(Math.abs(t)),t?t[1]:NaN}function L6(t,e){return function(r,n){for(var i=r.length,s=[],a=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),s.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[a=(a+1)%t.length];return s.reverse().join(e)}}function D6(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var M6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bl(t){if(!(e=M6.exec(t)))throw new Error("invalid format: "+t);var e;return new Bh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Bl.prototype=Bh.prototype;function Bh(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Bh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function N6(t){t:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break t;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var Hf;function B6(t,e){var r=Nl(t,e);if(!r)return t+"";var n=r[0],i=r[1],s=i-(Hf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return s===a?n:s>a?n+new Array(s-a+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+Nl(t,Math.max(0,e+s-1))[0]}function Gf(t,e){var r=Nl(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const qf={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:A6,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Gf(t*100,e),r:Gf,s:B6,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function jf(t){return t}var $f=Array.prototype.map,Xf=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function I6(t){var e=t.grouping===void 0||t.thousands===void 0?jf:L6($f.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?jf:D6($f.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=Bl(f);var p=f.fill,g=f.align,b=f.sign,k=f.symbol,T=f.zero,L=f.width,E=f.comma,I=f.precision,V=f.trim,H=f.type;H==="n"?(E=!0,H="g"):qf[H]||(I===void 0&&(I=12),V=!0,H="g"),(T||p==="0"&&g==="=")&&(T=!0,p="0",g="=");var G=k==="$"?r:k==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():"",Y=k==="$"?n:/[%p]/.test(H)?a:"",W=qf[H],N=/[defgprs%]/.test(H);I=I===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,I)):Math.max(0,Math.min(20,I));function D(w){var v=G,M=Y,m,Q,x;if(H==="c")M=W(w)+M,w="";else{w=+w;var ct=w<0||1/w<0;if(w=isNaN(w)?l:W(Math.abs(w),I),V&&(w=N6(w)),ct&&+w==0&&b!=="+"&&(ct=!1),v=(ct?b==="("?b:o:b==="-"||b==="("?"":b)+v,M=(H==="s"?Xf[8+Hf/3]:"")+M+(ct&&b==="("?")":""),N){for(m=-1,Q=w.length;++m<Q;)if(x=w.charCodeAt(m),48>x||x>57){M=(x===46?i+w.slice(m+1):w.slice(m))+M,w=w.slice(0,m);break}}}E&&!T&&(w=e(w,1/0));var Dt=v.length+w.length+M.length,kt=Dt<L?new Array(L-Dt+1).join(p):"";switch(E&&T&&(w=e(kt+w,kt.length?L-M.length:1/0),kt=""),g){case"<":w=v+w+M+kt;break;case"=":w=v+kt+w+M;break;case"^":w=kt.slice(0,Dt=kt.length>>1)+v+w+M+kt.slice(Dt);break;default:w=kt+v+w+M;break}return s(w)}return D.toString=function(){return f+""},D}function d(f,p){var g=u((f=Bl(f),f.type="f",f)),b=Math.max(-8,Math.min(8,Math.floor(Hs(p)/3)))*3,k=Math.pow(10,-b),T=Xf[8+b/3];return function(L){return g(k*L)+T}}return{format:u,formatPrefix:d}}var Il,Kf,Zf;O6({thousands:",",grouping:[3],currency:["$",""]});function O6(t){return Il=I6(t),Kf=Il.format,Zf=Il.formatPrefix,Il}function R6(t){return Math.max(0,-Hs(Math.abs(t)))}function F6(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hs(e)/3)))*3-Hs(Math.abs(t)))}function P6(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hs(e)-Hs(t))+1}function Ih(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Qf=Symbol("implicit");function Jf(){var t=new Hd,e=[],r=[],n=Qf;function i(s){let a=t.get(s);if(a===void 0){if(n!==Qf)return n;t.set(s,a=e.push(s)-1)}return r[a%r.length]}return i.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new Hd;for(const a of s)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return Jf(e,r).unknown(n)},Ih.apply(i,arguments),i}function Y6(t){return function(){return t}}function V6(t){return+t}var t2=[0,1];function Gs(t){return t}function Oh(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Y6(isNaN(e)?NaN:.5)}function U6(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function z6(t,e,r){var n=t[0],i=t[1],s=e[0],a=e[1];return i<n?(n=Oh(i,n),s=r(a,s)):(n=Oh(n,i),s=r(s,a)),function(o){return s(n(o))}}function W6(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),s=new Array(n),a=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<n;)i[a]=Oh(t[a],t[a+1]),s[a]=r(e[a],e[a+1]);return function(o){var l=Fb(t,o,1,n)-1;return s[l](i[l](o))}}function e2(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function H6(){var t=t2,e=t2,r=vh,n,i,s,a=Gs,o,l,u;function d(){var p=Math.min(t.length,e.length);return a!==Gs&&(a=U6(t[0],t[p-1])),o=p>2?W6:z6,l=u=null,f}function f(p){return p==null||isNaN(p=+p)?s:(l||(l=o(t.map(n),e,r)))(n(a(p)))}return f.invert=function(p){return a(i((u||(u=o(e,t.map(n),hn)))(p)))},f.domain=function(p){return arguments.length?(t=Array.from(p,V6),d()):t.slice()},f.range=function(p){return arguments.length?(e=Array.from(p),d()):e.slice()},f.rangeRound=function(p){return e=Array.from(p),r=ix,d()},f.clamp=function(p){return arguments.length?(a=p?!0:Gs,d()):a!==Gs},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(s=p,f):s},function(p,g){return n=p,i=g,d()}}function r2(){return H6()(Gs,Gs)}function G6(t,e,r,n){var i=ih(t,e,r),s;switch(n=Bl(n==null?",f":n),n.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(s=F6(i,a))&&(n.precision=s),Zf(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=P6(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=R6(i))&&(n.precision=s-(n.type==="%")*2);break}}return Kf(n)}function q6(t){var e=t.domain;return t.ticks=function(r){var n=e();return Ub(n[0],n[n.length-1],r==null?10:r)},t.tickFormat=function(r,n){var i=e();return G6(i[0],i[i.length-1],r==null?10:r,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,s=n.length-1,a=n[i],o=n[s],l,u,d=10;for(o<a&&(u=a,a=o,o=u,u=i,i=s,s=u);d-- >0;){if(u=qd(a,o,r),u===l)return n[i]=a,n[s]=o,e(n);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function n2(){var t=r2();return t.copy=function(){return e2(t,n2())},Ih.apply(t,arguments),q6(t)}function j6(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],s=t[n],a;return s<i&&(a=r,r=n,n=a,a=i,i=s,s=a),t[r]=e.floor(i),t[n]=e.ceil(s),t}var Rh=new Date,Fh=new Date;function dr(t,e,r,n){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=function(s){return t(s=new Date(+s)),s},i.ceil=function(s){return t(s=new Date(s-1)),e(s,1),t(s),s},i.round=function(s){var a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=function(s,a){return e(s=new Date(+s),a==null?1:Math.floor(a)),s},i.range=function(s,a,o){var l=[],u;if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;do l.push(u=new Date(+s)),e(s,o),t(s);while(u<s&&s<a);return l},i.filter=function(s){return dr(function(a){if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},function(a,o){if(a>=a)if(o<0)for(;++o<=0;)for(;e(a,-1),!s(a););else for(;--o>=0;)for(;e(a,1),!s(a););})},r&&(i.count=function(s,a){return Rh.setTime(+s),Fh.setTime(+a),t(Rh),t(Fh),Math.floor(r(Rh,Fh))},i.every=function(s){return s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(n?function(a){return n(a)%s===0}:function(a){return i.count(0,a)%s===0}):i}),i}var Ol=dr(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});Ol.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dr(function(e){e.setTime(Math.floor(e/t)*t)},function(e,r){e.setTime(+e+r*t)},function(e,r){return(r-e)/t}):Ol};const $6=Ol;Ol.range;const ii=1e3,Jr=ii*60,si=Jr*60,os=si*24,Ph=os*7,i2=os*30,Yh=os*365;var s2=dr(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*ii)},function(t,e){return(e-t)/ii},function(t){return t.getUTCSeconds()});const Qa=s2;s2.range;var a2=dr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ii)},function(t,e){t.setTime(+t+e*Jr)},function(t,e){return(e-t)/Jr},function(t){return t.getMinutes()});const Rl=a2;a2.range;var o2=dr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ii-t.getMinutes()*Jr)},function(t,e){t.setTime(+t+e*si)},function(t,e){return(e-t)/si},function(t){return t.getHours()});const Fl=o2;o2.range;var l2=dr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Jr)/os,t=>t.getDate()-1);const qs=l2;l2.range;function ls(t){return dr(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(e,r){e.setDate(e.getDate()+r*7)},function(e,r){return(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Jr)/Ph})}var js=ls(0),Pl=ls(1),X6=ls(2),K6=ls(3),$s=ls(4),Z6=ls(5),Q6=ls(6);js.range,Pl.range,X6.range,K6.range,$s.range,Z6.range,Q6.range;var c2=dr(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()});const Yl=c2;c2.range;var Vh=dr(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Vh.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:dr(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,r){e.setFullYear(e.getFullYear()+r*t)})};const cs=Vh;Vh.range;var u2=dr(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*Jr)},function(t,e){return(e-t)/Jr},function(t){return t.getUTCMinutes()});const J6=u2;u2.range;var h2=dr(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*si)},function(t,e){return(e-t)/si},function(t){return t.getUTCHours()});const tv=h2;h2.range;var d2=dr(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/os},function(t){return t.getUTCDate()-1});const Uh=d2;d2.range;function us(t){return dr(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCDate(e.getUTCDate()+r*7)},function(e,r){return(r-e)/Ph})}var zh=us(0),Vl=us(1),ev=us(2),rv=us(3),Xs=us(4),nv=us(5),iv=us(6);zh.range,Vl.range,ev.range,rv.range,Xs.range,nv.range,iv.range;var f2=dr(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()});const sv=f2;f2.range;var Wh=dr(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Wh.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:dr(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})};const Ks=Wh;Wh.range;function p2(t,e,r,n,i,s){const a=[[Qa,1,ii],[Qa,5,5*ii],[Qa,15,15*ii],[Qa,30,30*ii],[s,1,Jr],[s,5,5*Jr],[s,15,15*Jr],[s,30,30*Jr],[i,1,si],[i,3,3*si],[i,6,6*si],[i,12,12*si],[n,1,os],[n,2,2*os],[r,1,Ph],[e,1,i2],[e,3,3*i2],[t,1,Yh]];function o(u,d,f){const p=d<u;p&&([u,d]=[d,u]);const g=f&&typeof f.range=="function"?f:l(u,d,f),b=g?g.range(u,+d+1):[];return p?b.reverse():b}function l(u,d,f){const p=Math.abs(d-u)/f,g=th(([,,T])=>T).right(a,p);if(g===a.length)return t.every(ih(u/Yh,d/Yh,f));if(g===0)return $6.every(Math.max(ih(u,d,f),1));const[b,k]=a[p/a[g-1][2]<a[g][2]/p?g-1:g];return b.every(k)}return[o,l]}p2(Ks,sv,zh,Uh,tv,J6);const[av,ov]=p2(cs,Yl,js,qs,Fl,Rl);function Hh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Gh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ja(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function lv(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,s=t.days,a=t.shortDays,o=t.months,l=t.shortMonths,u=to(i),d=eo(i),f=to(s),p=eo(s),g=to(a),b=eo(a),k=to(o),T=eo(o),L=to(l),E=eo(l),I={a:ct,A:Dt,b:kt,B:j,c:null,d:x2,e:x2,f:Mv,g:Uv,G:Wv,H:Av,I:Lv,j:Dv,L:v2,m:Nv,M:Bv,p:ot,q:rt,Q:S2,s:A2,S:Iv,u:Ov,U:Rv,V:Fv,w:Pv,W:Yv,x:null,X:null,y:Vv,Y:zv,Z:Hv,"%":C2},V={a:nt,A:ut,b:_t,B:K,c:null,d:w2,e:w2,f:$v,g:ik,G:ak,H:Gv,I:qv,j:jv,L:T2,m:Xv,M:Kv,p:Ot,q:P,Q:S2,s:A2,S:Zv,u:Qv,U:Jv,V:tk,w:ek,W:rk,x:null,X:null,y:nk,Y:sk,Z:ok,"%":C2},H={a:D,A:w,b:v,B:M,c:m,d:b2,e:b2,f:Tv,g:m2,G:y2,H:_2,I:_2,j:xv,L:wv,m:_v,M:vv,p:N,q:bv,Q:Cv,s:Sv,S:kv,u:fv,U:pv,V:gv,w:dv,W:yv,x:Q,X:x,y:m2,Y:y2,Z:mv,"%":Ev};I.x=G(r,I),I.X=G(n,I),I.c=G(e,I),V.x=G(r,V),V.X=G(n,V),V.c=G(e,V);function G(z,X){return function(F){var O=[],A=-1,J=0,C=z.length,ht,U,Yt;for(F instanceof Date||(F=new Date(+F));++A<C;)z.charCodeAt(A)===37&&(O.push(z.slice(J,A)),(U=g2[ht=z.charAt(++A)])!=null?ht=z.charAt(++A):U=ht==="e"?" ":"0",(Yt=X[ht])&&(ht=Yt(F,U)),O.push(ht),J=A+1);return O.push(z.slice(J,A)),O.join("")}}function Y(z,X){return function(F){var O=Ja(1900,void 0,1),A=W(O,z,F+="",0),J,C;if(A!=F.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(X&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(J=Gh(Ja(O.y,0,1)),C=J.getUTCDay(),J=C>4||C===0?Vl.ceil(J):Vl(J),J=Uh.offset(J,(O.V-1)*7),O.y=J.getUTCFullYear(),O.m=J.getUTCMonth(),O.d=J.getUTCDate()+(O.w+6)%7):(J=Hh(Ja(O.y,0,1)),C=J.getDay(),J=C>4||C===0?Pl.ceil(J):Pl(J),J=qs.offset(J,(O.V-1)*7),O.y=J.getFullYear(),O.m=J.getMonth(),O.d=J.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),C="Z"in O?Gh(Ja(O.y,0,1)).getUTCDay():Hh(Ja(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(C+5)%7:O.w+O.U*7-(C+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Gh(O)):Hh(O)}}function W(z,X,F,O){for(var A=0,J=X.length,C=F.length,ht,U;A<J;){if(O>=C)return-1;if(ht=X.charCodeAt(A++),ht===37){if(ht=X.charAt(A++),U=H[ht in g2?X.charAt(A++):ht],!U||(O=U(z,F,O))<0)return-1}else if(ht!=F.charCodeAt(O++))return-1}return O}function N(z,X,F){var O=u.exec(X.slice(F));return O?(z.p=d.get(O[0].toLowerCase()),F+O[0].length):-1}function D(z,X,F){var O=g.exec(X.slice(F));return O?(z.w=b.get(O[0].toLowerCase()),F+O[0].length):-1}function w(z,X,F){var O=f.exec(X.slice(F));return O?(z.w=p.get(O[0].toLowerCase()),F+O[0].length):-1}function v(z,X,F){var O=L.exec(X.slice(F));return O?(z.m=E.get(O[0].toLowerCase()),F+O[0].length):-1}function M(z,X,F){var O=k.exec(X.slice(F));return O?(z.m=T.get(O[0].toLowerCase()),F+O[0].length):-1}function m(z,X,F){return W(z,e,X,F)}function Q(z,X,F){return W(z,r,X,F)}function x(z,X,F){return W(z,n,X,F)}function ct(z){return a[z.getDay()]}function Dt(z){return s[z.getDay()]}function kt(z){return l[z.getMonth()]}function j(z){return o[z.getMonth()]}function ot(z){return i[+(z.getHours()>=12)]}function rt(z){return 1+~~(z.getMonth()/3)}function nt(z){return a[z.getUTCDay()]}function ut(z){return s[z.getUTCDay()]}function _t(z){return l[z.getUTCMonth()]}function K(z){return o[z.getUTCMonth()]}function Ot(z){return i[+(z.getUTCHours()>=12)]}function P(z){return 1+~~(z.getUTCMonth()/3)}return{format:function(z){var X=G(z+="",I);return X.toString=function(){return z},X},parse:function(z){var X=Y(z+="",!1);return X.toString=function(){return z},X},utcFormat:function(z){var X=G(z+="",V);return X.toString=function(){return z},X},utcParse:function(z){var X=Y(z+="",!0);return X.toString=function(){return z},X}}}var g2={"-":"",_:" ",0:"0"},fr=/^\s*\d+/,cv=/^%/,uv=/[\\^$*+?|[\]().{}]/g;function Ae(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",s=i.length;return n+(s<r?new Array(r-s+1).join(e)+i:i)}function hv(t){return t.replace(uv,"\\$&")}function to(t){return new RegExp("^(?:"+t.map(hv).join("|")+")","i")}function eo(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function dv(t,e,r){var n=fr.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function fv(t,e,r){var n=fr.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function pv(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function gv(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function yv(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function y2(t,e,r){var n=fr.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function m2(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function mv(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function bv(t,e,r){var n=fr.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function _v(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function b2(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function xv(t,e,r){var n=fr.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function _2(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function vv(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function kv(t,e,r){var n=fr.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function wv(t,e,r){var n=fr.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Tv(t,e,r){var n=fr.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Ev(t,e,r){var n=cv.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Cv(t,e,r){var n=fr.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Sv(t,e,r){var n=fr.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function x2(t,e){return Ae(t.getDate(),e,2)}function Av(t,e){return Ae(t.getHours(),e,2)}function Lv(t,e){return Ae(t.getHours()%12||12,e,2)}function Dv(t,e){return Ae(1+qs.count(cs(t),t),e,3)}function v2(t,e){return Ae(t.getMilliseconds(),e,3)}function Mv(t,e){return v2(t,e)+"000"}function Nv(t,e){return Ae(t.getMonth()+1,e,2)}function Bv(t,e){return Ae(t.getMinutes(),e,2)}function Iv(t,e){return Ae(t.getSeconds(),e,2)}function Ov(t){var e=t.getDay();return e===0?7:e}function Rv(t,e){return Ae(js.count(cs(t)-1,t),e,2)}function k2(t){var e=t.getDay();return e>=4||e===0?$s(t):$s.ceil(t)}function Fv(t,e){return t=k2(t),Ae($s.count(cs(t),t)+(cs(t).getDay()===4),e,2)}function Pv(t){return t.getDay()}function Yv(t,e){return Ae(Pl.count(cs(t)-1,t),e,2)}function Vv(t,e){return Ae(t.getFullYear()%100,e,2)}function Uv(t,e){return t=k2(t),Ae(t.getFullYear()%100,e,2)}function zv(t,e){return Ae(t.getFullYear()%1e4,e,4)}function Wv(t,e){var r=t.getDay();return t=r>=4||r===0?$s(t):$s.ceil(t),Ae(t.getFullYear()%1e4,e,4)}function Hv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ae(e/60|0,"0",2)+Ae(e%60,"0",2)}function w2(t,e){return Ae(t.getUTCDate(),e,2)}function Gv(t,e){return Ae(t.getUTCHours(),e,2)}function qv(t,e){return Ae(t.getUTCHours()%12||12,e,2)}function jv(t,e){return Ae(1+Uh.count(Ks(t),t),e,3)}function T2(t,e){return Ae(t.getUTCMilliseconds(),e,3)}function $v(t,e){return T2(t,e)+"000"}function Xv(t,e){return Ae(t.getUTCMonth()+1,e,2)}function Kv(t,e){return Ae(t.getUTCMinutes(),e,2)}function Zv(t,e){return Ae(t.getUTCSeconds(),e,2)}function Qv(t){var e=t.getUTCDay();return e===0?7:e}function Jv(t,e){return Ae(zh.count(Ks(t)-1,t),e,2)}function E2(t){var e=t.getUTCDay();return e>=4||e===0?Xs(t):Xs.ceil(t)}function tk(t,e){return t=E2(t),Ae(Xs.count(Ks(t),t)+(Ks(t).getUTCDay()===4),e,2)}function ek(t){return t.getUTCDay()}function rk(t,e){return Ae(Vl.count(Ks(t)-1,t),e,2)}function nk(t,e){return Ae(t.getUTCFullYear()%100,e,2)}function ik(t,e){return t=E2(t),Ae(t.getUTCFullYear()%100,e,2)}function sk(t,e){return Ae(t.getUTCFullYear()%1e4,e,4)}function ak(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Xs(t):Xs.ceil(t),Ae(t.getUTCFullYear()%1e4,e,4)}function ok(){return"+0000"}function C2(){return"%"}function S2(t){return+t}function A2(t){return Math.floor(+t/1e3)}var Zs,Ul;lk({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function lk(t){return Zs=lv(t),Ul=Zs.format,Zs.parse,Zs.utcFormat,Zs.utcParse,Zs}function ck(t){return new Date(t)}function uk(t){return t instanceof Date?+t:+new Date(+t)}function L2(t,e,r,n,i,s,a,o,l,u){var d=r2(),f=d.invert,p=d.domain,g=u(".%L"),b=u(":%S"),k=u("%I:%M"),T=u("%I %p"),L=u("%a %d"),E=u("%b %d"),I=u("%B"),V=u("%Y");function H(G){return(l(G)<G?g:o(G)<G?b:a(G)<G?k:s(G)<G?T:n(G)<G?i(G)<G?L:E:r(G)<G?I:V)(G)}return d.invert=function(G){return new Date(f(G))},d.domain=function(G){return arguments.length?p(Array.from(G,uk)):p().map(ck)},d.ticks=function(G){var Y=p();return t(Y[0],Y[Y.length-1],G==null?10:G)},d.tickFormat=function(G,Y){return Y==null?H:u(Y)},d.nice=function(G){var Y=p();return(!G||typeof G.range!="function")&&(G=e(Y[0],Y[Y.length-1],G==null?10:G)),G?p(j6(Y,G)):d},d.copy=function(){return e2(d,L2(t,e,r,n,i,s,a,o,l,u))},d}function hk(){return Ih.apply(L2(av,ov,cs,Yl,js,qs,Fl,Rl,Qa,Ul).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Xe(t){return function(){return t}}const D2=Math.abs,kr=Math.atan2,hs=Math.cos,dk=Math.max,qh=Math.min,Yn=Math.sin,Qs=Math.sqrt,Rr=1e-12,ro=Math.PI,zl=ro/2,Wl=2*ro;function fk(t){return t>1?0:t<-1?ro:Math.acos(t)}function M2(t){return t>=1?zl:t<=-1?-zl:Math.asin(t)}function pk(t){return t.innerRadius}function gk(t){return t.outerRadius}function yk(t){return t.startAngle}function mk(t){return t.endAngle}function bk(t){return t&&t.padAngle}function _k(t,e,r,n,i,s,a,o){var l=r-t,u=n-e,d=a-i,f=o-s,p=f*l-d*u;if(!(p*p<Rr))return p=(d*(e-s)-f*(t-i))/p,[t+p*l,e+p*u]}function Hl(t,e,r,n,i,s,a){var o=t-r,l=e-n,u=(a?s:-s)/Qs(o*o+l*l),d=u*l,f=-u*o,p=t+d,g=e+f,b=r+d,k=n+f,T=(p+b)/2,L=(g+k)/2,E=b-p,I=k-g,V=E*E+I*I,H=i-s,G=p*k-b*g,Y=(I<0?-1:1)*Qs(dk(0,H*H*V-G*G)),W=(G*I-E*Y)/V,N=(-G*E-I*Y)/V,D=(G*I+E*Y)/V,w=(-G*E+I*Y)/V,v=W-T,M=N-L,m=D-T,Q=w-L;return v*v+M*M>m*m+Q*Q&&(W=D,N=w),{cx:W,cy:N,x01:-d,y01:-f,x11:W*(i/H-1),y11:N*(i/H-1)}}function jh(){var t=pk,e=gk,r=Xe(0),n=null,i=yk,s=mk,a=bk,o=null;function l(){var u,d,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-zl,b=s.apply(this,arguments)-zl,k=D2(b-g),T=b>g;if(o||(o=u=Nh()),p<f&&(d=p,p=f,f=d),!(p>Rr))o.moveTo(0,0);else if(k>Wl-Rr)o.moveTo(p*hs(g),p*Yn(g)),o.arc(0,0,p,g,b,!T),f>Rr&&(o.moveTo(f*hs(b),f*Yn(b)),o.arc(0,0,f,b,g,T));else{var L=g,E=b,I=g,V=b,H=k,G=k,Y=a.apply(this,arguments)/2,W=Y>Rr&&(n?+n.apply(this,arguments):Qs(f*f+p*p)),N=qh(D2(p-f)/2,+r.apply(this,arguments)),D=N,w=N,v,M;if(W>Rr){var m=M2(W/f*Yn(Y)),Q=M2(W/p*Yn(Y));(H-=m*2)>Rr?(m*=T?1:-1,I+=m,V-=m):(H=0,I=V=(g+b)/2),(G-=Q*2)>Rr?(Q*=T?1:-1,L+=Q,E-=Q):(G=0,L=E=(g+b)/2)}var x=p*hs(L),ct=p*Yn(L),Dt=f*hs(V),kt=f*Yn(V);if(N>Rr){var j=p*hs(E),ot=p*Yn(E),rt=f*hs(I),nt=f*Yn(I),ut;if(k<ro&&(ut=_k(x,ct,rt,nt,j,ot,Dt,kt))){var _t=x-ut[0],K=ct-ut[1],Ot=j-ut[0],P=ot-ut[1],z=1/Yn(fk((_t*Ot+K*P)/(Qs(_t*_t+K*K)*Qs(Ot*Ot+P*P)))/2),X=Qs(ut[0]*ut[0]+ut[1]*ut[1]);D=qh(N,(f-X)/(z-1)),w=qh(N,(p-X)/(z+1))}}G>Rr?w>Rr?(v=Hl(rt,nt,x,ct,p,w,T),M=Hl(j,ot,Dt,kt,p,w,T),o.moveTo(v.cx+v.x01,v.cy+v.y01),w<N?o.arc(v.cx,v.cy,w,kr(v.y01,v.x01),kr(M.y01,M.x01),!T):(o.arc(v.cx,v.cy,w,kr(v.y01,v.x01),kr(v.y11,v.x11),!T),o.arc(0,0,p,kr(v.cy+v.y11,v.cx+v.x11),kr(M.cy+M.y11,M.cx+M.x11),!T),o.arc(M.cx,M.cy,w,kr(M.y11,M.x11),kr(M.y01,M.x01),!T))):(o.moveTo(x,ct),o.arc(0,0,p,L,E,!T)):o.moveTo(x,ct),!(f>Rr)||!(H>Rr)?o.lineTo(Dt,kt):D>Rr?(v=Hl(Dt,kt,j,ot,f,-D,T),M=Hl(x,ct,rt,nt,f,-D,T),o.lineTo(v.cx+v.x01,v.cy+v.y01),D<N?o.arc(v.cx,v.cy,D,kr(v.y01,v.x01),kr(M.y01,M.x01),!T):(o.arc(v.cx,v.cy,D,kr(v.y01,v.x01),kr(v.y11,v.x11),!T),o.arc(0,0,f,kr(v.cy+v.y11,v.cx+v.x11),kr(M.cy+M.y11,M.cx+M.x11),T),o.arc(M.cx,M.cy,D,kr(M.y11,M.x11),kr(M.y01,M.x01),!T))):o.arc(0,0,f,V,I,T)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-ro/2;return[hs(d)*u,Yn(d)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Xe(+u),l):t},l.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Xe(+u),l):e},l.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Xe(+u),l):r},l.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Xe(+u),l):n},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Xe(+u),l):i},l.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Xe(+u),l):s},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Xe(+u),l):a},l.context=function(u){return arguments.length?(o=u==null?null:u,l):o},l}function N2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function B2(t){this._context=t}B2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Hr(t){return new B2(t)}function xk(t){return t[0]}function vk(t){return t[1]}function Js(t,e){var r=Xe(!0),n=null,i=Hr,s=null;t=typeof t=="function"?t:t===void 0?xk:Xe(t),e=typeof e=="function"?e:e===void 0?vk:Xe(e);function a(o){var l,u=(o=N2(o)).length,d,f=!1,p;for(n==null&&(s=i(p=Nh())),l=0;l<=u;++l)!(l<u&&r(d=o[l],l,o))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+t(d,l,o),+e(d,l,o));if(p)return s=null,p+""||null}return a.x=function(o){return arguments.length?(t=typeof o=="function"?o:Xe(+o),a):t},a.y=function(o){return arguments.length?(e=typeof o=="function"?o:Xe(+o),a):e},a.defined=function(o){return arguments.length?(r=typeof o=="function"?o:Xe(!!o),a):r},a.curve=function(o){return arguments.length?(i=o,n!=null&&(s=i(n)),a):i},a.context=function(o){return arguments.length?(o==null?n=s=null:s=i(n=o),a):n},a}function kk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function wk(t){return t}function Tk(){var t=wk,e=kk,r=null,n=Xe(0),i=Xe(Wl),s=Xe(0);function a(o){var l,u=(o=N2(o)).length,d,f,p=0,g=new Array(u),b=new Array(u),k=+n.apply(this,arguments),T=Math.min(Wl,Math.max(-Wl,i.apply(this,arguments)-k)),L,E=Math.min(Math.abs(T)/u,s.apply(this,arguments)),I=E*(T<0?-1:1),V;for(l=0;l<u;++l)(V=b[g[l]=l]=+t(o[l],l,o))>0&&(p+=V);for(e!=null?g.sort(function(H,G){return e(b[H],b[G])}):r!=null&&g.sort(function(H,G){return r(o[H],o[G])}),l=0,f=p?(T-u*I)/p:0;l<u;++l,k=L)d=g[l],V=b[d],L=k+(V>0?V*f:0)+I,b[d]={data:o[d],index:l,value:V,startAngle:k,endAngle:L,padAngle:E};return b}return a.value=function(o){return arguments.length?(t=typeof o=="function"?o:Xe(+o),a):t},a.sortValues=function(o){return arguments.length?(e=o,r=null,a):e},a.sort=function(o){return arguments.length?(r=o,e=null,a):r},a.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Xe(+o),a):n},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Xe(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Xe(+o),a):s},a}function Gl(){}function ql(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function I2(t){this._context=t}I2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ql(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ql(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ta(t){return new I2(t)}function O2(t){this._context=t}O2.prototype={areaStart:Gl,areaEnd:Gl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ql(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ek(t){return new O2(t)}function R2(t){this._context=t}R2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ql(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ck(t){return new R2(t)}function F2(t){this._context=t}F2.prototype={areaStart:Gl,areaEnd:Gl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Sk(t){return new F2(t)}function P2(t){return t<0?-1:1}function Y2(t,e,r){var n=t._x1-t._x0,i=e-t._x1,s=(t._y1-t._y0)/(n||i<0&&-0),a=(r-t._y1)/(i||n<0&&-0),o=(s*i+a*n)/(n+i);return(P2(s)+P2(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function V2(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function $h(t,e,r){var n=t._x0,i=t._y0,s=t._x1,a=t._y1,o=(s-n)/3;t._context.bezierCurveTo(n+o,i+o*e,s-o,a-o*r,s,a)}function jl(t){this._context=t}jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:$h(this,this._t0,V2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,$h(this,V2(this,r=Y2(this,t,e)),r);break;default:$h(this,this._t0,r=Y2(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function U2(t){this._context=new z2(t)}(U2.prototype=Object.create(jl.prototype)).point=function(t,e){jl.prototype.point.call(this,e,t)};function z2(t){this._context=t}z2.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,s){this._context.bezierCurveTo(e,t,n,r,s,i)}};function Ak(t){return new jl(t)}function Lk(t){return new U2(t)}function W2(t){this._context=t}W2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=H2(t),i=H2(e),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(n[0][s],i[0][s],n[1][s],i[1][s],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function H2(t){var e,r=t.length-1,n,i=new Array(r),s=new Array(r),a=new Array(r);for(i[0]=0,s[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,s[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,s[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/s[e-1],s[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/s[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/s[e];for(s[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-i[e+1];return[i,s]}function Dk(t){return new W2(t)}function $l(t,e){this._context=t,this._t=e}$l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function Mk(t){return new $l(t,.5)}function Nk(t){return new $l(t,0)}function Bk(t){return new $l(t,1)}function ea(t,e,r){this.k=t,this.x=e,this.y=r}ea.prototype={constructor:ea,scale:function(t){return t===1?this:new ea(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ea(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new ea(1,0,0),ea.prototype;/*! @license DOMPurify 2.4.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.1/LICENSE */function Ii(t){return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ii(t)}function Xh(t,e){return Xh=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Xh(t,e)}function Ik(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xl(t,e,r){return Ik()?Xl=Reflect.construct:Xl=function(i,s,a){var o=[null];o.push.apply(o,s);var l=Function.bind.apply(i,o),u=new l;return a&&Xh(u,a.prototype),u},Xl.apply(null,arguments)}function fn(t){return Ok(t)||Rk(t)||Fk(t)||Pk()}function Ok(t){if(Array.isArray(t))return Kh(t)}function Rk(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Fk(t,e){if(!!t){if(typeof t=="string")return Kh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kh(t,e)}}function Kh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Pk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Yk=Object.hasOwnProperty,G2=Object.setPrototypeOf,Vk=Object.isFrozen,Uk=Object.getPrototypeOf,zk=Object.getOwnPropertyDescriptor,Lr=Object.freeze,pn=Object.seal,Wk=Object.create,q2=typeof Reflect<"u"&&Reflect,Kl=q2.apply,Zh=q2.construct;Kl||(Kl=function(e,r,n){return e.apply(r,n)}),Lr||(Lr=function(e){return e}),pn||(pn=function(e){return e}),Zh||(Zh=function(e,r){return Xl(e,fn(r))});var Hk=tn(Array.prototype.forEach),j2=tn(Array.prototype.pop),no=tn(Array.prototype.push),Zl=tn(String.prototype.toLowerCase),Qh=tn(String.prototype.toString),Gk=tn(String.prototype.match),gn=tn(String.prototype.replace),qk=tn(String.prototype.indexOf),jk=tn(String.prototype.trim),Dr=tn(RegExp.prototype.test),Jh=$k(TypeError);function tn(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Kl(t,e,n)}}function $k(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Zh(t,r)}}function we(t,e,r){r=r||Zl,G2&&G2(t,null);for(var n=e.length;n--;){var i=e[n];if(typeof i=="string"){var s=r(i);s!==i&&(Vk(e)||(e[n]=s),i=s)}t[i]=!0}return t}function ds(t){var e=Wk(null),r;for(r in t)Kl(Yk,t,[r])&&(e[r]=t[r]);return e}function Ql(t,e){for(;t!==null;){var r=zk(t,e);if(r){if(r.get)return tn(r.get);if(typeof r.value=="function")return tn(r.value)}t=Uk(t)}function n(i){return console.warn("fallback value for",i),null}return n}var $2=Lr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),t1=Lr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),e1=Lr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Xk=Lr(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),r1=Lr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Kk=Lr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),X2=Lr(["#text"]),K2=Lr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),n1=Lr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Z2=Lr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Jl=Lr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Zk=pn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qk=pn(/<%[\w\W]*|[\w\W]*%>/gm),Jk=pn(/\${[\w\W]*}/gm),t8=pn(/^data-[\-\w.\u00B7-\uFFFF]/),e8=pn(/^aria-[\-\w]+$/),r8=pn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),n8=pn(/^(?:\w+script|data):/i),i8=pn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),s8=pn(/^html$/i),a8=function(){return typeof window>"u"?null:window},o8=function(e,r){if(Ii(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(i)&&(n=r.currentScript.getAttribute(i));var s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Q2(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a8(),e=function(Z){return Q2(Z)};if(e.version="2.4.1",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,n=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,o=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,d=u===void 0?t.NamedNodeMap||t.MozNamedAttrMap:u,f=t.HTMLFormElement,p=t.DOMParser,g=t.trustedTypes,b=o.prototype,k=Ql(b,"cloneNode"),T=Ql(b,"nextSibling"),L=Ql(b,"childNodes"),E=Ql(b,"parentNode");if(typeof s=="function"){var I=n.createElement("template");I.content&&I.content.ownerDocument&&(n=I.content.ownerDocument)}var V=o8(g,r),H=V?V.createHTML(""):"",G=n,Y=G.implementation,W=G.createNodeIterator,N=G.createDocumentFragment,D=G.getElementsByTagName,w=r.importNode,v={};try{v=ds(n).documentMode?n.documentMode:{}}catch{}var M={};e.isSupported=typeof E=="function"&&Y&&typeof Y.createHTMLDocument<"u"&&v!==9;var m=Zk,Q=Qk,x=Jk,ct=t8,Dt=e8,kt=n8,j=i8,ot=r8,rt=null,nt=we({},[].concat(fn($2),fn(t1),fn(e1),fn(r1),fn(X2))),ut=null,_t=we({},[].concat(fn(K2),fn(n1),fn(Z2),fn(Jl))),K=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}})),Ot=null,P=null,z=!0,X=!0,F=!1,O=!1,A=!1,J=!1,C=!1,ht=!1,U=!1,Yt=!1,et=!0,Mt=!1,Tt="user-content-",gt=!0,Et=!1,wt={},pt=null,st=we({},["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"]),le=null,Xt=we({},["audio","video","img","source","image","track"]),jt=null,Kt=we({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Ee="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml",Vt=Ht,Ft=!1,xt=null,ft=we({},[Gt,Ee,Ht],Qh),Lt,bt=["application/xhtml+xml","text/html"],Ut="text/html",at,ie=null,dt=n.createElement("form"),ee=function(Z){return Z instanceof RegExp||Z instanceof Function},fe=function(Z){ie&&ie===Z||((!Z||Ii(Z)!=="object")&&(Z={}),Z=ds(Z),Lt=bt.indexOf(Z.PARSER_MEDIA_TYPE)===-1?Lt=Ut:Lt=Z.PARSER_MEDIA_TYPE,at=Lt==="application/xhtml+xml"?Qh:Zl,rt="ALLOWED_TAGS"in Z?we({},Z.ALLOWED_TAGS,at):nt,ut="ALLOWED_ATTR"in Z?we({},Z.ALLOWED_ATTR,at):_t,xt="ALLOWED_NAMESPACES"in Z?we({},Z.ALLOWED_NAMESPACES,Qh):ft,jt="ADD_URI_SAFE_ATTR"in Z?we(ds(Kt),Z.ADD_URI_SAFE_ATTR,at):Kt,le="ADD_DATA_URI_TAGS"in Z?we(ds(Xt),Z.ADD_DATA_URI_TAGS,at):Xt,pt="FORBID_CONTENTS"in Z?we({},Z.FORBID_CONTENTS,at):st,Ot="FORBID_TAGS"in Z?we({},Z.FORBID_TAGS,at):{},P="FORBID_ATTR"in Z?we({},Z.FORBID_ATTR,at):{},wt="USE_PROFILES"in Z?Z.USE_PROFILES:!1,z=Z.ALLOW_ARIA_ATTR!==!1,X=Z.ALLOW_DATA_ATTR!==!1,F=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,O=Z.SAFE_FOR_TEMPLATES||!1,A=Z.WHOLE_DOCUMENT||!1,ht=Z.RETURN_DOM||!1,U=Z.RETURN_DOM_FRAGMENT||!1,Yt=Z.RETURN_TRUSTED_TYPE||!1,C=Z.FORCE_BODY||!1,et=Z.SANITIZE_DOM!==!1,Mt=Z.SANITIZE_NAMED_PROPS||!1,gt=Z.KEEP_CONTENT!==!1,Et=Z.IN_PLACE||!1,ot=Z.ALLOWED_URI_REGEXP||ot,Vt=Z.NAMESPACE||Ht,Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),O&&(X=!1),U&&(ht=!0),wt&&(rt=we({},fn(X2)),ut=[],wt.html===!0&&(we(rt,$2),we(ut,K2)),wt.svg===!0&&(we(rt,t1),we(ut,n1),we(ut,Jl)),wt.svgFilters===!0&&(we(rt,e1),we(ut,n1),we(ut,Jl)),wt.mathMl===!0&&(we(rt,r1),we(ut,Z2),we(ut,Jl))),Z.ADD_TAGS&&(rt===nt&&(rt=ds(rt)),we(rt,Z.ADD_TAGS,at)),Z.ADD_ATTR&&(ut===_t&&(ut=ds(ut)),we(ut,Z.ADD_ATTR,at)),Z.ADD_URI_SAFE_ATTR&&we(jt,Z.ADD_URI_SAFE_ATTR,at),Z.FORBID_CONTENTS&&(pt===st&&(pt=ds(pt)),we(pt,Z.FORBID_CONTENTS,at)),gt&&(rt["#text"]=!0),A&&we(rt,["html","head","body"]),rt.table&&(we(rt,["tbody"]),delete Ot.tbody),Lr&&Lr(Z),ie=Z)},be=we({},["mi","mo","mn","ms","mtext"]),_e=we({},["foreignobject","desc","title","annotation-xml"]),ke=we({},["title","style","font","a","script"]),$t=we({},t1);we($t,e1),we($t,Xk);var se=we({},r1);we(se,Kk);var ye=function(Z){var At=E(Z);(!At||!At.tagName)&&(At={namespaceURI:Vt,tagName:"template"});var Nt=Zl(Z.tagName),pe=Zl(At.tagName);return xt[Z.namespaceURI]?Z.namespaceURI===Ee?At.namespaceURI===Ht?Nt==="svg":At.namespaceURI===Gt?Nt==="svg"&&(pe==="annotation-xml"||be[pe]):Boolean($t[Nt]):Z.namespaceURI===Gt?At.namespaceURI===Ht?Nt==="math":At.namespaceURI===Ee?Nt==="math"&&_e[pe]:Boolean(se[Nt]):Z.namespaceURI===Ht?At.namespaceURI===Ee&&!_e[pe]||At.namespaceURI===Gt&&!be[pe]?!1:!se[Nt]&&(ke[Nt]||!$t[Nt]):!!(Lt==="application/xhtml+xml"&&xt[Z.namespaceURI]):!1},Jt=function(Z){no(e.removed,{element:Z});try{Z.parentNode.removeChild(Z)}catch{try{Z.outerHTML=H}catch{Z.remove()}}},Nn=function(Z,At){try{no(e.removed,{attribute:At.getAttributeNode(Z),from:At})}catch{no(e.removed,{attribute:null,from:At})}if(At.removeAttribute(Z),Z==="is"&&!ut[Z])if(ht||U)try{Jt(At)}catch{}else try{At.setAttribute(Z,"")}catch{}},Xr=function(Z){var At,Nt;if(C)Z="<remove></remove>"+Z;else{var pe=Gk(Z,/^[\r\n\t ]+/);Nt=pe&&pe[0]}Lt==="application/xhtml+xml"&&Vt===Ht&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");var Me=V?V.createHTML(Z):Z;if(Vt===Ht)try{At=new p().parseFromString(Me,Lt)}catch{}if(!At||!At.documentElement){At=Y.createDocument(Vt,"template",null);try{At.documentElement.innerHTML=Ft?"":Me}catch{}}var Le=At.body||At.documentElement;return Z&&Nt&&Le.insertBefore(n.createTextNode(Nt),Le.childNodes[0]||null),Vt===Ht?D.call(At,A?"html":"body")[0]:A?At.documentElement:Le},De=function(Z){return W.call(Z.ownerDocument||Z,Z,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ae=function(Z){return Z instanceof f&&(typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||!(Z.attributes instanceof d)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function")},Be=function(Z){return Ii(a)==="object"?Z instanceof a:Z&&Ii(Z)==="object"&&typeof Z.nodeType=="number"&&typeof Z.nodeName=="string"},Re=function(Z,At,Nt){!M[Z]||Hk(M[Z],function(pe){pe.call(e,At,Nt,ie)})},Pe=function(Z){var At;if(Re("beforeSanitizeElements",Z,null),ae(Z)||Dr(/[\u0080-\uFFFF]/,Z.nodeName))return Jt(Z),!0;var Nt=at(Z.nodeName);if(Re("uponSanitizeElement",Z,{tagName:Nt,allowedTags:rt}),Z.hasChildNodes()&&!Be(Z.firstElementChild)&&(!Be(Z.content)||!Be(Z.content.firstElementChild))&&Dr(/<[/\w]/g,Z.innerHTML)&&Dr(/<[/\w]/g,Z.textContent)||Nt==="select"&&Dr(/<template/i,Z.innerHTML))return Jt(Z),!0;if(!rt[Nt]||Ot[Nt]){if(!Ot[Nt]&&Ie(Nt)&&(K.tagNameCheck instanceof RegExp&&Dr(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt)))return!1;if(gt&&!pt[Nt]){var pe=E(Z)||Z.parentNode,Me=L(Z)||Z.childNodes;if(Me&&pe)for(var Le=Me.length,We=Le-1;We>=0;--We)pe.insertBefore(k(Me[We],!0),T(Z))}return Jt(Z),!0}return Z instanceof o&&!ye(Z)||(Nt==="noscript"||Nt==="noembed")&&Dr(/<\/no(script|embed)/i,Z.innerHTML)?(Jt(Z),!0):(O&&Z.nodeType===3&&(At=Z.textContent,At=gn(At,m," "),At=gn(At,Q," "),At=gn(At,x," "),Z.textContent!==At&&(no(e.removed,{element:Z.cloneNode()}),Z.textContent=At)),Re("afterSanitizeElements",Z,null),!1)},Ye=function(Z,At,Nt){if(et&&(At==="id"||At==="name")&&(Nt in n||Nt in dt))return!1;if(!(X&&!P[At]&&Dr(ct,At))){if(!(z&&Dr(Dt,At))){if(!ut[At]||P[At]){if(!(Ie(Z)&&(K.tagNameCheck instanceof RegExp&&Dr(K.tagNameCheck,Z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Z))&&(K.attributeNameCheck instanceof RegExp&&Dr(K.attributeNameCheck,At)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(At))||At==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Dr(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt))))return!1}else if(!jt[At]){if(!Dr(ot,gn(Nt,j,""))){if(!((At==="src"||At==="xlink:href"||At==="href")&&Z!=="script"&&qk(Nt,"data:")===0&&le[Z])){if(!(F&&!Dr(kt,gn(Nt,j,"")))){if(Nt)return!1}}}}}}return!0},Ie=function(Z){return Z.indexOf("-")>0},$e=function(Z){var At,Nt,pe,Me;Re("beforeSanitizeAttributes",Z,null);var Le=Z.attributes;if(!!Le){var We={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut};for(Me=Le.length;Me--;){At=Le[Me];var ve=At,Ne=ve.name,Xi=ve.namespaceURI;if(Nt=Ne==="value"?At.value:jk(At.value),pe=at(Ne),We.attrName=pe,We.attrValue=Nt,We.keepAttr=!0,We.forceKeepAttr=void 0,Re("uponSanitizeAttribute",Z,We),Nt=We.attrValue,!We.forceKeepAttr&&(Nn(Ne,Z),!!We.keepAttr)){if(Dr(/\/>/i,Nt)){Nn(Ne,Z);continue}O&&(Nt=gn(Nt,m," "),Nt=gn(Nt,Q," "),Nt=gn(Nt,x," "));var Ki=at(Z.nodeName);if(!!Ye(Ki,pe,Nt)){if(Mt&&(pe==="id"||pe==="name")&&(Nn(Ne,Z),Nt=Tt+Nt),V&&Ii(g)==="object"&&typeof g.getAttributeType=="function"&&!Xi)switch(g.getAttributeType(Ki,pe)){case"TrustedHTML":Nt=V.createHTML(Nt);break;case"TrustedScriptURL":Nt=V.createScriptURL(Nt);break}try{Xi?Z.setAttributeNS(Xi,Ne,Nt):Z.setAttribute(Ne,Nt),j2(e.removed)}catch{}}}}Re("afterSanitizeAttributes",Z,null)}},ar=function zt(Z){var At,Nt=De(Z);for(Re("beforeSanitizeShadowDOM",Z,null);At=Nt.nextNode();)Re("uponSanitizeShadowNode",At,null),!Pe(At)&&(At.content instanceof i&&zt(At.content),$e(At));Re("afterSanitizeShadowDOM",Z,null)};return e.sanitize=function(zt){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At,Nt,pe,Me,Le;if(Ft=!zt,Ft&&(zt="<!-->"),typeof zt!="string"&&!Be(zt)){if(typeof zt.toString!="function")throw Jh("toString is not a function");if(zt=zt.toString(),typeof zt!="string")throw Jh("dirty is not a string, aborting")}if(!e.isSupported){if(Ii(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof zt=="string")return t.toStaticHTML(zt);if(Be(zt))return t.toStaticHTML(zt.outerHTML)}return zt}if(J||fe(Z),e.removed=[],typeof zt=="string"&&(Et=!1),Et){if(zt.nodeName){var We=at(zt.nodeName);if(!rt[We]||Ot[We])throw Jh("root node is forbidden and cannot be sanitized in-place")}}else if(zt instanceof a)At=Xr("<!---->"),Nt=At.ownerDocument.importNode(zt,!0),Nt.nodeType===1&&Nt.nodeName==="BODY"||Nt.nodeName==="HTML"?At=Nt:At.appendChild(Nt);else{if(!ht&&!O&&!A&&zt.indexOf("<")===-1)return V&&Yt?V.createHTML(zt):zt;if(At=Xr(zt),!At)return ht?null:Yt?H:""}At&&C&&Jt(At.firstChild);for(var ve=De(Et?zt:At);pe=ve.nextNode();)pe.nodeType===3&&pe===Me||Pe(pe)||(pe.content instanceof i&&ar(pe.content),$e(pe),Me=pe);if(Me=null,Et)return zt;if(ht){if(U)for(Le=N.call(At.ownerDocument);At.firstChild;)Le.appendChild(At.firstChild);else Le=At;return ut.shadowroot&&(Le=w.call(r,Le,!0)),Le}var Ne=A?At.outerHTML:At.innerHTML;return A&&rt["!doctype"]&&At.ownerDocument&&At.ownerDocument.doctype&&At.ownerDocument.doctype.name&&Dr(s8,At.ownerDocument.doctype.name)&&(Ne="<!DOCTYPE "+At.ownerDocument.doctype.name+`>
`+Ne),O&&(Ne=gn(Ne,m," "),Ne=gn(Ne,Q," "),Ne=gn(Ne,x," ")),V&&Yt?V.createHTML(Ne):Ne},e.setConfig=function(zt){fe(zt),J=!0},e.clearConfig=function(){ie=null,J=!1},e.isValidAttribute=function(zt,Z,At){ie||fe({});var Nt=at(zt),pe=at(Z);return Ye(Nt,pe,At)},e.addHook=function(zt,Z){typeof Z=="function"&&(M[zt]=M[zt]||[],no(M[zt],Z))},e.removeHook=function(zt){if(M[zt])return j2(M[zt])},e.removeHooks=function(zt){M[zt]&&(M[zt]=[])},e.removeAllHooks=function(){M={}},e}var io=Q2();const l8=t=>t?ep(t).replace(/\\n/g,"#br#").split("#br#"):[""],J2=t=>io.sanitize(t),tp=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=J2(t):n!=="loose"&&(t=ep(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=d8(t))}return t},yn=(t,e)=>t&&(e.dompurifyConfig?t=io.sanitize(tp(t,e),e.dompurifyConfig).toString():t=io.sanitize(tp(t,e),{FORBID_TAGS:["style"]}).toString(),t),c8=(t,e)=>typeof t=="string"?yn(t,e):t.flat().map(r=>yn(r,e)),tc=/<br\s*\/?>/gi,u8=t=>tc.test(t),h8=t=>t.split(tc),d8=t=>t.replace(/#br#/g,"<br/>"),ep=t=>t.replace(tc,"#br#"),f8=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},pr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Oi=function(t){let e=t;return t.includes("~")?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),Oi(e)):e},he={getRows:l8,sanitizeText:yn,sanitizeTextOrArray:c8,hasBreaks:u8,splitBreaks:h8,lineBreakRegex:tc,removeScript:J2,getUrl:f8,evaluate:pr},ec={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,s=2*r-i;switch(n){case"r":return ec.hue2rgb(s,i,t+1/3)*255;case"g":return ec.hue2rgb(s,i,t)*255;case"b":return ec.hue2rgb(s,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),s=Math.min(t,e,r),a=(i+s)/2;if(n==="l")return a*100;if(i===s)return 0;const o=i-s,l=a>.5?o/(2-i-s):o/(i+s);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},xe={channel:ec,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},Ri={};for(let t=0;t<=255;t++)Ri[t]=xe.unit.dec2hex(t);const wr={ALL:0,RGB:1,HSL:2};class p8{constructor(){this.type=wr.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=wr.ALL}is(e){return this.type===e}}const g8=p8;class y8{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new g8}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=wr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=xe.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=xe.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=xe.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=xe.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=xe.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=xe.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(wr.HSL)&&r!==void 0?r:(this._ensureHSL(),xe.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(wr.HSL)&&r!==void 0?r:(this._ensureHSL(),xe.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(wr.HSL)&&r!==void 0?r:(this._ensureHSL(),xe.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(wr.RGB)&&r!==void 0?r:(this._ensureRGB(),xe.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(wr.RGB)&&r!==void 0?r:(this._ensureRGB(),xe.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(wr.RGB)&&r!==void 0?r:(this._ensureRGB(),xe.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(wr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(wr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(wr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(wr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(wr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(wr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const m8=y8,rc=new m8({r:0,g:0,b:0,a:0},"transparent"),rp={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(rp.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,s=i%4===0,a=i>4,o=a?1:17,l=a?8:4,u=s?0:-1,d=a?255:15;return rc.set({r:(n>>l*(u+3)&d)*o,g:(n>>l*(u+2)&d)*o,b:(n>>l*(u+1)&d)*o,a:s?(n&d)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${Ri[Math.round(e)]}${Ri[Math.round(r)]}${Ri[Math.round(n)]}${Ri[Math.round(i*255)]}`:`#${Ri[Math.round(e)]}${Ri[Math.round(r)]}${Ri[Math.round(n)]}`}},so=rp,nc={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:t=>{const e=t.match(nc.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return xe.channel.clamp.h(parseFloat(r)*.9);case"rad":return xe.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return xe.channel.clamp.h(parseFloat(r)*360)}}return xe.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(nc.re);if(!r)return;const[,n,i,s,a,o]=r;return rc.set({h:nc._hue2deg(n),s:xe.channel.clamp.s(parseFloat(i)),l:xe.channel.clamp.l(parseFloat(s)),a:a?xe.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${xe.lang.round(e)}, ${xe.lang.round(r)}%, ${xe.lang.round(n)}%, ${i})`:`hsl(${xe.lang.round(e)}, ${xe.lang.round(r)}%, ${xe.lang.round(n)}%)`}},ic=nc,sc={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:t=>{t=t.toLowerCase();const e=sc.colors[t];if(!!e)return so.parse(e)},stringify:t=>{const e=so.stringify(t);for(const r in sc.colors)if(sc.colors[r]===e)return r}},np=sc,ip={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:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(ip.re);if(!r)return;const[,n,i,s,a,o,l,u,d]=r;return rc.set({r:xe.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:xe.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:xe.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?xe.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${xe.lang.round(e)}, ${xe.lang.round(r)}, ${xe.lang.round(n)}, ${xe.lang.round(i)})`:`rgb(${xe.lang.round(e)}, ${xe.lang.round(r)}, ${xe.lang.round(n)})`}},ac=ip,ai={format:{keyword:np,hex:so,rgb:ac,rgba:ac,hsl:ic,hsla:ic},parse:t=>{if(typeof t!="string")return t;const e=so.parse(t)||ac.parse(t)||ic.parse(t)||np.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(wr.HSL)||t.data.r===void 0?ic.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ac.stringify(t):so.stringify(t)},sp=(t,e)=>{const r=ai.parse(t);for(const n in e)r[n]=xe.channel.clamp[n](e[n]);return ai.stringify(r)},ao=(t,e,r=0,n=1)=>{if(typeof t!="number")return sp(t,{a:e});const i=rc.set({r:xe.channel.clamp.r(t),g:xe.channel.clamp.g(e),b:xe.channel.clamp.b(r),a:xe.channel.clamp.a(n)});return ai.stringify(i)},ap=(t,e,r)=>{const n=ai.parse(t),i=n[e],s=xe.channel.clamp[e](i+r);return i!==s&&(n[e]=s),ai.stringify(n)},ne=(t,e)=>ap(t,"l",e),de=(t,e)=>ap(t,"l",-e),yt=(t,e)=>{const r=ai.parse(t),n={};for(const i in e)!e[i]||(n[i]=r[i]+e[i]);return sp(t,n)},b8=(t,e,r=50)=>{const{r:n,g:i,b:s,a}=ai.parse(t),{r:o,g:l,b:u,a:d}=ai.parse(e),f=r/100,p=f*2-1,g=a-d,k=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,T=1-k,L=n*k+o*T,E=i*k+l*T,I=s*k+u*T,V=a*f+d*(1-f);return ao(L,E,I,V)},Wt=(t,e=100)=>{const r=ai.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,b8(r,t,e)},Mr=(t,e)=>e?yt(t,{s:-40,l:10}):yt(t,{s:-40,l:-10}),oc="#ffffff",lc="#f2f2f2";class _8{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||yt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||yt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Wt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Wt(this.tertiaryColor),this.lineColor=this.lineColor||Wt(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?de(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||de(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Wt(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||ne(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||yt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||yt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||yt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||yt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||yt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||yt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||yt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||yt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||yt(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=de(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=de(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||ne(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||de(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||yt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||yt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||yt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||yt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||yt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||yt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||yt(this.primaryColor,{l:-10}),this.pie5=this.pie5||yt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||yt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||yt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||yt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||yt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||yt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||yt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||yt(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?de(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||yt(this.primaryColor,{h:-30}),this.git4=this.git4||yt(this.primaryColor,{h:-60}),this.git5=this.git5||yt(this.primaryColor,{h:-90}),this.git6=this.git6||yt(this.primaryColor,{h:60}),this.git7=this.git7||yt(this.primaryColor,{h:120}),this.darkMode?(this.git0=ne(this.git0,25),this.git1=ne(this.git1,25),this.git2=ne(this.git2,25),this.git3=ne(this.git3,25),this.git4=ne(this.git4,25),this.git5=ne(this.git5,25),this.git6=ne(this.git6,25),this.git7=ne(this.git7,25)):(this.git0=de(this.git0,25),this.git1=de(this.git1,25),this.git2=de(this.git2,25),this.git3=de(this.git3,25),this.git4=de(this.git4,25),this.git5=de(this.git5,25),this.git6=de(this.git6,25),this.git7=de(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const x8=t=>{const e=new _8;return e.calculate(t),e};class v8{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ne(this.primaryColor,16),this.tertiaryColor=yt(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.background),this.secondaryBorderColor=Mr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ne(Wt("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=ao(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=de("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=ao(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ao(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=ne(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=ne(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=ne(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=yt(this.primaryColor,{h:64}),this.fillType3=yt(this.secondaryColor,{h:64}),this.fillType4=yt(this.primaryColor,{h:-64}),this.fillType5=yt(this.secondaryColor,{h:-64}),this.fillType6=yt(this.primaryColor,{h:128}),this.fillType7=yt(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||yt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||yt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||yt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||yt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||yt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||yt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||yt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||yt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||yt(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||ne(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?de(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ne(this.secondaryColor,20),this.git1=ne(this.pie2||this.secondaryColor,20),this.git2=ne(this.pie3||this.tertiaryColor,20),this.git3=ne(this.pie4||yt(this.primaryColor,{h:-30}),20),this.git4=ne(this.pie5||yt(this.primaryColor,{h:-60}),20),this.git5=ne(this.pie6||yt(this.primaryColor,{h:-90}),10),this.git6=ne(this.pie7||yt(this.primaryColor,{h:60}),10),this.git7=ne(this.pie8||yt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ne(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ne(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const k8=t=>{const e=new v8;return e.calculate(t),e};class w8{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=yt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=yt(this.primaryColor,{h:-160}),this.primaryBorderColor=Mr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Mr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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=ao(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||yt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||yt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||yt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||yt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||yt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||yt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||yt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||yt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||yt(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||de(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||de(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=de(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||de(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||yt(this["cScale"+e],{h:180});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Wt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Wt(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=ne(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=yt(this.primaryColor,{h:64}),this.fillType3=yt(this.secondaryColor,{h:64}),this.fillType4=yt(this.primaryColor,{h:-64}),this.fillType5=yt(this.secondaryColor,{h:-64}),this.fillType6=yt(this.primaryColor,{h:128}),this.fillType7=yt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||yt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||yt(this.primaryColor,{l:-10}),this.pie5=this.pie5||yt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||yt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||yt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||yt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||yt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||yt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||yt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||yt(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||yt(this.primaryColor,{h:-30}),this.git4=this.git4||yt(this.primaryColor,{h:-60}),this.git5=this.git5||yt(this.primaryColor,{h:-90}),this.git6=this.git6||yt(this.primaryColor,{h:60}),this.git7=this.git7||yt(this.primaryColor,{h:120}),this.darkMode?(this.git0=ne(this.git0,25),this.git1=ne(this.git1,25),this.git2=ne(this.git2,25),this.git3=ne(this.git3,25),this.git4=ne(this.git4,25),this.git5=ne(this.git5,25),this.git6=ne(this.git6,25),this.git7=ne(this.git7,25)):(this.git0=de(this.git0,25),this.git1=de(this.git1,25),this.git2=de(this.git2,25),this.git3=de(this.git3,25),this.git4=de(this.git4,25),this.git5=de(this.git5,25),this.git6=de(this.git6,25),this.git7=de(this.git7,25)),this.gitInv0=this.gitInv0||de(Wt(this.git0),25),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const T8=t=>{const e=new w8;return e.calculate(t),e};class E8{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=ne("#cde498",10),this.primaryBorderColor=Mr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Mr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.primaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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||yt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||yt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||yt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||yt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||yt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||yt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||yt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||yt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||yt(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||de(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||de(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=de(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||de(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||yt(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=de(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=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||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=yt(this.primaryColor,{h:64}),this.fillType3=yt(this.secondaryColor,{h:64}),this.fillType4=yt(this.primaryColor,{h:-64}),this.fillType5=yt(this.secondaryColor,{h:-64}),this.fillType6=yt(this.primaryColor,{h:128}),this.fillType7=yt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||yt(this.primaryColor,{l:-30}),this.pie5=this.pie5||yt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||yt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||yt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||yt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||yt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||yt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||yt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||yt(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||yt(this.primaryColor,{h:-30}),this.git4=this.git4||yt(this.primaryColor,{h:-60}),this.git5=this.git5||yt(this.primaryColor,{h:-90}),this.git6=this.git6||yt(this.primaryColor,{h:60}),this.git7=this.git7||yt(this.primaryColor,{h:120}),this.darkMode?(this.git0=ne(this.git0,25),this.git1=ne(this.git1,25),this.git2=ne(this.git2,25),this.git3=ne(this.git3,25),this.git4=ne(this.git4,25),this.git5=ne(this.git5,25),this.git6=ne(this.git6,25),this.git7=ne(this.git7,25)):(this.git0=de(this.git0,25),this.git1=de(this.git1,25),this.git2=de(this.git2,25),this.git3=de(this.git3,25),this.git4=de(this.git4,25),this.git5=de(this.git5,25),this.git6=de(this.git6,25),this.git7=de(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const C8=t=>{const e=new E8;return e.calculate(t),e};class S8{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ne(this.contrast,55),this.background="#ffffff",this.tertiaryColor=yt(this.primaryColor,{h:-160}),this.primaryBorderColor=Mr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Mr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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=ne(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 e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||ne(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||de(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=ne(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=ne(this.contrast,30),this.sectionBkgColor2=ne(this.contrast,30),this.taskBorderColor=de(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=ne(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=de(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",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||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=yt(this.primaryColor,{h:64}),this.fillType3=yt(this.secondaryColor,{h:64}),this.fillType4=yt(this.primaryColor,{h:-64}),this.fillType5=yt(this.secondaryColor,{h:-64}),this.fillType6=yt(this.primaryColor,{h:128}),this.fillType7=yt(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=de(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||yt(this.primaryColor,{h:-30}),this.git4=this.pie5||yt(this.primaryColor,{h:-60}),this.git5=this.pie6||yt(this.primaryColor,{h:-90}),this.git6=this.pie7||yt(this.primaryColor,{h:60}),this.git7=this.pie8||yt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||oc,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||lc}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const oi={base:{getThemeVariables:x8},dark:{getThemeVariables:k8},default:{getThemeVariables:T8},forest:{getThemeVariables:C8},neutral:{getThemeVariables:t=>{const e=new S8;return e.calculate(t),e}}},Fi={theme:"default",themeVariables:oi.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};Fi.class&&(Fi.class.arrowMarkerAbsolute=Fi.arrowMarkerAbsolute),Fi.gitGraph&&(Fi.gitGraph.arrowMarkerAbsolute=Fi.arrowMarkerAbsolute);const op=(t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...op(t[n],"")]:[...r,e+n],[]),A8=op(Fi,""),L8=Fi;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function lp(t){return typeof t>"u"||t===null}function D8(t){return typeof t=="object"&&t!==null}function M8(t){return Array.isArray(t)?t:lp(t)?[]:[t]}function N8(t,e){var r,n,i,s;if(e)for(s=Object.keys(e),r=0,n=s.length;r<n;r+=1)i=s[r],t[i]=e[i];return t}function B8(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}function I8(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var O8=lp,R8=D8,F8=M8,P8=B8,Y8=I8,V8=N8,Nr={isNothing:O8,isObject:R8,toArray:F8,repeat:P8,isNegativeZero:Y8,extend:V8};function cp(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),n+" "+r):n}function oo(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=cp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}oo.prototype=Object.create(Error.prototype),oo.prototype.constructor=oo,oo.prototype.toString=function(e){return this.name+": "+cp(this,e)};var li=oo;function i1(t,e,r,n,i){var s="",a="",o=Math.floor(i/2)-1;return n-e>o&&(s=" ... ",e=n-o+s.length),r-n>o&&(a=" ...",r=n+o-a.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+a,pos:n-e+s.length}}function s1(t,e){return Nr.repeat(" ",e-t.length)+t}function U8(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],s,a=-1;s=r.exec(t.buffer);)i.push(s.index),n.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var o="",l,u,d=Math.min(t.line+e.linesAfter,i.length).toString().length,f=e.maxLength-(e.indent+d+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)u=i1(t.buffer,n[a-l],i[a-l],t.position-(n[a]-n[a-l]),f),o=Nr.repeat(" ",e.indent)+s1((t.line-l+1).toString(),d)+" | "+u.str+`
`+o;for(u=i1(t.buffer,n[a],i[a],t.position,f),o+=Nr.repeat(" ",e.indent)+s1((t.line+1).toString(),d)+" | "+u.str+`
`,o+=Nr.repeat("-",e.indent+d+3+u.pos)+`^
`,l=1;l<=e.linesAfter&&!(a+l>=i.length);l++)u=i1(t.buffer,n[a+l],i[a+l],t.position-(n[a]-n[a+l]),f),o+=Nr.repeat(" ",e.indent)+s1((t.line+l+1).toString(),d)+" | "+u.str+`
`;return o.replace(/\n$/,"")}var z8=U8,W8=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],H8=["scalar","sequence","mapping"];function G8(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function q8(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(W8.indexOf(r)===-1)throw new li('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=G8(e.styleAliases||null),H8.indexOf(this.kind)===-1)throw new li('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Tr=q8;function up(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(s,a){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=a)}),r[i]=n}),r}function j8(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function a1(t){return this.extend(t)}a1.prototype.extend=function(e){var r=[],n=[];if(e instanceof Tr)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new li("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Tr))throw new li("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new li("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new li("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof Tr))throw new li("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(a1.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=up(i,"implicit"),i.compiledExplicit=up(i,"explicit"),i.compiledTypeMap=j8(i.compiledImplicit,i.compiledExplicit),i};var $8=a1,X8=new Tr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),K8=new Tr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Z8=new Tr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),hp=new $8({explicit:[X8,K8,Z8]});function Q8(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function J8(){return null}function tw(t){return t===null}var ew=new Tr("tag:yaml.org,2002:null",{kind:"scalar",resolve:Q8,construct:J8,predicate:tw,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function rw(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function nw(t){return t==="true"||t==="True"||t==="TRUE"}function iw(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var sw=new Tr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:rw,construct:nw,predicate:iw,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function aw(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function ow(t){return 48<=t&&t<=55}function lw(t){return 48<=t&&t<=57}function cw(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!aw(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!ow(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!lw(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}function uw(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function hw(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Nr.isNegativeZero(t)}var dw=new Tr("tag:yaml.org,2002:int",{kind:"scalar",resolve:cw,construct:uw,predicate:hw,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),fw=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pw(t){return!(t===null||!fw.test(t)||t[t.length-1]==="_")}function gw(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var yw=/^[-+]?[0-9]+e/;function mw(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Nr.isNegativeZero(t))return"-0.0";return r=t.toString(10),yw.test(r)?r.replace("e",".e"):r}function bw(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Nr.isNegativeZero(t))}var _w=new Tr("tag:yaml.org,2002:float",{kind:"scalar",resolve:pw,construct:gw,predicate:bw,represent:mw,defaultStyle:"lowercase"}),xw=hp.extend({implicit:[ew,sw,dw,_w]}),vw=xw,dp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function kw(t){return t===null?!1:dp.exec(t)!==null||fp.exec(t)!==null}function ww(t){var e,r,n,i,s,a,o,l=0,u=null,d,f,p;if(e=dp.exec(t),e===null&&(e=fp.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(d=+e[10],f=+(e[11]||0),u=(d*60+f)*6e4,e[9]==="-"&&(u=-u)),p=new Date(Date.UTC(r,n,i,s,a,o,l)),u&&p.setTime(p.getTime()-u),p}function Tw(t){return t.toISOString()}var Ew=new Tr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:kw,construct:ww,instanceOf:Date,represent:Tw});function Cw(t){return t==="<<"||t===null}var Sw=new Tr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Cw}),o1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function Aw(t){if(t===null)return!1;var e,r,n=0,i=t.length,s=o1;for(r=0;r<i;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function Lw(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,s=o1,a=0,o=[];for(e=0;e<i;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(n.charAt(e));return r=i%4*6,r===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):r===18?(o.push(a>>10&255),o.push(a>>2&255)):r===12&&o.push(a>>4&255),new Uint8Array(o)}function Dw(t){var e="",r=0,n,i,s=t.length,a=o1;for(n=0;n<s;n++)n%3===0&&n&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[n];return i=s%3,i===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):i===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):i===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function Mw(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Nw=new Tr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Aw,construct:Lw,predicate:Mw,represent:Dw}),Bw=Object.prototype.hasOwnProperty,Iw=Object.prototype.toString;function Ow(t){if(t===null)return!0;var e=[],r,n,i,s,a,o=t;for(r=0,n=o.length;r<n;r+=1){if(i=o[r],a=!1,Iw.call(i)!=="[object Object]")return!1;for(s in i)if(Bw.call(i,s))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function Rw(t){return t!==null?t:[]}var Fw=new Tr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ow,construct:Rw}),Pw=Object.prototype.toString;function Yw(t){if(t===null)return!0;var e,r,n,i,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(n=a[e],Pw.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[e]=[i[0],n[i[0]]]}return!0}function Vw(t){if(t===null)return[];var e,r,n,i,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1)n=a[e],i=Object.keys(n),s[e]=[i[0],n[i[0]]];return s}var Uw=new Tr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Yw,construct:Vw}),zw=Object.prototype.hasOwnProperty;function Ww(t){if(t===null)return!0;var e,r=t;for(e in r)if(zw.call(r,e)&&r[e]!==null)return!1;return!0}function Hw(t){return t!==null?t:{}}var Gw=new Tr("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ww,construct:Hw}),qw=vw.extend({implicit:[Ew,Sw],explicit:[Nw,Fw,Uw,Gw]}),Pi=Object.prototype.hasOwnProperty,cc=1,pp=2,gp=3,uc=4,l1=1,jw=2,yp=3,$w=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xw=/[\x85\u2028\u2029]/,Kw=/[,\[\]\{\}]/,mp=/^(?:!|!!|![a-z\-]+!)$/i,bp=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _p(t){return Object.prototype.toString.call(t)}function Vn(t){return t===10||t===13}function fs(t){return t===9||t===32}function Fr(t){return t===9||t===32||t===10||t===13}function ra(t){return t===44||t===91||t===93||t===123||t===125}function Zw(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function Qw(t){return t===120?2:t===117?4:t===85?8:0}function Jw(t){return 48<=t&&t<=57?t-48:-1}function xp(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function t7(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}for(var vp=new Array(256),kp=new Array(256),na=0;na<256;na++)vp[na]=xp(na)?1:0,kp[na]=xp(na);function e7(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||qw,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function wp(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=z8(r),new li(e,r)}function Qt(t,e){throw wp(t,e)}function hc(t,e){t.onWarning&&t.onWarning.call(null,wp(t,e))}var Tp={YAML:function(e,r,n){var i,s,a;e.version!==null&&Qt(e,"duplication of %YAML directive"),n.length!==1&&Qt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Qt(e,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),a=parseInt(i[2],10),s!==1&&Qt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&hc(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,s;n.length!==2&&Qt(e,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],mp.test(i)||Qt(e,"ill-formed tag handle (first argument) of the TAG directive"),Pi.call(e.tagMap,i)&&Qt(e,'there is a previously declared suffix for "'+i+'" tag handle'),bp.test(s)||Qt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Qt(e,"tag prefix is malformed: "+s)}e.tagMap[i]=s}};function Yi(t,e,r,n){var i,s,a,o;if(e<r){if(o=t.input.slice(e,r),n)for(i=0,s=o.length;i<s;i+=1)a=o.charCodeAt(i),a===9||32<=a&&a<=1114111||Qt(t,"expected valid JSON character");else $w.test(o)&&Qt(t,"the stream contains non-printable characters");t.result+=o}}function Ep(t,e,r,n){var i,s,a,o;for(Nr.isObject(r)||Qt(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),a=0,o=i.length;a<o;a+=1)s=i[a],Pi.call(e,s)||(e[s]=r[s],n[s]=!0)}function ia(t,e,r,n,i,s,a,o,l){var u,d;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,d=i.length;u<d;u+=1)Array.isArray(i[u])&&Qt(t,"nested arrays are not supported inside keys"),typeof i=="object"&&_p(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&_p(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,d=s.length;u<d;u+=1)Ep(t,e,s[u],r);else Ep(t,e,s,r);else!t.json&&!Pi.call(r,i)&&Pi.call(e,i)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Qt(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[i]=s,delete r[i];return e}function c1(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Qt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function tr(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;fs(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Vn(i))for(c1(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&hc(t,"deficient indentation"),n}function dc(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Fr(r)))}function u1(t,e){e===1?t.result+=" ":e>1&&(t.result+=Nr.repeat(`
`,e-1))}function r7(t,e,r){var n,i,s,a,o,l,u,d,f=t.kind,p=t.result,g;if(g=t.input.charCodeAt(t.position),Fr(g)||ra(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(i=t.input.charCodeAt(t.position+1),Fr(i)||r&&ra(i)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;g!==0;){if(g===58){if(i=t.input.charCodeAt(t.position+1),Fr(i)||r&&ra(i))break}else if(g===35){if(n=t.input.charCodeAt(t.position-1),Fr(n))break}else{if(t.position===t.lineStart&&dc(t)||r&&ra(g))break;if(Vn(g))if(l=t.line,u=t.lineStart,d=t.lineIndent,tr(t,!1,-1),t.lineIndent>=e){o=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=u,t.lineIndent=d;break}}o&&(Yi(t,s,a,!1),u1(t,t.line-l),s=a=t.position,o=!1),fs(g)||(a=t.position+1),g=t.input.charCodeAt(++t.position)}return Yi(t,s,a,!1),t.result?!0:(t.kind=f,t.result=p,!1)}function n7(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Yi(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Vn(r)?(Yi(t,n,i,!0),u1(t,tr(t,!1,e)),n=i=t.position):t.position===t.lineStart&&dc(t)?Qt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Qt(t,"unexpected end of the stream within a single quoted scalar")}function i7(t,e){var r,n,i,s,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Yi(t,r,t.position,!0),t.position++,!0;if(o===92){if(Yi(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Vn(o))tr(t,!1,e);else if(o<256&&vp[o])t.result+=kp[o],t.position++;else if((a=Qw(o))>0){for(i=a,s=0;i>0;i--)o=t.input.charCodeAt(++t.position),(a=Zw(o))>=0?s=(s<<4)+a:Qt(t,"expected hexadecimal character");t.result+=t7(s),t.position++}else Qt(t,"unknown escape sequence");r=n=t.position}else Vn(o)?(Yi(t,r,n,!0),u1(t,tr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&dc(t)?Qt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Qt(t,"unexpected end of the stream within a double quoted scalar")}function s7(t,e){var r=!0,n,i,s,a=t.tag,o,l=t.anchor,u,d,f,p,g,b=Object.create(null),k,T,L,E;if(E=t.input.charCodeAt(t.position),E===91)d=93,g=!1,o=[];else if(E===123)d=125,g=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),E=t.input.charCodeAt(++t.position);E!==0;){if(tr(t,!0,e),E=t.input.charCodeAt(t.position),E===d)return t.position++,t.tag=a,t.anchor=l,t.kind=g?"mapping":"sequence",t.result=o,!0;r?E===44&&Qt(t,"expected the node content, but found ','"):Qt(t,"missed comma between flow collection entries"),T=k=L=null,f=p=!1,E===63&&(u=t.input.charCodeAt(t.position+1),Fr(u)&&(f=p=!0,t.position++,tr(t,!0,e))),n=t.line,i=t.lineStart,s=t.position,sa(t,e,cc,!1,!0),T=t.tag,k=t.result,tr(t,!0,e),E=t.input.charCodeAt(t.position),(p||t.line===n)&&E===58&&(f=!0,E=t.input.charCodeAt(++t.position),tr(t,!0,e),sa(t,e,cc,!1,!0),L=t.result),g?ia(t,o,b,T,k,L,n,i,s):f?o.push(ia(t,null,b,T,k,L,n,i,s)):o.push(k),tr(t,!0,e),E=t.input.charCodeAt(t.position),E===44?(r=!0,E=t.input.charCodeAt(++t.position)):r=!1}Qt(t,"unexpected end of the stream within a flow collection")}function a7(t,e){var r,n,i=l1,s=!1,a=!1,o=e,l=0,u=!1,d,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)l1===i?i=f===43?yp:jw:Qt(t,"repeat of a chomping mode identifier");else if((d=Jw(f))>=0)d===0?Qt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Qt(t,"repeat of an indentation width identifier"):(o=e+d-1,a=!0);else break;if(fs(f)){do f=t.input.charCodeAt(++t.position);while(fs(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Vn(f)&&f!==0)}for(;f!==0;){for(c1(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),Vn(f)){l++;continue}if(t.lineIndent<o){i===yp?t.result+=Nr.repeat(`
`,s?1+l:l):i===l1&&s&&(t.result+=`
`);break}for(n?fs(f)?(u=!0,t.result+=Nr.repeat(`
`,s?1+l:l)):u?(u=!1,t.result+=Nr.repeat(`
`,l+1)):l===0?s&&(t.result+=" "):t.result+=Nr.repeat(`
`,l):t.result+=Nr.repeat(`
`,s?1+l:l),s=!0,a=!0,l=0,r=t.position;!Vn(f)&&f!==0;)f=t.input.charCodeAt(++t.position);Yi(t,r,t.position,!1)}return!0}function Cp(t,e){var r,n=t.tag,i=t.anchor,s=[],a,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Qt(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!Fr(a))));){if(o=!0,t.position++,tr(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,sa(t,e,gp,!1,!0),s.push(t.result),tr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Qt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=s,!0):!1}function o7(t,e,r){var n,i,s,a,o,l,u=t.tag,d=t.anchor,f={},p=Object.create(null),g=null,b=null,k=null,T=!1,L=!1,E;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),E=t.input.charCodeAt(t.position);E!==0;){if(!T&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Qt(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),s=t.line,(E===63||E===58)&&Fr(n))E===63?(T&&(ia(t,f,p,g,b,null,a,o,l),g=b=k=null),L=!0,T=!0,i=!0):T?(T=!1,i=!0):Qt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,E=n;else{if(a=t.line,o=t.lineStart,l=t.position,!sa(t,r,pp,!1,!0))break;if(t.line===s){for(E=t.input.charCodeAt(t.position);fs(E);)E=t.input.charCodeAt(++t.position);if(E===58)E=t.input.charCodeAt(++t.position),Fr(E)||Qt(t,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(ia(t,f,p,g,b,null,a,o,l),g=b=k=null),L=!0,T=!1,i=!1,g=t.tag,b=t.result;else if(L)Qt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=d,!0}else if(L)Qt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=d,!0}if((t.line===s||t.lineIndent>e)&&(T&&(a=t.line,o=t.lineStart,l=t.position),sa(t,e,uc,!0,i)&&(T?b=t.result:k=t.result),T||(ia(t,f,p,g,b,k,a,o,l),g=b=k=null),tr(t,!0,-1),E=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&E!==0)Qt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return T&&ia(t,f,p,g,b,null,a,o,l),L&&(t.tag=u,t.anchor=d,t.kind="mapping",t.result=f),L}function l7(t){var e,r=!1,n=!1,i,s,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Qt(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(n=!0,i="!!",a=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(s=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Qt(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Fr(a);)a===33&&(n?Qt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),mp.test(i)||Qt(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),Kw.test(s)&&Qt(t,"tag suffix cannot contain flow indicator characters")}s&&!bp.test(s)&&Qt(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Qt(t,"tag name is malformed: "+s)}return r?t.tag=s:Pi.call(t.tagMap,i)?t.tag=t.tagMap[i]+s:i==="!"?t.tag="!"+s:i==="!!"?t.tag="tag:yaml.org,2002:"+s:Qt(t,'undeclared tag handle "'+i+'"'),!0}function c7(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Qt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Fr(r)&&!ra(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Qt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function u7(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Fr(n)&&!ra(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Qt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Pi.call(t.anchorMap,r)||Qt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],tr(t,!0,-1),!0}function sa(t,e,r,n,i){var s,a,o,l=1,u=!1,d=!1,f,p,g,b,k,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=uc===r||gp===r,n&&tr(t,!0,-1)&&(u=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;l7(t)||c7(t);)tr(t,!0,-1)?(u=!0,o=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=u||i),(l===1||uc===r)&&(cc===r||pp===r?k=e:k=e+1,T=t.position-t.lineStart,l===1?o&&(Cp(t,T)||o7(t,T,k))||s7(t,k)?d=!0:(a&&a7(t,k)||n7(t,k)||i7(t,k)?d=!0:u7(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&Qt(t,"alias node should not have any properties")):r7(t,k,cc===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(d=o&&Cp(t,T))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Qt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,p=t.implicitTypes.length;f<p;f+=1)if(b=t.implicitTypes[f],b.resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Pi.call(t.typeMap[t.kind||"fallback"],t.tag))b=t.typeMap[t.kind||"fallback"][t.tag];else for(b=null,g=t.typeMap.multi[t.kind||"fallback"],f=0,p=g.length;f<p;f+=1)if(t.tag.slice(0,g[f].tag.length)===g[f].tag){b=g[f];break}b||Qt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&b.kind!==t.kind&&Qt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+b.kind+'", not "'+t.kind+'"'),b.resolve(t.result,t.tag)?(t.result=b.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Qt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}function h7(t){var e=t.position,r,n,i,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(tr(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!Fr(a);)a=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Qt(t,"directive name must not be less than one character in length");a!==0;){for(;fs(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!Vn(a));break}if(Vn(a))break;for(r=t.position;a!==0&&!Fr(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}a!==0&&c1(t),Pi.call(Tp,n)?Tp[n](t,n,i):hc(t,'unknown document directive "'+n+'"')}if(tr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,tr(t,!0,-1)):s&&Qt(t,"directives end mark is expected"),sa(t,t.lineIndent-1,uc,!1,!0),tr(t,!0,-1),t.checkLineBreaks&&Xw.test(t.input.slice(e,t.position))&&hc(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&dc(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,tr(t,!0,-1));return}if(t.position<t.length-1)Qt(t,"end of the stream or a document separator is expected");else return}function Sp(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new e7(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,Qt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)h7(r);return r.documents}function d7(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=Sp(t,r);if(typeof e!="function")return n;for(var i=0,s=n.length;i<s;i+=1)e(n[i])}function f7(t,e){var r=Sp(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new li("expected a single document in the stream, but found more")}}var p7=d7,g7=f7,y7={loadAll:p7,load:g7},m7=hp,b7=y7.load;const Ap=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function _7(t,e){var n;const r=t.match(Ap);if(r){const i=b7(r[1],{schema:m7});return i!=null&&i.title&&((n=e.setDiagramTitle)==null||n.call(e,i.title)),t.slice(r[0].length)}else return t}const x7=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,v7=/\s*%%.*\n/gm,fc={},h1=function(t,e){t=t.replace(Ap,"").replace(x7,"").replace(v7,`
`);for(const[r,{detector:n}]of Object.entries(fc))if(n(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},Lp=(t,e,r)=>{if(fc[t])throw new Error(`Detector with key ${t} already exists`);fc[t]={detector:e,loader:r},B.debug(`Detector with key ${t} added${r?" with loader":""}`)},k7=t=>fc[t].loader,d1=function(t,e,r){const{depth:n,clobber:i}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>d1(t,s,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),t):t===void 0||n<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(s=>{typeof e[s]=="object"&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=d1(t[s],e[s],{depth:n-1,clobber:i})):(i||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},gr=d1;var w7=typeof global=="object"&&global&&global.Object===Object&&global;const Dp=w7;var T7=typeof self=="object"&&self&&self.Object===Object&&self,E7=Dp||T7||Function("return this")();const mn=E7;var C7=mn.Symbol;const en=C7;var Mp=Object.prototype,S7=Mp.hasOwnProperty,A7=Mp.toString,lo=en?en.toStringTag:void 0;function L7(t){var e=S7.call(t,lo),r=t[lo];try{t[lo]=void 0;var n=!0}catch{}var i=A7.call(t);return n&&(e?t[lo]=r:delete t[lo]),i}var D7=Object.prototype,M7=D7.toString;function N7(t){return M7.call(t)}var B7="[object Null]",I7="[object Undefined]",Np=en?en.toStringTag:void 0;function ps(t){return t==null?t===void 0?I7:B7:Np&&Np in Object(t)?L7(t):N7(t)}function Gr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var O7="[object AsyncFunction]",R7="[object Function]",F7="[object GeneratorFunction]",P7="[object Proxy]";function aa(t){if(!Gr(t))return!1;var e=ps(t);return e==R7||e==F7||e==O7||e==P7}var Y7=mn["__core-js_shared__"];const f1=Y7;var Bp=function(){var t=/[^.]+$/.exec(f1&&f1.keys&&f1.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function V7(t){return!!Bp&&Bp in t}var U7=Function.prototype,z7=U7.toString;function gs(t){if(t!=null){try{return z7.call(t)}catch{}try{return t+""}catch{}}return""}var W7=/[\\^$.*+?()[\]{}|]/g,H7=/^\[object .+?Constructor\]$/,G7=Function.prototype,q7=Object.prototype,j7=G7.toString,$7=q7.hasOwnProperty,X7=RegExp("^"+j7.call($7).replace(W7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function K7(t){if(!Gr(t)||V7(t))return!1;var e=aa(t)?X7:H7;return e.test(gs(t))}function Z7(t,e){return t==null?void 0:t[e]}function ys(t,e){var r=Z7(t,e);return K7(r)?r:void 0}var Q7=ys(Object,"create");const co=Q7;function J7(){this.__data__=co?co(null):{},this.size=0}function tT(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var eT="__lodash_hash_undefined__",rT=Object.prototype,nT=rT.hasOwnProperty;function iT(t){var e=this.__data__;if(co){var r=e[t];return r===eT?void 0:r}return nT.call(e,t)?e[t]:void 0}var sT=Object.prototype,aT=sT.hasOwnProperty;function oT(t){var e=this.__data__;return co?e[t]!==void 0:aT.call(e,t)}var lT="__lodash_hash_undefined__";function cT(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=co&&e===void 0?lT:e,this}function ms(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ms.prototype.clear=J7,ms.prototype.delete=tT,ms.prototype.get=iT,ms.prototype.has=oT,ms.prototype.set=cT;function uT(){this.__data__=[],this.size=0}function oa(t,e){return t===e||t!==t&&e!==e}function pc(t,e){for(var r=t.length;r--;)if(oa(t[r][0],e))return r;return-1}var hT=Array.prototype,dT=hT.splice;function fT(t){var e=this.__data__,r=pc(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():dT.call(e,r,1),--this.size,!0}function pT(t){var e=this.__data__,r=pc(e,t);return r<0?void 0:e[r][1]}function gT(t){return pc(this.__data__,t)>-1}function yT(t,e){var r=this.__data__,n=pc(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function ci(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ci.prototype.clear=uT,ci.prototype.delete=fT,ci.prototype.get=pT,ci.prototype.has=gT,ci.prototype.set=yT;var mT=ys(mn,"Map");const uo=mT;function bT(){this.size=0,this.__data__={hash:new ms,map:new(uo||ci),string:new ms}}function _T(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function gc(t,e){var r=t.__data__;return _T(e)?r[typeof e=="string"?"string":"hash"]:r.map}function xT(t){var e=gc(this,t).delete(t);return this.size-=e?1:0,e}function vT(t){return gc(this,t).get(t)}function kT(t){return gc(this,t).has(t)}function wT(t,e){var r=gc(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ui(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ui.prototype.clear=bT,ui.prototype.delete=xT,ui.prototype.get=vT,ui.prototype.has=kT,ui.prototype.set=wT;var TT="Expected a function";function la(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(TT);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(la.Cache||ui),r}la.Cache=ui;const ET={curveBasis:ta,curveBasisClosed:Ek,curveBasisOpen:Ck,curveLinear:Hr,curveLinearClosed:Sk,curveMonotoneX:Ak,curveMonotoneY:Lk,curveNatural:Dk,curveStep:Mk,curveStepAfter:Bk,curveStepBefore:Nk},p1=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,CT=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ST=function(t,e){const r=Ip(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const i=r.map(s=>s.args);bs(i),n=gr(n,[...i])}else n=r.args;if(n){let i=h1(t,e);["config"].forEach(s=>{n[s]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[s],delete n[s])})}return n},Ip=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${CT.source})(?=[}][%]{2}).*
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),B.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n;const i=[];for(;(n=p1.exec(t))!==null;)if(n.index===p1.lastIndex&&p1.lastIndex++,n&&!e||e&&n[1]&&n[1].match(e)||e&&n[2]&&n[2].match(e)){const s=n[1]?n[1]:n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:s,args:a})}return i.length===0&&i.push({type:t,args:null}),i.length===1?i[0]:i}catch(r){return B.error(`ERROR: ${r.message} - Unable to parse directive
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},AT=function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1};function bn(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return ET[r]||e}function LT(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?ti(r):r}const DT=(t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let s=window;for(let a=0;a<n;a++)if(s=s[r[a]],!s)return;s[i](...e)};function yc(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function MT(t){let e,r=0;t.forEach(s=>{r+=yc(s,e),e=s});let n=r/2,i;return e=void 0,t.forEach(s=>{if(e&&!i){const a=yc(s,e);if(a<n)n-=a;else{const o=n/a;o<=0&&(i=e),o>=1&&(i={x:s.x,y:s.y}),o>0&&o<1&&(i={x:(1-o)*e.x+o*s.x,y:(1-o)*e.y+o*s.y})}}e=s}),i}function NT(t){return t.length===1?t[0]:MT(t)}const BT=(t,e,r)=>{let n;B.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let s=25,a;n=void 0,e.forEach(d=>{if(n&&!a){const f=yc(d,n);if(f<s)s-=f;else{const p=s/f;p<=0&&(a=n),p>=1&&(a={x:d.x,y:d.y}),p>0&&p<1&&(a={x:(1-p)*n.x+p*d.x,y:(1-p)*n.y+p*d.y})}}n=d});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*o+(e[0].x+a.x)/2,u.y=-Math.cos(l)*o+(e[0].y+a.y)/2,u};function IT(t,e,r){let n=JSON.parse(JSON.stringify(r)),i;B.info("our points",n),e!=="start_left"&&e!=="start_right"&&(n=n.reverse()),n.forEach(f=>{i=f});let a=25+t,o;i=void 0,n.forEach(f=>{if(i&&!o){const p=yc(f,i);if(p<a)a-=p;else{const g=a/p;g<=0&&(o=i),g>=1&&(o={x:f.x,y:f.y}),g>0&&g<1&&(o={x:(1-g)*i.x+g*f.x,y:(1-g)*i.y+g*f.y})}}i=f});const l=10+t*.5,u=Math.atan2(n[0].y-o.y,n[0].x-o.x),d={x:0,y:0};return d.x=Math.sin(u)*l+(n[0].x+o.x)/2,d.y=-Math.cos(u)*l+(n[0].y+o.y)/2,e==="start_left"&&(d.x=Math.sin(u+Math.PI)*l+(n[0].x+o.x)/2,d.y=-Math.cos(u+Math.PI)*l+(n[0].y+o.y)/2),e==="end_right"&&(d.x=Math.sin(u-Math.PI)*l+(n[0].x+o.x)/2-5,d.y=-Math.cos(u-Math.PI)*l+(n[0].y+o.y)/2-5),e==="end_left"&&(d.x=Math.sin(u)*l+(n[0].x+o.x)/2-5,d.y=-Math.cos(u)*l+(n[0].y+o.y)/2-5),d}function Vi(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}let Op=0;const Rp=()=>(Op++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Op);function OT(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}const Fp=t=>OT(t.length),RT=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},FT=function(t,e){const r=e.text.replace(he.lineBreakRegex," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",e.fontSize),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),e.class!==void 0&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.attr("fill",e.fill),i.text(r),n},Pp=la((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),he.lineBreakRegex.test(t)))return t;const n=t.split(" "),i=[];let s="";return n.forEach((a,o)=>{const l=Un(`${a} `,r),u=Un(s,r);if(l>e){const{hyphenatedStrings:p,remainingWord:g}=PT(a,e,"-",r);i.push(s,...p),s=g}else u+l>=e?(i.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===n.length&&i.push(s)}),i.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),PT=la((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],s=[];let a="";return i.forEach((o,l)=>{const u=`${a}${o}`;if(Un(u,n)>=e){const f=l+1,p=i.length===f,g=`${u}${r}`;s.push(p?u:g),a=""}else a=u}),{hyphenatedStrings:s,remainingWord:a}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function g1(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),y1(t,e).height}function Un(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),y1(t,e).width}const y1=la((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:n,fontWeight:i}=e;if(!t)return{width:0,height:0};const s=["sans-serif",n],a=t.split(he.lineBreakRegex),o=[],l=St("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const u=l.append("svg");for(const f of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const b of a){const k=RT();k.text=b;const T=FT(u,k).style("font-size",r).style("font-weight",i).style("font-family",f),L=(T._groups||T)[0][0].getBBox();g.width=Math.round(Math.max(g.width,L.width)),p=Math.round(L.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}o.push(g)}u.remove();const d=isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1;return o[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),YT=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let mc;const VT=function(t){return mc=mc||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),mc.innerHTML=t,unescape(mc.textContent)},bs=t=>{if(B.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>bs(e)):Object.keys(t).forEach(e=>{B.debug("Checking key",e),e.startsWith("__")&&(B.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(B.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(B.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(B.debug("sanitizing themeCss option"),t[e]=bc(t[e])),e.includes("fontFamily")&&(B.debug("sanitizing fontFamily option"),t[e]=bc(t[e])),e.includes("altFontFamily")&&(B.debug("sanitizing altFontFamily option"),t[e]=bc(t[e])),A8.includes(e)?typeof t[e]=="object"&&(B.debug("sanitize deleting object",e),bs(t[e])):(B.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const r of e){const n=t.themeVariables[r];n&&n.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}B.debug("After sanitization",t)},bc=t=>{let e=0,r=0;for(const n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function m1(t){return"str"in t}function UT(t){return t instanceof Error?t.message:String(t)}const ge={assignWithDepth:gr,wrapLabel:Pp,calculateTextHeight:g1,calculateTextWidth:Un,calculateTextDimensions:y1,detectInit:ST,detectDirective:Ip,isSubstringInArray:AT,interpolateToCurve:bn,calcLabelPosition:NT,calcCardinalityPosition:BT,calcTerminalLabelPosition:IT,formatUrl:LT,getStylesFromArray:Vi,generateId:Rp,random:Fp,runFunc:DT,entityDecode:VT,initIdGenerator:YT,directiveSanitizer:bs,sanitizeCss:bc,insertTitle:(t,e,r,n)=>{if(!n)return;const i=t.node().getBBox();t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)}};var Yp="comm",Vp="rule",Up="decl",zT="@import",WT="@keyframes",HT=Math.abs,b1=String.fromCharCode;function zp(t){return t.trim()}function _1(t,e,r){return t.replace(e,r)}function GT(t,e){return t.indexOf(e)}function _c(t,e){return t.charCodeAt(e)|0}function ho(t,e,r){return t.slice(e,r)}function Ui(t){return t.length}function Wp(t){return t.length}function xc(t,e){return e.push(t),t}var vc=1,ca=1,Hp=0,rn=0,er=0,ua="";function x1(t,e,r,n,i,s,a){return{value:t,root:e,parent:r,type:n,props:i,children:s,line:vc,column:ca,length:a,return:""}}function qT(){return er}function jT(){return er=rn>0?_c(ua,--rn):0,ca--,er===10&&(ca=1,vc--),er}function _n(){return er=rn<Hp?_c(ua,rn++):0,ca++,er===10&&(ca=1,vc++),er}function _s(){return _c(ua,rn)}function kc(){return rn}function wc(t,e){return ho(ua,t,e)}function v1(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $T(t){return vc=ca=1,Hp=Ui(ua=t),rn=0,[]}function XT(t){return ua="",t}function k1(t){return zp(wc(rn-1,w1(t===91?t+2:t===40?t+1:t)))}function KT(t){for(;(er=_s())&&er<33;)_n();return v1(t)>2||v1(er)>3?"":" "}function ZT(t,e){for(;--e&&_n()&&!(er<48||er>102||er>57&&er<65||er>70&&er<97););return wc(t,kc()+(e<6&&_s()==32&&_n()==32))}function w1(t){for(;_n();)switch(er){case t:return rn;case 34:case 39:t!==34&&t!==39&&w1(er);break;case 40:t===41&&w1(t);break;case 92:_n();break}return rn}function QT(t,e){for(;_n()&&t+er!==47+10;)if(t+er===42+42&&_s()===47)break;return"/*"+wc(e,rn-1)+"*"+b1(t===47?t:_n())}function JT(t){for(;!v1(_s());)_n();return wc(t,rn)}function tE(t){return XT(Tc("",null,null,null,[""],t=$T(t),0,[0],t))}function Tc(t,e,r,n,i,s,a,o,l){for(var u=0,d=0,f=a,p=0,g=0,b=0,k=1,T=1,L=1,E=0,I="",V=i,H=s,G=n,Y=I;T;)switch(b=E,E=_n()){case 40:if(b!=108&&_c(Y,f-1)==58){GT(Y+=_1(k1(E),"&","&\f"),"&\f")!=-1&&(L=-1);break}case 34:case 39:case 91:Y+=k1(E);break;case 9:case 10:case 13:case 32:Y+=KT(b);break;case 92:Y+=ZT(kc()-1,7);continue;case 47:switch(_s()){case 42:case 47:xc(eE(QT(_n(),kc()),e,r),l);break;default:Y+="/"}break;case 123*k:o[u++]=Ui(Y)*L;case 125*k:case 59:case 0:switch(E){case 0:case 125:T=0;case 59+d:g>0&&Ui(Y)-f&&xc(g>32?qp(Y+";",n,r,f-1):qp(_1(Y," ","")+";",n,r,f-2),l);break;case 59:Y+=";";default:if(xc(G=Gp(Y,e,r,u,d,i,o,I,V=[],H=[],f),s),E===123)if(d===0)Tc(Y,e,G,G,V,s,f,o,H);else switch(p){case 100:case 109:case 115:Tc(t,G,G,n&&xc(Gp(t,G,G,0,0,i,o,I,i,V=[],f),H),i,H,f,o,n?V:H);break;default:Tc(Y,G,G,G,[""],H,0,o,H)}}u=d=g=0,k=L=1,I=Y="",f=a;break;case 58:f=1+Ui(Y),g=b;default:if(k<1){if(E==123)--k;else if(E==125&&k++==0&&jT()==125)continue}switch(Y+=b1(E),E*k){case 38:L=d>0?1:(Y+="\f",-1);break;case 44:o[u++]=(Ui(Y)-1)*L,L=1;break;case 64:_s()===45&&(Y+=k1(_n())),p=_s(),d=f=Ui(I=Y+=JT(kc())),E++;break;case 45:b===45&&Ui(Y)==2&&(k=0)}}return s}function Gp(t,e,r,n,i,s,a,o,l,u,d){for(var f=i-1,p=i===0?s:[""],g=Wp(p),b=0,k=0,T=0;b<n;++b)for(var L=0,E=ho(t,f+1,f=HT(k=a[b])),I=t;L<g;++L)(I=zp(k>0?p[L]+" "+E:_1(E,/&\f/g,p[L])))&&(l[T++]=I);return x1(t,e,r,i===0?Vp:o,l,u,d)}function eE(t,e,r){return x1(t,e,r,Yp,b1(qT()),ho(t,2,-2),0)}function qp(t,e,r,n){return x1(t,e,r,Up,ho(t,0,n),ho(t,n+1,-1),n)}function T1(t,e){for(var r="",n=Wp(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function rE(t,e,r,n){switch(t.type){case zT:case Up:return t.return=t.return||t.value;case Yp:return"";case WT:return t.return=t.value+"{"+T1(t.children,n)+"}";case Vp:t.value=t.props.join(",")}return Ui(r=T1(t.children,n))?t.return=t.value+"{"+r+"}":""}const Ec={name:"mermaid",version:"9.3.0",description:"Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",main:"./dist/mermaid.min.js",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{require:"./dist/mermaid.min.js",import:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],scripts:{clean:"rimraf dist","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaidAPI.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts","docs:verify":"pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts --verify","docs:pre:vitepress":"rimraf src/vitepress && pnpm docs:code && ts-node-esm src/docs.mts --vitepress","docs:build:vitepress":"pnpm docs:pre:vitepress && vitepress build src/vitepress","docs:dev":'pnpm docs:pre:vitepress && concurrently "vitepress dev src/vitepress" "ts-node-esm src/docs.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell --config ../../cSpell.json "src/docs/**/*.md"',release:"pnpm build",prepublishOnly:"pnpm -w run build"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^6.0.0",d3:"^7.0.0","dagre-d3-es":"7.0.6",dompurify:"2.4.1",khroma:"^2.0.0","lodash-es":"^4.17.21","moment-mini":"^2.24.0","non-layered-tidy-tree-layout":"^2.0.2",stylis:"^4.1.2",uuid:"^9.0.0"},devDependencies:{"@types/d3":"^7.4.0","@types/dompurify":"^2.4.0","@types/jsdom":"^20.0.1","@types/lodash-es":"^4.17.6","@types/micromatch":"^4.0.2","@types/prettier":"^2.7.1","@types/stylis":"^4.0.2","@types/uuid":"^8.3.4","@typescript-eslint/eslint-plugin":"^5.42.1","@typescript-eslint/parser":"^5.42.1",chokidar:"^3.5.3",concurrently:"^7.5.0",coveralls:"^3.1.1",cspell:"^6.14.3",globby:"^13.1.2",jison:"^0.4.18","js-base64":"^3.7.2",jsdom:"^20.0.2",micromatch:"^4.0.5",moment:"^2.29.4","path-browserify":"^1.0.1",prettier:"^2.7.1",remark:"^14.0.2",rimraf:"^3.0.2","start-server-and-test":"^1.14.0",typedoc:"^0.23.18","typedoc-plugin-markdown":"^3.13.6",typescript:"^4.8.4","unist-util-flatmap":"^1.0.0",vitepress:"^1.0.0-alpha.28","vitepress-plugin-search":"^1.0.4-alpha.15"},files:["dist","README.md"],sideEffects:["**/*.css","**/*.scss"]},ha=Object.freeze(L8);let Pr=gr({},ha),jp,da=[],fo=gr({},ha);const Cc=(t,e)=>{let r=gr({},t),n={};for(const i of e)Kp(i),n=gr(n,i);if(r=gr(r,n),n.theme&&n.theme in oi){const i=gr({},jp),s=gr(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in oi&&(r.themeVariables=oi[r.theme].getThemeVariables(s))}return fo=r,Jp(fo),fo},nE=t=>(Pr=gr({},ha),Pr=gr(Pr,t),t.theme&&oi[t.theme]&&(Pr.themeVariables=oi[t.theme].getThemeVariables(t.themeVariables)),Cc(Pr,da),Pr),iE=t=>{jp=gr({},t)},sE=t=>(Pr=gr(Pr,t),Cc(Pr,da),Pr),$p=()=>gr({},Pr),Xp=t=>(Jp(t),gr(fo,t),$()),$=()=>gr({},fo),Kp=t=>{var e;["secure",...(e=Pr.secure)!=null?e:[]].forEach(r=>{t[r]!==void 0&&(B.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.indexOf("__")===0&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].includes("<")||t[r].includes(">")||t[r].includes("url(data:"))&&delete t[r],typeof t[r]=="object"&&Kp(t[r])})},E1=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),da.push(t),Cc(Pr,da)},po=(t=Pr)=>{da=[],Cc(t,da)};var Zp=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(Zp||{});const Qp={},aE=t=>{Qp[t]||(B.warn(Zp[t]),Qp[t]=!0)},Jp=t=>{!t||(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&aE("LAZY_LOAD_DEPRECATED")},oE=function(t,e){for(let r of e)t.attr(r[0],r[1])},lE=function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},xn=function(t,e,r,n){const i=lE(e,r,n);oE(t,i)},Sc=function(t,e,r,n){const i=e.node().getBBox(),s=i.width,a=i.height;B.info(`SVG bounds: ${s}x${a}`,i);let o=0,l=0;B.info(`Graph bounds: ${o}x${l}`,t),o=s+r*2,l=a+r*2,B.info(`Calculated bounds: ${o}x${l}`),xn(e,l,o,n);const u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},go=t=>`g.classGroup text {
fill: ${t.nodeBorder};
fill: ${t.classText};
stroke: none;
font-family: ${t.fontFamily};
font-size: 10px;
.title {
font-weight: bolder;
}
}
.nodeLabel, .edgeLabel {
color: ${t.classText};
}
.edgeLabel .label rect {
fill: ${t.mainBkg};
}
.label text {
fill: ${t.classText};
}
.edgeLabel .label span {
background: ${t.mainBkg};
}
.classTitle {
font-weight: bolder;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.divider {
stroke: ${t.nodeBorder};
stroke: 1;
}
g.clickable {
cursor: pointer;
}
g.classGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.classGroup line {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
.classLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.classLabel .label {
fill: ${t.nodeBorder};
font-size: 10px;
}
.relation {
stroke: ${t.lineColor};
stroke-width: 1;
fill: none;
}
.dashed-line{
stroke-dasharray: 3;
}
.dotted-line{
stroke-dasharray: 1 2;
}
#compositionStart, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#compositionEnd, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionStart, .extension {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionEnd, .extension {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationStart, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationEnd, .aggregation {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopStart, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopEnd, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
.edgeTerminals {
font-size: 11px;
}
.classTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,tg=t=>`
.entityBox {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
.attributeBoxOdd {
fill: ${t.attributeBackgroundColorOdd};
stroke: ${t.nodeBorder};
}
.attributeBoxEven {
fill: ${t.attributeBackgroundColorEven};
stroke: ${t.nodeBorder};
}
.relationshipLabelBox {
fill: ${t.tertiaryColor};
opacity: 0.7;
background-color: ${t.tertiaryColor};
rect {
opacity: 0.5;
}
}
.relationshipLine {
stroke: ${t.lineColor};
}
.entityTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,eg=()=>"",Ac=t=>`.label {
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span {
color: ${t.titleColor};
}
.label text,span {
fill: ${t.nodeTextColor||t.textColor};
color: ${t.nodeTextColor||t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
.cluster rect {
fill: ${t.clusterBkg};
stroke: ${t.clusterBorder};
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,rg=t=>`
.mermaid-main-font {
font-family: "trebuchet ms", verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
// font-size: ${t.ganttFontSize};
// text-height: 14px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
// .taskText:not([font-size]) {
// font-size: ${t.ganttFontSize};
// }
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
// font-size: ${t.ganttFontSize};
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
// font-size: ${t.ganttFontSize};
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor} ;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
`,ng=()=>"",ig=t=>`
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`,sg=t=>`
marker {
fill: ${t.relationColor};
stroke: ${t.relationColor};
}
marker.cross {
stroke: ${t.lineColor};
}
svg {
font-family: ${t.fontFamily};
font-size: ${t.fontSize};
}
.reqBox {
fill: ${t.requirementBackground};
fill-opacity: 100%;
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${t.requirementTextColor};
}
.reqLabelBox {
fill: ${t.relationLabelBackground};
fill-opacity: 100%;
}
.req-title-line {
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.relationshipLine {
stroke: ${t.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${t.relationLabelColor};
}
`,ag=t=>`.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`,Lc=t=>`
defs #statediagram-barbEnd {
fill: ${t.transitionColor};
stroke: ${t.transitionColor};
}
g.stateGroup text {
fill: ${t.nodeBorder};
stroke: none;
font-size: 10px;
}
g.stateGroup text {
fill: ${t.textColor};
stroke: none;
font-size: 10px;
}
g.stateGroup .state-title {
font-weight: bolder;
fill: ${t.stateLabelColor};
}
g.stateGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.stateGroup line {
stroke: ${t.lineColor};
stroke-width: 1;
}
.transition {
stroke: ${t.transitionColor};
stroke-width: 1;
fill: none;
}
.stateGroup .composit {
fill: ${t.background};
border-bottom: 1px
}
.stateGroup .alt-composit {
fill: #e0e0e0;
border-bottom: 1px
}
.state-note {
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
text {
fill: ${t.noteTextColor};
stroke: none;
font-size: 10px;
}
}
.stateLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.edgeLabel .label rect {
fill: ${t.labelBackgroundColor};
opacity: 0.5;
}
.edgeLabel .label text {
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.label div .edgeLabel {
color: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.stateLabel text {
fill: ${t.stateLabelColor};
font-size: 10px;
font-weight: bold;
}
.node circle.state-start {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node .fork-join {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node circle.state-end {
fill: ${t.innerEndBackground};
stroke: ${t.background};
stroke-width: 1.5
}
.end-state-inner {
fill: ${t.compositeBackground||t.background};
// stroke: ${t.background};
stroke-width: 1.5
}
.node rect {
fill: ${t.stateBkg||t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.node polygon {
fill: ${t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};;
stroke-width: 1px;
}
#statediagram-barbEnd {
fill: ${t.lineColor};
}
.statediagram-cluster rect {
fill: ${t.compositeTitleBackground};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.cluster-label, .nodeLabel {
color: ${t.stateLabelColor};
}
.statediagram-cluster rect.outer {
rx: 5px;
ry: 5px;
}
.statediagram-state .divider {
stroke: ${t.stateBorder||t.nodeBorder};
}
.statediagram-state .title-state {
rx: 5px;
ry: 5px;
}
.statediagram-cluster.statediagram-cluster .inner {
fill: ${t.compositeBackground||t.background};
}
.statediagram-cluster.statediagram-cluster-alt .inner {
fill: ${t.altBackground?t.altBackground:"#efefef"};
}
.statediagram-cluster .inner {
rx:0;
ry:0;
}
.statediagram-state rect.basic {
rx: 5px;
ry: 5px;
}
.statediagram-state rect.divider {
stroke-dasharray: 10,10;
fill: ${t.altBackground?t.altBackground:"#efefef"};
}
.note-edge {
stroke-dasharray: 5;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note text {
fill: ${t.noteTextColor};
}
.statediagram-note .nodeLabel {
color: ${t.noteTextColor};
}
.statediagram .edgeLabel {
color: red; // ${t.noteTextColor};
}
#dependencyStart, #dependencyEnd {
fill: ${t.lineColor};
stroke: ${t.lineColor};
stroke-width: 1;
}
.statediagramTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,og=t=>`.label {
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0?`fill: ${t.fillType0}`:""};
}
.task-type-1, .section-type-1 {
${t.fillType0?`fill: ${t.fillType1}`:""};
}
.task-type-2, .section-type-2 {
${t.fillType0?`fill: ${t.fillType2}`:""};
}
.task-type-3, .section-type-3 {
${t.fillType0?`fill: ${t.fillType3}`:""};
}
.task-type-4, .section-type-4 {
${t.fillType0?`fill: ${t.fillType4}`:""};
}
.task-type-5, .section-type-5 {
${t.fillType0?`fill: ${t.fillType5}`:""};
}
.task-type-6, .section-type-6 {
${t.fillType0?`fill: ${t.fillType6}`:""};
}
.task-type-7, .section-type-7 {
${t.fillType0?`fill: ${t.fillType7}`:""};
}
.actor-0 {
${t.actor0?`fill: ${t.actor0}`:""};
}
.actor-1 {
${t.actor1?`fill: ${t.actor1}`:""};
}
.actor-2 {
${t.actor2?`fill: ${t.actor2}`:""};
}
.actor-3 {
${t.actor3?`fill: ${t.actor3}`:""};
}
.actor-4 {
${t.actor4?`fill: ${t.actor4}`:""};
}
.actor-5 {
${t.actor5?`fill: ${t.actor5}`:""};
}
`,lg=t=>`.person {
stroke: ${t.personBorder};
fill: ${t.personBkg};
}
`,Dc={flowchart:Ac,"flowchart-v2":Ac,sequence:ag,gantt:rg,classDiagram:go,"classDiagram-v2":go,class:go,stateDiagram:Lc,state:Lc,info:ng,pie:ig,er:tg,error:eg,journey:og,requirement:sg,c4:lg},cE=(t,e,r)=>{let n="";return t in Dc&&Dc[t]?n=Dc[t](r):B.warn(`No theme found for ${t}`),` & {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${r.errorBkgColor};
}
& .error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: 2px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
& .marker.cross {
stroke: ${r.lineColor};
}
& svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
${n}
${e}
`},uE=(t,e)=>{Dc[t]=e},hE=cE,dE=B,fE=Qu,yo=$,pE=t=>yn(t,yo()),cg=Sc,Mc={},yr=(t,e,r)=>{if(Mc[t])throw new Error(`Diagram ${t} already registered.`);Mc[t]=e,r&&Lp(t,r),uE(t,e.styles),e.injectUtils&&e.injectUtils(dE,fE,yo,pE,cg)},ug=t=>{if(t in Mc)return Mc[t];throw new Error(`Diagram ${t} not found.`)};var C1=function(){var t=function(W,N,D,w){for(D=D||{},w=W.length;w--;D[W[w]]=N);return D},e=[1,4],r=[1,7],n=[1,5],i=[1,9],s=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],u=[8,14,20,22,24,25,27,29,32,37,40],d=[8,13,14,20,22,24,25,27,29,32,37,40],f=[1,26],p=[6,8,14,50,55],g=[8,14,55],b=[1,53],k=[1,52],T=[8,14,30,33,35,38,55],L=[1,67],E=[1,68],I=[1,69],V=[8,14,33,35,42,55],H={trace:function(){},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(N,D,w,v,M,m,Q){var x=m.length-1;switch(M){case 3:return m[x];case 4:return m[x-1];case 5:return v.setDirection(m[x-3]),m[x-1];case 7:v.setOptions(m[x-1]),this.$=m[x];break;case 8:m[x-1]+=m[x],this.$=m[x-1];break;case 10:this.$=[];break;case 11:m[x-1].push(m[x]),this.$=m[x-1];break;case 12:this.$=m[x-1];break;case 17:this.$=m[x].trim(),v.setAccTitle(this.$);break;case 18:case 19:this.$=m[x].trim(),v.setAccDescription(this.$);break;case 20:v.addSection(m[x].substr(8)),this.$=m[x].substr(8);break;case 22:v.checkout(m[x]);break;case 23:v.branch(m[x]);break;case 24:v.branch(m[x-2],m[x]);break;case 25:v.cherryPick(m[x],"",void 0);break;case 26:v.cherryPick(m[x-2],"",m[x]);break;case 27:case 29:v.cherryPick(m[x-2],"","");break;case 28:v.cherryPick(m[x],"",m[x-2]);break;case 30:v.merge(m[x],"","","");break;case 31:v.merge(m[x-2],m[x],"","");break;case 32:v.merge(m[x-2],"",m[x],"");break;case 33:v.merge(m[x-2],"","",m[x]);break;case 34:v.merge(m[x-4],m[x],"",m[x-2]);break;case 35:v.merge(m[x-4],"",m[x],m[x-2]);break;case 36:v.merge(m[x-4],"",m[x-2],m[x]);break;case 37:v.merge(m[x-4],m[x-2],m[x],"");break;case 38:v.merge(m[x-4],m[x-2],"",m[x]);break;case 39:v.merge(m[x-4],m[x],m[x-2],"");break;case 40:v.merge(m[x-6],m[x-4],m[x-2],m[x]);break;case 41:v.merge(m[x-6],m[x],m[x-4],m[x-2]);break;case 42:v.merge(m[x-6],m[x-4],m[x],m[x-2]);break;case 43:v.merge(m[x-6],m[x-2],m[x-4],m[x]);break;case 44:v.merge(m[x-6],m[x],m[x-2],m[x-4]);break;case 45:v.merge(m[x-6],m[x-2],m[x],m[x-4]);break;case 46:v.commit(m[x]);break;case 47:v.commit("","",v.commitType.NORMAL,m[x]);break;case 48:v.commit("","",m[x],"");break;case 49:v.commit("","",m[x],m[x-2]);break;case 50:v.commit("","",m[x-2],m[x]);break;case 51:v.commit("",m[x],v.commitType.NORMAL,"");break;case 52:v.commit("",m[x-2],v.commitType.NORMAL,m[x]);break;case 53:v.commit("",m[x],v.commitType.NORMAL,m[x-2]);break;case 54:v.commit("",m[x-2],m[x],"");break;case 55:v.commit("",m[x],m[x-2],"");break;case 56:v.commit("",m[x-4],m[x-2],m[x]);break;case 57:v.commit("",m[x-4],m[x],m[x-2]);break;case 58:v.commit("",m[x-2],m[x-4],m[x]);break;case 59:v.commit("",m[x],m[x-4],m[x-2]);break;case 60:v.commit("",m[x],m[x-2],m[x-4]);break;case 61:v.commit("",m[x-2],m[x],m[x-4]);break;case 62:v.commit(m[x],"",v.commitType.NORMAL,"");break;case 63:v.commit(m[x],"",v.commitType.NORMAL,m[x-2]);break;case 64:v.commit(m[x-2],"",v.commitType.NORMAL,m[x]);break;case 65:v.commit(m[x-2],"",m[x],"");break;case 66:v.commit(m[x],"",m[x-2],"");break;case 67:v.commit(m[x],m[x-2],v.commitType.NORMAL,"");break;case 68:v.commit(m[x-2],m[x],v.commitType.NORMAL,"");break;case 69:v.commit(m[x-4],"",m[x-2],m[x]);break;case 70:v.commit(m[x-4],"",m[x],m[x-2]);break;case 71:v.commit(m[x-2],"",m[x-4],m[x]);break;case 72:v.commit(m[x],"",m[x-4],m[x-2]);break;case 73:v.commit(m[x],"",m[x-2],m[x-4]);break;case 74:v.commit(m[x-2],"",m[x],m[x-4]);break;case 75:v.commit(m[x-4],m[x],m[x-2],"");break;case 76:v.commit(m[x-4],m[x-2],m[x],"");break;case 77:v.commit(m[x-2],m[x],m[x-4],"");break;case 78:v.commit(m[x],m[x-2],m[x-4],"");break;case 79:v.commit(m[x],m[x-4],m[x-2],"");break;case 80:v.commit(m[x-2],m[x-4],m[x],"");break;case 81:v.commit(m[x-4],m[x],v.commitType.NORMAL,m[x-2]);break;case 82:v.commit(m[x-4],m[x-2],v.commitType.NORMAL,m[x]);break;case 83:v.commit(m[x-2],m[x],v.commitType.NORMAL,m[x-4]);break;case 84:v.commit(m[x],m[x-2],v.commitType.NORMAL,m[x-4]);break;case 85:v.commit(m[x],m[x-4],v.commitType.NORMAL,m[x-2]);break;case 86:v.commit(m[x-2],m[x-4],v.commitType.NORMAL,m[x]);break;case 87:v.commit(m[x-6],m[x-4],m[x-2],m[x]);break;case 88:v.commit(m[x-6],m[x-4],m[x],m[x-2]);break;case 89:v.commit(m[x-6],m[x-2],m[x-4],m[x]);break;case 90:v.commit(m[x-6],m[x],m[x-4],m[x-2]);break;case 91:v.commit(m[x-6],m[x-2],m[x],m[x-4]);break;case 92:v.commit(m[x-6],m[x],m[x-2],m[x-4]);break;case 93:v.commit(m[x-4],m[x-6],m[x-2],m[x]);break;case 94:v.commit(m[x-4],m[x-6],m[x],m[x-2]);break;case 95:v.commit(m[x-2],m[x-6],m[x-4],m[x]);break;case 96:v.commit(m[x],m[x-6],m[x-4],m[x-2]);break;case 97:v.commit(m[x-2],m[x-6],m[x],m[x-4]);break;case 98:v.commit(m[x],m[x-6],m[x-2],m[x-4]);break;case 99:v.commit(m[x],m[x-4],m[x-2],m[x-6]);break;case 100:v.commit(m[x-2],m[x-4],m[x],m[x-6]);break;case 101:v.commit(m[x],m[x-2],m[x-4],m[x-6]);break;case 102:v.commit(m[x-2],m[x],m[x-4],m[x-6]);break;case 103:v.commit(m[x-4],m[x-2],m[x],m[x-6]);break;case 104:v.commit(m[x-4],m[x],m[x-2],m[x-6]);break;case 105:v.commit(m[x-2],m[x-4],m[x-6],m[x]);break;case 106:v.commit(m[x],m[x-4],m[x-6],m[x-2]);break;case 107:v.commit(m[x-2],m[x],m[x-6],m[x-4]);break;case 108:v.commit(m[x],m[x-2],m[x-6],m[x-4]);break;case 109:v.commit(m[x-4],m[x-2],m[x-6],m[x]);break;case 110:v.commit(m[x-4],m[x],m[x-6],m[x-2]);break;case 111:this.$="";break;case 112:this.$=m[x];break;case 113:this.$=v.commitType.NORMAL;break;case 114:this.$=v.commitType.REVERSE;break;case 115:this.$=v.commitType.HIGHLIGHT;break;case 118:v.parseDirective("%%{","open_directive");break;case 119:v.parseDirective(m[x],"type_directive");break;case 120:m[x]=m[x].trim().replace(/'/g,'"'),v.parseDirective(m[x],"arg_directive");break;case 121:v.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:r,14:n,46:8,50:i,55:s},{1:[3]},{3:10,4:2,5:3,6:e,8:r,14:n,46:8,50:i,55:s},{3:11,4:2,5:3,6:e,8:r,14:n,46:8,50:i,55:s},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(u,[2,10],{12:22,13:[1,23]}),t(d,[2,9]),{9:[1,25],48:24,53:f},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{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]},t(d,[2,8]),t(p,[2,116]),{49:45,52:[1,46]},t(p,[2,121]),{1:[2,4]},{8:[1,47]},t(u,[2,11]),{4:48,8:r,14:n,55:s},t(u,[2,13]),t(g,[2,14]),t(g,[2,15]),t(g,[2,16]),{21:[1,49]},{23:[1,50]},t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),{28:51,34:b,54:k},t(g,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:b,54:k},{33:[1,61],35:[1,62]},{28:63,34:b,54:k},{48:64,53:f},{53:[2,120]},{1:[2,5]},t(u,[2,12]),t(g,[2,17]),t(g,[2,18]),t(g,[2,22]),t(T,[2,122]),t(T,[2,123]),t(g,[2,46]),{34:[1,65]},{39:66,43:L,44:E,45:I},{34:[1,70]},{34:[1,71]},t(g,[2,112]),t(g,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(g,[2,23],{30:[1,78]}),t(p,[2,117]),t(g,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(g,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(V,[2,113]),t(V,[2,114]),t(V,[2,115]),t(g,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(g,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:L,44:E,45:I},{34:[1,93]},t(g,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:L,44:E,45:I},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:L,44:E,45:I},{34:[1,106]},{34:[1,107]},{39:108,43:L,44:E,45:I},{34:[1,109]},t(g,[2,31],{35:[1,111],38:[1,110]}),t(g,[2,32],{33:[1,113],35:[1,112]}),t(g,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(g,[2,24]),t(g,[2,49],{33:[1,120],42:[1,121]}),t(g,[2,53],{38:[1,122],42:[1,123]}),t(g,[2,63],{33:[1,125],38:[1,124]}),t(g,[2,50],{33:[1,126],42:[1,127]}),t(g,[2,55],{35:[1,128],42:[1,129]}),t(g,[2,66],{33:[1,131],35:[1,130]}),t(g,[2,52],{38:[1,132],42:[1,133]}),t(g,[2,54],{35:[1,134],42:[1,135]}),t(g,[2,67],{35:[1,137],38:[1,136]}),t(g,[2,64],{33:[1,139],38:[1,138]}),t(g,[2,65],{33:[1,141],35:[1,140]}),t(g,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:L,44:E,45:I},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:L,44:E,45:I},t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:L,44:E,45:I},{34:[1,153]},{39:154,43:L,44:E,45:I},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:L,44:E,45:I},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:L,44:E,45:I},{34:[1,167]},{39:168,43:L,44:E,45:I},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:L,44:E,45:I},{34:[1,173]},t(g,[2,37],{35:[1,174]}),t(g,[2,38],{38:[1,175]}),t(g,[2,36],{33:[1,176]}),t(g,[2,39],{35:[1,177]}),t(g,[2,34],{38:[1,178]}),t(g,[2,35],{33:[1,179]}),t(g,[2,60],{42:[1,180]}),t(g,[2,73],{33:[1,181]}),t(g,[2,61],{42:[1,182]}),t(g,[2,84],{38:[1,183]}),t(g,[2,74],{33:[1,184]}),t(g,[2,83],{38:[1,185]}),t(g,[2,59],{42:[1,186]}),t(g,[2,72],{33:[1,187]}),t(g,[2,58],{42:[1,188]}),t(g,[2,78],{35:[1,189]}),t(g,[2,71],{33:[1,190]}),t(g,[2,77],{35:[1,191]}),t(g,[2,57],{42:[1,192]}),t(g,[2,85],{38:[1,193]}),t(g,[2,56],{42:[1,194]}),t(g,[2,79],{35:[1,195]}),t(g,[2,80],{35:[1,196]}),t(g,[2,86],{38:[1,197]}),t(g,[2,70],{33:[1,198]}),t(g,[2,81],{38:[1,199]}),t(g,[2,69],{33:[1,200]}),t(g,[2,75],{35:[1,201]}),t(g,[2,76],{35:[1,202]}),t(g,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:L,44:E,45:I},{34:[1,206]},{34:[1,207]},{39:208,43:L,44:E,45:I},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:L,44:E,45:I},{34:[1,214]},{39:215,43:L,44:E,45:I},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:L,44:E,45:I},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:L,44:E,45:I},{34:[1,228]},{39:229,43:L,44:E,45:I},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:L,44:E,45:I},t(g,[2,40]),t(g,[2,42]),t(g,[2,41]),t(g,[2,43]),t(g,[2,45]),t(g,[2,44]),t(g,[2,101]),t(g,[2,102]),t(g,[2,99]),t(g,[2,100]),t(g,[2,104]),t(g,[2,103]),t(g,[2,108]),t(g,[2,107]),t(g,[2,106]),t(g,[2,105]),t(g,[2,110]),t(g,[2,109]),t(g,[2,98]),t(g,[2,97]),t(g,[2,96]),t(g,[2,95]),t(g,[2,93]),t(g,[2,94]),t(g,[2,92]),t(g,[2,91]),t(g,[2,90]),t(g,[2,89]),t(g,[2,87]),t(g,[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(N,D){if(D.recoverable)this.trace(N);else{var w=new Error(N);throw w.hash=D,w}},parse:function(N){var D=this,w=[0],v=[],M=[null],m=[],Q=this.table,x="",ct=0,Dt=0,kt=2,j=1,ot=m.slice.call(arguments,1),rt=Object.create(this.lexer),nt={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(nt.yy[ut]=this.yy[ut]);rt.setInput(N,nt.yy),nt.yy.lexer=rt,nt.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var _t=rt.yylloc;m.push(_t);var K=rt.options&&rt.options.ranges;typeof nt.yy.parseError=="function"?this.parseError=nt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Yt;return Yt=v.pop()||rt.lex()||j,typeof Yt!="number"&&(Yt instanceof Array&&(v=Yt,Yt=v.pop()),Yt=D.symbols_[Yt]||Yt),Yt}for(var P,z,X,F,O={},A,J,C,ht;;){if(z=w[w.length-1],this.defaultActions[z]?X=this.defaultActions[z]:((P===null||typeof P>"u")&&(P=Ot()),X=Q[z]&&Q[z][P]),typeof X>"u"||!X.length||!X[0]){var U="";ht=[];for(A in Q[z])this.terminals_[A]&&A>kt&&ht.push("'"+this.terminals_[A]+"'");rt.showPosition?U="Parse error on line "+(ct+1)+`:
`+rt.showPosition()+`
Expecting `+ht.join(", ")+", got '"+(this.terminals_[P]||P)+"'":U="Parse error on line "+(ct+1)+": Unexpected "+(P==j?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(U,{text:rt.match,token:this.terminals_[P]||P,line:rt.yylineno,loc:_t,expected:ht})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+P);switch(X[0]){case 1:w.push(P),M.push(rt.yytext),m.push(rt.yylloc),w.push(X[1]),P=null,Dt=rt.yyleng,x=rt.yytext,ct=rt.yylineno,_t=rt.yylloc;break;case 2:if(J=this.productions_[X[1]][1],O.$=M[M.length-J],O._$={first_line:m[m.length-(J||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(J||1)].first_column,last_column:m[m.length-1].last_column},K&&(O._$.range=[m[m.length-(J||1)].range[0],m[m.length-1].range[1]]),F=this.performAction.apply(O,[x,Dt,ct,nt.yy,X[1],M,m].concat(ot)),typeof F<"u")return F;J&&(w=w.slice(0,-1*J*2),M=M.slice(0,-1*J),m=m.slice(0,-1*J)),w.push(this.productions_[X[1]][0]),M.push(O.$),m.push(O._$),C=Q[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},G=function(){var W={EOF:1,parseError:function(D,w){if(this.yy.parser)this.yy.parser.parseError(D,w);else throw new Error(D)},setInput:function(N,D){return this.yy=D||this.yy||{},this._input=N,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 N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var D=N.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},unput:function(N){var D=N.length,w=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var v=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),w.length-1&&(this.yylineno-=w.length-1);var M=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:w?(w.length===v.length?this.yylloc.first_column:0)+v[v.length-w.length].length-w[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),D=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
`+D+"^"},test_match:function(N,D){var w,v,M;if(this.options.backtrack_lexer&&(M={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&&(M.yylloc.range=this.yylloc.range.slice(0))),v=N[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,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(N[0].length),this.matched+=N[0],w=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var m in M)this[m]=M[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,D,w,v;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),m=0;m<M.length;m++)if(w=this._input.match(this.rules[M[m]]),w&&(!D||w[0].length>D[0].length)){if(D=w,v=m,this.options.backtrack_lexer){if(N=this.test_match(w,M[m]),N!==!1)return N;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(N=this.test_match(D,M[v]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var D=this.next();return D||this.lex()},begin:function(D){this.conditionStack.push(D)},popState:function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},pushState:function(D){this.begin(D)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(D,w,v,M){switch(v){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:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;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:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();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}}};return W}();H.lexer=G;function Y(){this.yy={}}return Y.prototype=H,H.Parser=Y,new Y}();C1.parser=C1;const gE=C1,yE=t=>t.match(/^\s*gitGraph/)!==null;let S1="",Nc="",A1="";const L1=t=>yn(t,$()),vn=function(){S1="",A1="",Nc=""},nn=function(t){S1=L1(t).replace(/^\s+/g,"")},kn=function(){return S1||Nc},wn=function(t){A1=L1(t).replace(/\n\s+/g,`
`)},Tn=function(){return A1},hi=function(t){Nc=L1(t)},di=function(){return Nc};let Bc=$().gitGraph.mainBranchName,mE=$().gitGraph.mainBranchOrder,cr={},Br=null,mo={};mo[Bc]={name:Bc,order:mE};let rr={};rr[Bc]=Br;let mr=Bc,hg="LR",xs=0;function D1(){return Fp({length:7})}const bE=function(t,e,r){ze.parseDirective(this,t,e,r)};function _E(t,e){const r=Object.create(null);return t.reduce((n,i)=>{const s=e(i);return r[s]||(r[s]=!0,n.push(i)),n},[])}const xE=function(t){hg=t};let dg={};const vE=function(t){B.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{dg=JSON.parse(t)}catch(e){B.error("error while parsing gitGraph options",e.message)}},kE=function(){return dg},wE=function(t,e,r,n){B.debug("Entering commit:",t,e,r,n),e=he.sanitizeText(e,$()),t=he.sanitizeText(t,$()),n=he.sanitizeText(n,$());const i={id:e||xs+"-"+D1(),message:t,seq:xs++,type:r||bo.NORMAL,tag:n||"",parents:Br==null?[]:[Br.id],branch:mr};Br=i,cr[i.id]=i,rr[mr]=i.id,B.debug("in pushCommit "+i.id)},TE=function(t,e){if(t=he.sanitizeText(t,$()),rr[t]===void 0)rr[t]=Br!=null?Br.id:null,mo[t]={name:t,order:e?parseInt(e,10):null},fg(t),B.debug("in createBranch");else{let r=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 '+t+'")');throw r.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},r}},EE=function(t,e,r,n){t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$());const i=cr[rr[mr]],s=cr[rr[t]];if(mr===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(i===void 0||!i){let o=new Error('Incorrect usage of "merge". Current branch ('+mr+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(rr[t]===void 0){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(s===void 0||!s){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(i===s){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&cr[e]!==void 0){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+r+n,token:"merge "+t+e+r+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+n]},o}const a={id:e||xs+"-"+D1(),message:"merged branch "+t+" into "+mr,seq:xs++,parents:[Br==null?null:Br.id,rr[t]],branch:mr,type:bo.MERGE,customType:r,customId:!!e,tag:n||""};Br=a,cr[a.id]=a,rr[mr]=a.id,B.debug(rr),B.debug("in mergeBranch")},CE=function(t,e,r){if(B.debug("Entering cherryPick:",t,e,r),t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$()),r=he.sanitizeText(r,$()),!t||cr[t]===void 0){let s=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}let n=cr[t],i=n.branch;if(n.type===bo.MERGE){let s=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}if(!e||cr[e]===void 0){if(i===mr){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const s=cr[rr[mr]];if(s===void 0||!s){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+mr+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a={id:xs+"-"+D1(),message:"cherry-picked "+n+" into "+mr,seq:xs++,parents:[Br==null?null:Br.id,n.id],branch:mr,type:bo.CHERRY_PICK,tag:r!=null?r:"cherry-pick:"+n.id};Br=a,cr[a.id]=a,rr[mr]=a.id,B.debug(rr),B.debug("in cherryPick")}},fg=function(t){if(t=he.sanitizeText(t,$()),rr[t]===void 0){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{mr=t;const e=rr[mr];Br=cr[e]}};function pg(t,e,r){const n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function gg(t){const e=t.reduce((i,s)=>i.seq>s.seq?i:s,t[0]);let r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});const n=[r,e.id,e.seq];for(let i in rr)rr[i]===e.id&&n.push(i);if(B.debug(n.join(" ")),e.parents&&e.parents.length==2){const i=cr[e.parents[0]];pg(t,e,i),t.push(cr[e.parents[1]])}else{if(e.parents.length==0)return;{const i=cr[e.parents];pg(t,e,i)}}t=_E(t,i=>i.id),gg(t)}const SE=function(){B.debug(cr);const t=yg()[0];gg([t])},AE=function(){cr={},Br=null;let t=$().gitGraph.mainBranchName,e=$().gitGraph.mainBranchOrder;rr={},rr[t]=null,mo={},mo[t]={name:t,order:e},mr=t,xs=0,vn()},LE=function(){return Object.values(mo).map((e,r)=>e.order!==null?e:{...e,order:parseFloat(`0.${r}`,10)}).sort((e,r)=>e.order-r.order).map(({name:e})=>({name:e}))},DE=function(){return rr},ME=function(){return cr},yg=function(){const t=Object.keys(cr).map(function(e){return cr[e]});return t.forEach(function(e){B.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},NE=function(){return mr},BE=function(){return hg},IE=function(){return Br},bo={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},OE={parseDirective:bE,getConfig:()=>$().gitGraph,setDirection:xE,setOptions:vE,getOptions:kE,commit:wE,branch:TE,merge:EE,cherryPick:CE,checkout:fg,prettyPrint:SE,clear:AE,getBranchesAsObjArray:LE,getBranches:DE,getCommits:ME,getCommitsArray:yg,getCurrentBranch:NE,getDirection:BE,getHead:IE,setAccTitle:nn,getAccTitle:kn,getAccDescription:Tn,setAccDescription:wn,setDiagramTitle:hi,getDiagramTitle:di,commitType:bo};let _o={};const qr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},vs=8;let Yr={},Ic={},Oc=[],Rc=0;const RE=()=>{Yr={},Ic={},_o={},Rc=0,Oc=[]},FE=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];typeof t=="string"?r=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?r=t:r=[];for(const n of r){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}return e},mg=(t,e,r)=>{const n=yo().gitGraph,i=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((u,d)=>e[u].seq-e[d].seq).forEach(u=>{const d=e[u],f=Yr[d.branch].pos,p=a+10;if(r){let g,b=d.customType!==void 0&&d.customType!==""?d.customType:d.type;switch(b){case qr.NORMAL:g="commit-normal";break;case qr.REVERSE:g="commit-reverse";break;case qr.HIGHLIGHT:g="commit-highlight";break;case qr.MERGE:g="commit-merge";break;case qr.CHERRY_PICK:g="commit-cherry-pick";break;default:g="commit-normal"}if(b===qr.HIGHLIGHT){const k=i.append("rect");k.attr("x",p-10),k.attr("y",f-10),k.attr("height",20),k.attr("width",20),k.attr("class",`commit ${d.id} commit-highlight${Yr[d.branch].index%vs} ${g}-outer`),i.append("rect").attr("x",p-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${d.id} commit${Yr[d.branch].index%vs} ${g}-inner`)}else if(b===qr.CHERRY_PICK)i.append("circle").attr("cx",p).attr("cy",f).attr("r",10).attr("class",`commit ${d.id} ${g}`),i.append("circle").attr("cx",p-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),i.append("circle").attr("cx",p+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),i.append("line").attr("x1",p+3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`),i.append("line").attr("x1",p-3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`);else{const k=i.append("circle");if(k.attr("cx",p),k.attr("cy",f),k.attr("r",d.type===qr.MERGE?9:10),k.attr("class",`commit ${d.id} commit${Yr[d.branch].index%vs}`),b===qr.MERGE){const T=i.append("circle");T.attr("cx",p),T.attr("cy",f),T.attr("r",6),T.attr("class",`commit ${g} ${d.id} commit${Yr[d.branch].index%vs}`)}b===qr.REVERSE&&i.append("path").attr("d",`M ${p-5},${f-5}L${p+5},${f+5}M${p-5},${f+5}L${p+5},${f-5}`).attr("class",`commit ${g} ${d.id} commit${Yr[d.branch].index%vs}`)}}if(Ic[d.id]={x:a+10,y:f},r){if(d.type!==qr.CHERRY_PICK&&(d.customId&&d.type===qr.MERGE||d.type!==qr.MERGE)&&n.showCommitLabel){const k=s.append("g"),T=k.insert("rect").attr("class","commit-label-bkg"),L=k.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(d.id);let E=L.node().getBBox();if(T.attr("x",a+10-E.width/2-2).attr("y",f+13.5).attr("width",E.width+2*2).attr("height",E.height+2*2),L.attr("x",a+10-E.width/2),n.rotateCommitLabel){let I=-7.5-(E.width+10)/25*9.5,V=10+E.width/25*8.5;k.attr("transform","translate("+I+", "+V+") rotate("+-45+", "+a+", "+f+")")}}if(d.tag){const k=s.insert("polygon"),T=s.append("circle"),L=s.append("text").attr("y",f-16).attr("class","tag-label").text(d.tag);let E=L.node().getBBox();L.attr("x",a+10-E.width/2);const I=E.height/2,V=f-19.2;k.attr("class","tag-label-bkg").attr("points",`
${a-E.width/2-4/2},${V+2}
${a-E.width/2-4/2},${V-2}
${a+10-E.width/2-4},${V-I-2}
${a+10+E.width/2+4},${V-I-2}
${a+10+E.width/2+4},${V+I+2}
${a+10-E.width/2-4},${V+I+2}`),T.attr("cx",a-E.width/2+4/2).attr("cy",V).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Rc&&(Rc=a)})},PE=(t,e,r)=>Object.keys(r).filter(s=>r[s].branch===e.branch&&r[s].seq>t.seq&&r[s].seq<e.seq).length>0,M1=(t,e,r=0)=>{const n=t+Math.abs(t-e)/2;if(r>5)return n;if(Oc.every(a=>Math.abs(a-n)>=10))return Oc.push(n),n;const s=Math.abs(t-e);return M1(t,e-s/5,r+1)},YE=(t,e,r,n)=>{const i=Ic[e.id],s=Ic[r.id],a=PE(e,r,n);let o="",l="",u=0,d=0,f=Yr[r.branch].index,p;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,d=10,f=Yr[r.branch].index;const g=i.y<s.y?M1(i.y,s.y):M1(s.y,i.y);i.y<s.y?p=`M ${i.x} ${i.y} L ${i.x} ${g-u} ${o} ${i.x+d} ${g} L ${s.x-u} ${g} ${l} ${s.x} ${g+d} L ${s.x} ${s.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${g+u} ${l} ${i.x+d} ${g} L ${s.x-u} ${g} ${o} ${s.x} ${g-d} L ${s.x} ${s.y}`}else i.y<s.y&&(o="A 20 20, 0, 0, 0,",u=20,d=20,f=Yr[r.branch].index,p=`M ${i.x} ${i.y} L ${i.x} ${s.y-u} ${o} ${i.x+d} ${s.y} L ${s.x} ${s.y}`),i.y>s.y&&(o="A 20 20, 0, 0, 0,",u=20,d=20,f=Yr[e.branch].index,p=`M ${i.x} ${i.y} L ${s.x-u} ${i.y} ${o} ${s.x} ${i.y-d} L ${s.x} ${s.y}`),i.y===s.y&&(f=Yr[e.branch].index,p=`M ${i.x} ${i.y} L ${i.x} ${s.y-u} ${o} ${i.x+d} ${s.y} L ${s.x} ${s.y}`);t.append("path").attr("d",p).attr("class","arrow arrow"+f%vs)},VE=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(n=>{const i=e[n];i.parents&&i.parents.length>0&&i.parents.forEach(s=>{YE(r,e[s],i,e)})})},UE=(t,e)=>{const r=yo().gitGraph,n=t.append("g");e.forEach((i,s)=>{const a=s%vs,o=Yr[i.name].pos,l=n.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",Rc),l.attr("y2",o),l.attr("class","branch branch"+a),Oc.push(o);let u=i.name;const d=FE(u),f=n.insert("rect"),g=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);g.node().appendChild(d);let b=d.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-b.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-b.height/2+8).attr("width",b.width+18).attr("height",b.height+4),g.attr("transform","translate("+(-b.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(o-b.height/2-1)+")"),f.attr("transform","translate("+-19+", "+(o-b.height/2)+")")})},zE={draw:function(t,e,r,n){var u;RE();const i=yo(),s=i.gitGraph;B.debug("in gitgraph renderer",t+`
`,"id:",e,r),_o=n.db.getCommits();const a=n.db.getBranchesAsObjArray();let o=0;a.forEach((d,f)=>{Yr[d.name]={pos:o,index:f},o+=50+(s.rotateCommitLabel?40:0)});const l=St(`[id="${e}"]`);mg(l,_o,!1),s.showBranches&&UE(l,a),VE(l,_o),mg(l,_o,!0),ge.insertTitle(l,"gitTitleText",s.titleTopMargin,n.db.getDiagramTitle()),cg(void 0,l,s.diagramPadding,(u=s.useMaxWidth)!=null?u:i.useMaxWidth)}},WE=t=>`
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0,1,2,3,4,5,6,7].map(e=>`
.branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
.commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
.commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
.label${e} { fill: ${t["git"+e]}; }
.arrow${e} { stroke: ${t["git"+e]}; }
`).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${t.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
.tag-hole { fill: ${t.textColor}; }
.commit-merge {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.commit-reverse {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${t.primaryColor};
fill: ${t.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
}
`;var Fc=function(){var t=function(Ft,xt,ft,Lt){for(ft=ft||{},Lt=Ft.length;Lt--;ft[Ft[Lt]]=xt);return ft},e=[1,6],r=[1,7],n=[1,8],i=[1,9],s=[1,16],a=[1,11],o=[1,12],l=[1,13],u=[1,14],d=[1,15],f=[1,27],p=[1,33],g=[1,34],b=[1,35],k=[1,36],T=[1,37],L=[1,72],E=[1,73],I=[1,74],V=[1,75],H=[1,76],G=[1,77],Y=[1,78],W=[1,38],N=[1,39],D=[1,40],w=[1,41],v=[1,42],M=[1,43],m=[1,44],Q=[1,45],x=[1,46],ct=[1,47],Dt=[1,48],kt=[1,49],j=[1,50],ot=[1,51],rt=[1,52],nt=[1,53],ut=[1,54],_t=[1,55],K=[1,56],Ot=[1,57],P=[1,59],z=[1,60],X=[1,61],F=[1,62],O=[1,63],A=[1,64],J=[1,65],C=[1,66],ht=[1,67],U=[1,68],Yt=[1,69],et=[24,52],Mt=[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],Tt=[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],gt=[1,94],Et=[1,95],wt=[1,96],pt=[1,97],st=[15,24,52],le=[7,8,9,10,18,22,25,26,27,28],Xt=[15,24,43,52],jt=[15,24,43,52,86,87,89,90],Kt=[15,43],Gt=[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],Ee={trace:function(){},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(xt,ft,Lt,bt,Ut,at,ie){var dt=at.length-1;switch(Ut){case 4:bt.setDirection("TB");break;case 5:bt.setDirection("BT");break;case 6:bt.setDirection("RL");break;case 7:bt.setDirection("LR");break;case 11:bt.parseDirective("%%{","open_directive");break;case 12:break;case 13:at[dt]=at[dt].trim().replace(/'/g,'"'),bt.parseDirective(at[dt],"arg_directive");break;case 14:bt.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:bt.setC4Type(at[dt-3]);break;case 26:bt.setTitle(at[dt].substring(6)),this.$=at[dt].substring(6);break;case 27:bt.setAccDescription(at[dt].substring(15)),this.$=at[dt].substring(15);break;case 28:this.$=at[dt].trim(),bt.setTitle(this.$);break;case 29:case 30:this.$=at[dt].trim(),bt.setAccDescription(this.$);break;case 35:case 36:at[dt].splice(2,0,"ENTERPRISE"),bt.addPersonOrSystemBoundary(...at[dt]),this.$=at[dt];break;case 37:bt.addPersonOrSystemBoundary(...at[dt]),this.$=at[dt];break;case 38:at[dt].splice(2,0,"CONTAINER"),bt.addContainerBoundary(...at[dt]),this.$=at[dt];break;case 39:bt.addDeploymentNode("node",...at[dt]),this.$=at[dt];break;case 40:bt.addDeploymentNode("nodeL",...at[dt]),this.$=at[dt];break;case 41:bt.addDeploymentNode("nodeR",...at[dt]),this.$=at[dt];break;case 42:bt.popBoundaryParseStack();break;case 46:bt.addPersonOrSystem("person",...at[dt]),this.$=at[dt];break;case 47:bt.addPersonOrSystem("external_person",...at[dt]),this.$=at[dt];break;case 48:bt.addPersonOrSystem("system",...at[dt]),this.$=at[dt];break;case 49:bt.addPersonOrSystem("system_db",...at[dt]),this.$=at[dt];break;case 50:bt.addPersonOrSystem("system_queue",...at[dt]),this.$=at[dt];break;case 51:bt.addPersonOrSystem("external_system",...at[dt]),this.$=at[dt];break;case 52:bt.addPersonOrSystem("external_system_db",...at[dt]),this.$=at[dt];break;case 53:bt.addPersonOrSystem("external_system_queue",...at[dt]),this.$=at[dt];break;case 54:bt.addContainer("container",...at[dt]),this.$=at[dt];break;case 55:bt.addContainer("container_db",...at[dt]),this.$=at[dt];break;case 56:bt.addContainer("container_queue",...at[dt]),this.$=at[dt];break;case 57:bt.addContainer("external_container",...at[dt]),this.$=at[dt];break;case 58:bt.addContainer("external_container_db",...at[dt]),this.$=at[dt];break;case 59:bt.addContainer("external_container_queue",...at[dt]),this.$=at[dt];break;case 60:bt.addComponent("component",...at[dt]),this.$=at[dt];break;case 61:bt.addComponent("component_db",...at[dt]),this.$=at[dt];break;case 62:bt.addComponent("component_queue",...at[dt]),this.$=at[dt];break;case 63:bt.addComponent("external_component",...at[dt]),this.$=at[dt];break;case 64:bt.addComponent("external_component_db",...at[dt]),this.$=at[dt];break;case 65:bt.addComponent("external_component_queue",...at[dt]),this.$=at[dt];break;case 67:bt.addRel("rel",...at[dt]),this.$=at[dt];break;case 68:bt.addRel("birel",...at[dt]),this.$=at[dt];break;case 69:bt.addRel("rel_u",...at[dt]),this.$=at[dt];break;case 70:bt.addRel("rel_d",...at[dt]),this.$=at[dt];break;case 71:bt.addRel("rel_l",...at[dt]),this.$=at[dt];break;case 72:bt.addRel("rel_r",...at[dt]),this.$=at[dt];break;case 73:bt.addRel("rel_b",...at[dt]),this.$=at[dt];break;case 74:at[dt].splice(0,1),bt.addRel("rel",...at[dt]),this.$=at[dt];break;case 75:bt.updateElStyle("update_el_style",...at[dt]),this.$=at[dt];break;case 76:bt.updateRelStyle("update_rel_style",...at[dt]),this.$=at[dt];break;case 77:bt.updateLayoutConfig("update_layout_config",...at[dt]),this.$=at[dt];break;case 78:this.$=[at[dt]];break;case 79:at[dt].unshift(at[dt-1]),this.$=at[dt];break;case 80:case 82:this.$=at[dt].trim();break;case 81:let ee={};ee[at[dt-1].trim()]=at[dt].trim(),this.$=ee;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:e,8:r,9:n,10:i,11:5,12:10,18:s,22:a,25:o,26:l,27:u,28:d},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:r,9:n,10:i,11:5,12:10,18:s,22:a,25:o,26:l,27:u,28:d},{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:f},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:p,33:g,34:b,36:k,38:T,39:58,40:70,42:71,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,53:32,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt},{23:79,29:29,30:30,31:31,32:p,33:g,34:b,36:k,38:T,39:58,40:70,42:71,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,53:32,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt},{23:80,29:29,30:30,31:31,32:p,33:g,34:b,36:k,38:T,39:58,40:70,42:71,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,53:32,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt},{23:81,29:29,30:30,31:31,32:p,33:g,34:b,36:k,38:T,39:58,40:70,42:71,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,53:32,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt},{23:82,29:29,30:30,31:31,32:p,33:g,34:b,36:k,38:T,39:58,40:70,42:71,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,53:32,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(et,[2,20],{53:32,39:58,40:70,42:71,30:87,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt}),t(et,[2,21]),t(Mt,[2,23],{15:[1,88]}),t(et,[2,43],{15:[1,89]}),t(Tt,[2,26]),t(Tt,[2,27]),{35:[1,90]},{37:[1,91]},t(Tt,[2,30]),{45:92,85:93,86:gt,87:Et,89:wt,90:pt},{45:98,85:93,86:gt,87:Et,89:wt,90:pt},{45:99,85:93,86:gt,87:Et,89:wt,90:pt},{45:100,85:93,86:gt,87:Et,89:wt,90:pt},{45:101,85:93,86:gt,87:Et,89:wt,90:pt},{45:102,85:93,86:gt,87:Et,89:wt,90:pt},{45:103,85:93,86:gt,87:Et,89:wt,90:pt},{45:104,85:93,86:gt,87:Et,89:wt,90:pt},{45:105,85:93,86:gt,87:Et,89:wt,90:pt},{45:106,85:93,86:gt,87:Et,89:wt,90:pt},{45:107,85:93,86:gt,87:Et,89:wt,90:pt},{45:108,85:93,86:gt,87:Et,89:wt,90:pt},{45:109,85:93,86:gt,87:Et,89:wt,90:pt},{45:110,85:93,86:gt,87:Et,89:wt,90:pt},{45:111,85:93,86:gt,87:Et,89:wt,90:pt},{45:112,85:93,86:gt,87:Et,89:wt,90:pt},{45:113,85:93,86:gt,87:Et,89:wt,90:pt},{45:114,85:93,86:gt,87:Et,89:wt,90:pt},{45:115,85:93,86:gt,87:Et,89:wt,90:pt},{45:116,85:93,86:gt,87:Et,89:wt,90:pt},t(st,[2,66]),{45:117,85:93,86:gt,87:Et,89:wt,90:pt},{45:118,85:93,86:gt,87:Et,89:wt,90:pt},{45:119,85:93,86:gt,87:Et,89:wt,90:pt},{45:120,85:93,86:gt,87:Et,89:wt,90:pt},{45:121,85:93,86:gt,87:Et,89:wt,90:pt},{45:122,85:93,86:gt,87:Et,89:wt,90:pt},{45:123,85:93,86:gt,87:Et,89:wt,90:pt},{45:124,85:93,86:gt,87:Et,89:wt,90:pt},{45:125,85:93,86:gt,87:Et,89:wt,90:pt},{45:126,85:93,86:gt,87:Et,89:wt,90:pt},{45:127,85:93,86:gt,87:Et,89:wt,90:pt},{30:128,39:58,40:70,42:71,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,53:32,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt},{15:[1,130],43:[1,129]},{45:131,85:93,86:gt,87:Et,89:wt,90:pt},{45:132,85:93,86:gt,87:Et,89:wt,90:pt},{45:133,85:93,86:gt,87:Et,89:wt,90:pt},{45:134,85:93,86:gt,87:Et,89:wt,90:pt},{45:135,85:93,86:gt,87:Et,89:wt,90:pt},{45:136,85:93,86:gt,87:Et,89:wt,90:pt},{45:137,85:93,86:gt,87:Et,89:wt,90:pt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(le,[2,9]),{14:142,21:f},{21:[2,13]},{1:[2,15]},t(et,[2,22]),t(Mt,[2,24],{31:31,29:143,32:p,33:g,34:b,36:k,38:T}),t(et,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:p,33:g,34:b,36:k,38:T,44:L,46:E,47:I,48:V,49:H,50:G,51:Y,54:W,55:N,56:D,57:w,58:v,59:M,60:m,61:Q,62:x,63:ct,64:Dt,65:kt,66:j,67:ot,68:rt,69:nt,70:ut,71:_t,72:K,73:Ot,74:P,75:z,76:X,77:F,78:O,79:A,80:J,81:C,82:ht,83:U,84:Yt}),t(Tt,[2,28]),t(Tt,[2,29]),t(st,[2,46]),t(Xt,[2,78],{85:93,45:145,86:gt,87:Et,89:wt,90:pt}),t(jt,[2,80]),{88:[1,146]},t(jt,[2,82]),t(jt,[2,83]),t(st,[2,47]),t(st,[2,48]),t(st,[2,49]),t(st,[2,50]),t(st,[2,51]),t(st,[2,52]),t(st,[2,53]),t(st,[2,54]),t(st,[2,55]),t(st,[2,56]),t(st,[2,57]),t(st,[2,58]),t(st,[2,59]),t(st,[2,60]),t(st,[2,61]),t(st,[2,62]),t(st,[2,63]),t(st,[2,64]),t(st,[2,65]),t(st,[2,67]),t(st,[2,68]),t(st,[2,69]),t(st,[2,70]),t(st,[2,71]),t(st,[2,72]),t(st,[2,73]),t(st,[2,74]),t(st,[2,75]),t(st,[2,76]),t(st,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(Kt,[2,35]),t(Kt,[2,36]),t(Kt,[2,37]),t(Kt,[2,38]),t(Kt,[2,39]),t(Kt,[2,40]),t(Kt,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Mt,[2,25]),t(et,[2,45]),t(Xt,[2,79]),t(jt,[2,81]),t(st,[2,31]),t(st,[2,42]),t(Gt,[2,32]),t(Gt,[2,33],{15:[1,152]}),t(le,[2,10]),t(Gt,[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(xt,ft){if(ft.recoverable)this.trace(xt);else{var Lt=new Error(xt);throw Lt.hash=ft,Lt}},parse:function(xt){var ft=this,Lt=[0],bt=[],Ut=[null],at=[],ie=this.table,dt="",ee=0,fe=0,be=2,_e=1,ke=at.slice.call(arguments,1),$t=Object.create(this.lexer),se={yy:{}};for(var ye in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ye)&&(se.yy[ye]=this.yy[ye]);$t.setInput(xt,se.yy),se.yy.lexer=$t,se.yy.parser=this,typeof $t.yylloc>"u"&&($t.yylloc={});var Jt=$t.yylloc;at.push(Jt);var Nn=$t.options&&$t.options.ranges;typeof se.yy.parseError=="function"?this.parseError=se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xr(){var Z;return Z=bt.pop()||$t.lex()||_e,typeof Z!="number"&&(Z instanceof Array&&(bt=Z,Z=bt.pop()),Z=ft.symbols_[Z]||Z),Z}for(var De,ae,Be,Re,Pe={},Ye,Ie,$e,ar;;){if(ae=Lt[Lt.length-1],this.defaultActions[ae]?Be=this.defaultActions[ae]:((De===null||typeof De>"u")&&(De=Xr()),Be=ie[ae]&&ie[ae][De]),typeof Be>"u"||!Be.length||!Be[0]){var zt="";ar=[];for(Ye in ie[ae])this.terminals_[Ye]&&Ye>be&&ar.push("'"+this.terminals_[Ye]+"'");$t.showPosition?zt="Parse error on line "+(ee+1)+`:
`+$t.showPosition()+`
Expecting `+ar.join(", ")+", got '"+(this.terminals_[De]||De)+"'":zt="Parse error on line "+(ee+1)+": Unexpected "+(De==_e?"end of input":"'"+(this.terminals_[De]||De)+"'"),this.parseError(zt,{text:$t.match,token:this.terminals_[De]||De,line:$t.yylineno,loc:Jt,expected:ar})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ae+", token: "+De);switch(Be[0]){case 1:Lt.push(De),Ut.push($t.yytext),at.push($t.yylloc),Lt.push(Be[1]),De=null,fe=$t.yyleng,dt=$t.yytext,ee=$t.yylineno,Jt=$t.yylloc;break;case 2:if(Ie=this.productions_[Be[1]][1],Pe.$=Ut[Ut.length-Ie],Pe._$={first_line:at[at.length-(Ie||1)].first_line,last_line:at[at.length-1].last_line,first_column:at[at.length-(Ie||1)].first_column,last_column:at[at.length-1].last_column},Nn&&(Pe._$.range=[at[at.length-(Ie||1)].range[0],at[at.length-1].range[1]]),Re=this.performAction.apply(Pe,[dt,fe,ee,se.yy,Be[1],Ut,at].concat(ke)),typeof Re<"u")return Re;Ie&&(Lt=Lt.slice(0,-1*Ie*2),Ut=Ut.slice(0,-1*Ie),at=at.slice(0,-1*Ie)),Lt.push(this.productions_[Be[1]][0]),Ut.push(Pe.$),at.push(Pe._$),$e=ie[Lt[Lt.length-2]][Lt[Lt.length-1]],Lt.push($e);break;case 3:return!0}}return!0}},Ht=function(){var Ft={EOF:1,parseError:function(ft,Lt){if(this.yy.parser)this.yy.parser.parseError(ft,Lt);else throw new Error(ft)},setInput:function(xt,ft){return this.yy=ft||this.yy||{},this._input=xt,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 xt=this._input[0];this.yytext+=xt,this.yyleng++,this.offset++,this.match+=xt,this.matched+=xt;var ft=xt.match(/(?:\r\n?|\n).*/g);return ft?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),xt},unput:function(xt){var ft=xt.length,Lt=xt.split(/(?:\r\n?|\n)/g);this._input=xt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ft),this.offset-=ft;var bt=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),Lt.length-1&&(this.yylineno-=Lt.length-1);var Ut=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:Lt?(Lt.length===bt.length?this.yylloc.first_column:0)+bt[bt.length-Lt.length].length-Lt[0].length:this.yylloc.first_column-ft},this.options.ranges&&(this.yylloc.range=[Ut[0],Ut[0]+this.yyleng-ft]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(xt){this.unput(this.match.slice(xt))},pastInput:function(){var xt=this.matched.substr(0,this.matched.length-this.match.length);return(xt.length>20?"...":"")+xt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var xt=this.match;return xt.length<20&&(xt+=this._input.substr(0,20-xt.length)),(xt.substr(0,20)+(xt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var xt=this.pastInput(),ft=new Array(xt.length+1).join("-");return xt+this.upcomingInput()+`
`+ft+"^"},test_match:function(xt,ft){var Lt,bt,Ut;if(this.options.backtrack_lexer&&(Ut={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&&(Ut.yylloc.range=this.yylloc.range.slice(0))),bt=xt[0].match(/(?:\r\n?|\n).*/g),bt&&(this.yylineno+=bt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:bt?bt[bt.length-1].length-bt[bt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+xt[0].length},this.yytext+=xt[0],this.match+=xt[0],this.matches=xt,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(xt[0].length),this.matched+=xt[0],Lt=this.performAction.call(this,this.yy,this,ft,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Lt)return Lt;if(this._backtrack){for(var at in Ut)this[at]=Ut[at];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var xt,ft,Lt,bt;this._more||(this.yytext="",this.match="");for(var Ut=this._currentRules(),at=0;at<Ut.length;at++)if(Lt=this._input.match(this.rules[Ut[at]]),Lt&&(!ft||Lt[0].length>ft[0].length)){if(ft=Lt,bt=at,this.options.backtrack_lexer){if(xt=this.test_match(Lt,Ut[at]),xt!==!1)return xt;if(this._backtrack){ft=!1;continue}else return!1}else if(!this.options.flex)break}return ft?(xt=this.test_match(ft,Ut[bt]),xt!==!1?xt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ft=this.next();return ft||this.lex()},begin:function(ft){this.conditionStack.push(ft)},popState:function(){var ft=this.conditionStack.length-1;return ft>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(ft){return ft=this.conditionStack.length-1-Math.abs(ft||0),ft>=0?this.conditionStack[ft]:"INITIAL"},pushState:function(ft){this.begin(ft)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ft,Lt,bt,Ut){switch(bt){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:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;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:return this.begin("node"),49;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:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;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:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79: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 84:this.popState(),this.popState();break;case 85:return"STR";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}}};return Ft}();Ee.lexer=Ht;function Vt(){this.yy={}}return Vt.prototype=Ee,Ee.Parser=Vt,new Vt}();Fc.parser=Fc;const HE=Fc,GE=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let En=[],zi=[""],Ir="global",Cn="",zn=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],xo=[],N1="",B1=!1,Pc=4,Yc=2;var bg;const qE=function(){return bg},jE=function(t){bg=yn(t,$())},$E=function(t,e,r){ze.parseDirective(this,t,e,r)},XE=function(t,e,r,n,i,s,a,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let u={};const d=xo.find(f=>f.from===e&&f.to===r);if(d?u=d:xo.push(u),u.type=t,u.from=e,u.to=r,u.label={text:n},i==null)u.techn={text:""};else if(typeof i=="object"){let[f,p]=Object.entries(i)[0];u[f]={text:p}}else u.techn={text:i};if(s==null)u.descr={text:""};else if(typeof s=="object"){let[f,p]=Object.entries(s)[0];u[f]={text:p}}else u.descr={text:s};if(typeof a=="object"){let[f,p]=Object.entries(a)[0];u[f]=p}else u.sprite=a;if(typeof o=="object"){let[f,p]=Object.entries(o)[0];u[f]=p}else u.tags=o;if(typeof l=="object"){let[f,p]=Object.entries(l)[0];u[f]=p}else u.link=l;u.wrap=Wi()},KE=function(t,e,r,n,i,s,a){if(e===null||r===null)return;let o={};const l=En.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,En.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,d]=Object.entries(n)[0];o[u]={text:d}}else o.descr={text:n};if(typeof i=="object"){let[u,d]=Object.entries(i)[0];o[u]=d}else o.sprite=i;if(typeof s=="object"){let[u,d]=Object.entries(s)[0];o[u]=d}else o.tags=s;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];o[u]=d}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=Ir,o.wrap=Wi()},ZE=function(t,e,r,n,i,s,a,o){if(e===null||r===null)return;let l={};const u=En.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,En.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.descr={text:i};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=Wi(),l.typeC4Shape={text:t},l.parentBoundary=Ir},QE=function(t,e,r,n,i,s,a,o){if(e===null||r===null)return;let l={};const u=En.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,En.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.descr={text:i};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=Wi(),l.typeC4Shape={text:t},l.parentBoundary=Ir},JE=function(t,e,r,n,i){if(t===null||e===null)return;let s={};const a=zn.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,zn.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.link=i;s.parentBoundary=Ir,s.wrap=Wi(),Cn=Ir,Ir=t,zi.push(Cn)},tC=function(t,e,r,n,i){if(t===null||e===null)return;let s={};const a=zn.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,zn.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.link=i;s.parentBoundary=Ir,s.wrap=Wi(),Cn=Ir,Ir=t,zi.push(Cn)},eC=function(t,e,r,n,i,s,a,o){if(e===null||r===null)return;let l={};const u=zn.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,zn.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.type={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.nodeType=t,l.parentBoundary=Ir,l.wrap=Wi(),Cn=Ir,Ir=e,zi.push(Cn)},rC=function(){Ir=Cn,zi.pop(),Cn=zi.pop(),zi.push(Cn)},nC=function(t,e,r,n,i,s,a,o,l,u,d){let f=En.find(p=>p.alias===e);if(!(f===void 0&&(f=zn.find(p=>p.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,g]=Object.entries(r)[0];f[p]=g}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,g]=Object.entries(n)[0];f[p]=g}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,g]=Object.entries(i)[0];f[p]=g}else f.borderColor=i;if(s!=null)if(typeof s=="object"){let[p,g]=Object.entries(s)[0];f[p]=g}else f.shadowing=s;if(a!=null)if(typeof a=="object"){let[p,g]=Object.entries(a)[0];f[p]=g}else f.shape=a;if(o!=null)if(typeof o=="object"){let[p,g]=Object.entries(o)[0];f[p]=g}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[p,g]=Object.entries(l)[0];f[p]=g}else f.techn=l;if(u!=null)if(typeof u=="object"){let[p,g]=Object.entries(u)[0];f[p]=g}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[p,g]=Object.entries(d)[0];f[p]=g}else f.legendSprite=d}},iC=function(t,e,r,n,i,s,a){const o=xo.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.lineColor=i;if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(a)}},sC=function(t,e,r){let n=Pc,i=Yc;if(typeof e=="object"){const s=Object.values(e)[0];n=parseInt(s)}else n=parseInt(e);if(typeof r=="object"){const s=Object.values(r)[0];i=parseInt(s)}else i=parseInt(r);n>=1&&(Pc=n),i>=1&&(Yc=i)},aC=function(){return Pc},oC=function(){return Yc},lC=function(){return Ir},cC=function(){return Cn},_g=function(t){return t==null?En:En.filter(e=>e.parentBoundary===t)},uC=function(t){return En.find(e=>e.alias===t)},hC=function(t){return Object.keys(_g(t))},dC=function(t){return t==null?zn:zn.filter(e=>e.parentBoundary===t)},fC=function(){return xo},pC=function(){return N1},gC=function(t){B1=t},Wi=function(){return B1},xg={addPersonOrSystem:KE,addPersonOrSystemBoundary:JE,addContainer:ZE,addContainerBoundary:tC,addComponent:QE,addDeploymentNode:eC,popBoundaryParseStack:rC,addRel:XE,updateElStyle:nC,updateRelStyle:iC,updateLayoutConfig:sC,autoWrap:Wi,setWrap:gC,getC4ShapeArray:_g,getC4Shape:uC,getC4ShapeKeys:hC,getBoundarys:dC,getCurrentBoundaryParse:lC,getParentBoundaryParse:cC,getRels:fC,getTitle:pC,getC4Type:qE,getC4ShapeInRow:aC,getC4BoundaryInRow:oC,setAccTitle:nn,getAccTitle:kn,getAccDescription:Tn,setAccDescription:wn,parseDirective:$E,getConfig:()=>$().c4,clear:function(){En=[],zn=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Cn="",Ir="global",zi=[""],xo=[],zi=[""],N1="",B1=!1,Pc=4,Yc=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(t){N1=yn(t,$())},setC4Type:jE},I1=function(t,e){const r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class!=="undefined"&&r.attr("class",e.class),r},vg=function(t,e,r,n,i,s){const a=t.append("image");a.attr("width",e),a.attr("height",r),a.attr("x",n),a.attr("y",i);let o=s.startsWith("data:image/png;base64")?s:ti(s);a.attr("xlink:href",o)},yC=(t,e,r)=>{const n=t.append("g");let i=0;for(let s of e){let a=s.textColor?s.textColor:"#444444",o=s.lineColor?s.lineColor:"#444444",l=s.offsetX?parseInt(s.offsetX):0,u=s.offsetY?parseInt(s.offsetY):0,d="";if(i===0){let p=n.append("line");p.attr("x1",s.startPoint.x),p.attr("y1",s.startPoint.y),p.attr("x2",s.endPoint.x),p.attr("y2",s.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",o),p.style("fill","none"),s.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)"),i=-1}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)")}let f=r.messageFont();fi(r)(s.label.text,n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+u,s.label.width,s.label.height,{fill:a},f),s.techn&&s.techn.text!==""&&(f=r.messageFont(),fi(r)("["+s.techn.text+"]",n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+u,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:a,"font-style":"italic"},f))}},mC=function(t,e,r){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};I1(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,fi(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=a,fi(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=a,fi(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},bC=function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const o=t.append("g");o.attr("class","person-man");const l=kg();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.style="stroke:"+i+";stroke-width:0.5;",l.rx=2.5,l.ry=2.5,I1(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=SC(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":vg(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,a);break}let d=r[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,fi(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=r[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.thchn&&e.thchn.text!==""?fi(r)(e.thchn.text,o,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&e.type.text!==""&&fi(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&e.descr.text!==""&&(d=r.personFont(),d.fontColor=s,fi(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height},_C=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},xC=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},vC=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},kC=function(t){t.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")},wC=function(t){t.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")},TC=function(t){t.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")},EC=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},CC=function(t){const r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.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"),r.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")},kg=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},SC=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),fi=function(){function t(i,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(f,d)}function e(i,s,a,o,l,u,d,f){const{fontSize:p,fontFamily:g,fontWeight:b}=f,k=i.split(he.lineBreakRegex);for(let T=0;T<k.length;T++){const L=T*p-p*(k.length-1)/2,E=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",b).style("font-family",g);E.append("tspan").attr("dy",L).text(k[T]).attr("alignment-baseline","mathematical"),n(E,d)}}function r(i,s,a,o,l,u,d,f){const p=s.append("switch"),b=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,a,o,l,u,d,f),n(b,d)}function n(i,s){for(const a in s)s.hasOwnProperty(a)&&i.attr(a,s[a])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),Wn={drawRect:I1,drawBoundary:mC,drawC4Shape:bC,drawRels:yC,drawImage:vg,insertArrowHead:kC,insertArrowEnd:wC,insertArrowFilledHead:TC,insertDynamicNumber:EC,insertArrowCrossHead:CC,insertDatabaseIcon:_C,insertComputerIcon:xC,insertClockIcon:vC,getNoteRect:kg,sanitizeUrl:ti};let Vc=0,Uc=0,wg=4,O1=2;Fc.yy=xg;let Zt={};class Tg{constructor(e){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,R1(e.db.getConfig())}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(e,r,n,i){e[r]===void 0?e[r]=n:e[r]=i(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,s=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>wg)&&(r=this.nextData.startx+e.margin+Zt.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",s,Math.max)}init(e){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},R1(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const R1=function(t){gr(Zt,t),t.fontFamily&&(Zt.personFontFamily=Zt.systemFontFamily=Zt.messageFontFamily=t.fontFamily),t.fontSize&&(Zt.personFontSize=Zt.systemFontSize=Zt.messageFontSize=t.fontSize),t.fontWeight&&(Zt.personFontWeight=Zt.systemFontWeight=Zt.messageFontWeight=t.fontWeight)},vo=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),zc=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),AC=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function Sn(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=Pp(e[t].text,i,n),e[t].textLines=e[t].text.split(he.lineBreakRegex).length,e[t].width=i,e[t].height=g1(e[t].text,n);else{let s=e[t].text.split(he.lineBreakRegex);e[t].textLines=s.length;let a=0;e[t].height=0,e[t].width=0;for(const o of s)e[t].width=Math.max(Un(o,n),e[t].width),a=g1(o,n),e[t].height=e[t].height+a}}const Eg=function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Zt.c4ShapeMargin-35;let n=e.wrap&&Zt.wrap,i=zc(Zt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let s=Un(e.label.text,i);Sn("label",e,n,i,s),Wn.drawBoundary(t,e,Zt)},Cg=function(t,e,r,n){let i=0;for(const s of n){i=0;const a=r[s];let o=vo(Zt,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=Un("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=Zt.c4ShapePadding,i=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=i,i=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=i,i=a.image.Y+a.image.height);let l=a.wrap&&Zt.wrap,u=Zt.width-Zt.c4ShapePadding*2,d=vo(Zt,a.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",Sn("label",a,l,d,u),a.label.Y=i+8,i=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let g=vo(Zt,a.typeC4Shape.text);Sn("type",a,l,g,u),a.type.Y=i+5,i=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let g=vo(Zt,a.techn.text);Sn("techn",a,l,g,u),a.techn.Y=i+5,i=a.techn.Y+a.techn.height}let f=i,p=a.label.width;if(a.descr&&a.descr.text!==""){let g=vo(Zt,a.typeC4Shape.text);Sn("descr",a,l,g,u),a.descr.Y=i+20,i=a.descr.Y+a.descr.height,p=Math.max(a.label.width,a.descr.width),f=i-a.descr.textLines*5}p=p+Zt.c4ShapePadding,a.width=Math.max(a.width||Zt.width,p,Zt.width),a.height=Math.max(a.height||Zt.height,f,Zt.height),a.margin=a.margin||Zt.c4ShapeMargin,t.insert(a),Wn.drawC4Shape(e,a,Zt)}t.bumpLastMargin(Zt.c4ShapeMargin)};class sn{constructor(e,r){this.x=e,this.y=r}}let Sg=function(t,e){let r=t.x,n=t.y,i=e.x,s=e.y,a=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),u=Math.abs(n-s),d=u/l,f=t.height/t.width,p=null;return n==s&&r<i?p=new sn(r+t.width,o):n==s&&r>i?p=new sn(r,o):r==i&&n<s?p=new sn(a,n+t.height):r==i&&n>s&&(p=new sn(a,n)),r>i&&n<s?f>=d?p=new sn(r,o+d*t.width/2):p=new sn(a-l/u*t.height/2,n+t.height):r<i&&n<s?f>=d?p=new sn(r+t.width,o+d*t.width/2):p=new sn(a+l/u*t.height/2,n+t.height):r<i&&n>s?f>=d?p=new sn(r+t.width,o-d*t.width/2):p=new sn(a+t.height/2*l/u,n):r>i&&n>s&&(f>=d?p=new sn(r,o-t.width/2*d):p=new sn(a-t.height/2*l/u,n)),p},LC=function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=Sg(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=Sg(e,r);return{startPoint:n,endPoint:i}};const DC=function(t,e,r,n){let i=0;for(let s of e){i=i+1;let a=s.wrap&&Zt.wrap,o=AC(Zt);n.db.getC4Type()==="C4Dynamic"&&(s.label.text=i+": "+s.label.text);let u=Un(s.label.text,o);Sn("label",s,a,o,u),s.techn&&s.techn.text!==""&&(u=Un(s.techn.text,o),Sn("techn",s,a,o,u)),s.descr&&s.descr.text!==""&&(u=Un(s.descr.text,o),Sn("descr",s,a,o,u));let d=r(s.from),f=r(s.to),p=LC(d,f);s.startPoint=p.startPoint,s.endPoint=p.endPoint}Wn.drawRels(t,e,Zt)};function Ag(t,e,r,n,i){let s=new Tg(i);s.data.widthLimit=r.data.widthLimit/Math.min(O1,n.length);for(let[a,o]of n.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Zt.wrap,d=zc(Zt);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",Sn("label",o,u,d,s.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let b=zc(Zt);Sn("type",o,u,b,s.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let b=zc(Zt);b.fontSize=b.fontSize-2,Sn("descr",o,u,b,s.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%O1===0){let b=r.data.startx+Zt.diagramMarginX,k=r.data.stopy+Zt.diagramMarginY+l;s.setData(b,b,k,k)}else{let b=s.data.stopx!==s.data.startx?s.data.stopx+Zt.diagramMarginX:s.data.startx,k=s.data.starty;s.setData(b,b,k,k)}s.name=o.alias;let f=i.db.getC4ShapeArray(o.alias),p=i.db.getC4ShapeKeys(o.alias);p.length>0&&Cg(s,t,f,p),e=o.alias;let g=i.db.getBoundarys(e);g.length>0&&Ag(t,e,s,g,i),o.alias!=="global"&&Eg(t,o,s),r.data.stopy=Math.max(s.data.stopy+Zt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+Zt.c4ShapeMargin,r.data.stopx),Vc=Math.max(Vc,r.data.stopx),Uc=Math.max(Uc,r.data.stopy)}}const Lg={drawPersonOrSystemArray:Cg,drawBoundary:Eg,setConf:R1,draw:function(t,e,r,n){Zt=$().c4;const i=$().securityLevel;let s;i==="sandbox"&&(s=St("#i"+e));const a=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body");let o=n.db;n.db.setWrap(Zt.wrap),wg=o.getC4ShapeInRow(),O1=o.getC4BoundaryInRow(),B.debug(`C:${JSON.stringify(Zt,null,2)}`);const l=i==="sandbox"?a.select(`[id="${e}"]`):St(`[id="${e}"]`);Wn.insertComputerIcon(l),Wn.insertDatabaseIcon(l),Wn.insertClockIcon(l);let u=new Tg(n);u.setData(Zt.diagramMarginX,Zt.diagramMarginX,Zt.diagramMarginY,Zt.diagramMarginY),u.data.widthLimit=screen.availWidth,Vc=Zt.diagramMarginX,Uc=Zt.diagramMarginY;const d=n.db.getTitle();let f=n.db.getBoundarys("");Ag(l,"",u,f,n),Wn.insertArrowHead(l),Wn.insertArrowEnd(l),Wn.insertArrowCrossHead(l),Wn.insertArrowFilledHead(l),DC(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=Vc,u.data.stopy=Uc;const p=u.data;let b=p.stopy-p.starty+2*Zt.diagramMarginY;const T=p.stopx-p.startx+2*Zt.diagramMarginX;d&&l.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*Zt.diagramMarginX).attr("y",p.starty+Zt.diagramMarginY),xn(l,b,T,Zt.useMaxWidth);const L=d?60:0;l.attr("viewBox",p.startx-Zt.diagramMarginX+" -"+(Zt.diagramMarginY+L)+" "+T+" "+(b+L)),B.debug("models:",p)}};var F1=function(){var t=function(F,O,A,J){for(A=A||{},J=F.length;J--;A[F[J]]=O);return A},e=[1,3],r=[1,7],n=[1,8],i=[1,9],s=[1,10],a=[1,13],o=[1,12],l=[1,16,25],u=[1,20],d=[1,32],f=[1,33],p=[1,34],g=[1,36],b=[1,39],k=[1,37],T=[1,38],L=[1,44],E=[1,45],I=[1,40],V=[1,41],H=[1,42],G=[1,43],Y=[1,48],W=[1,49],N=[1,50],D=[1,51],w=[16,25],v=[1,65],M=[1,66],m=[1,67],Q=[1,68],x=[1,69],ct=[1,70],Dt=[1,71],kt=[1,80],j=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],ot=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],rt=[5,8,9,10,11,16,19,23,25],nt=[54,88,89,90,91],ut=[54,65,66,88,89,90,91],_t=[54,60,61,62,63,64,88,89,90,91],K=[16,25,32],Ot=[1,107],P={trace:function(){},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(O,A,J,C,ht,U,Yt){var et=U.length-1;switch(ht){case 5:C.setDirection("TB");break;case 6:C.setDirection("BT");break;case 7:C.setDirection("RL");break;case 8:C.setDirection("LR");break;case 12:C.parseDirective("%%{","open_directive");break;case 13:C.parseDirective(U[et],"type_directive");break;case 14:U[et]=U[et].trim().replace(/'/g,'"'),C.parseDirective(U[et],"arg_directive");break;case 15:C.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=U[et];break;case 22:this.$=U[et-1]+U[et];break;case 23:case 24:this.$=U[et-1]+"~"+U[et];break;case 25:C.addRelation(U[et]);break;case 26:U[et-1].title=C.cleanupLabel(U[et]),C.addRelation(U[et-1]);break;case 35:this.$=U[et].trim(),C.setAccTitle(this.$);break;case 36:case 37:this.$=U[et].trim(),C.setAccDescription(this.$);break;case 38:C.addClass(U[et]);break;case 39:C.addClass(U[et-2]),C.setCssClass(U[et-2],U[et]);break;case 40:C.addClass(U[et-3]),C.addMembers(U[et-3],U[et-1]);break;case 41:C.addClass(U[et-5]),C.setCssClass(U[et-5],U[et-3]),C.addMembers(U[et-5],U[et-1]);break;case 42:C.addAnnotation(U[et],U[et-2]);break;case 43:this.$=[U[et]];break;case 44:U[et].push(U[et-1]),this.$=U[et];break;case 45:break;case 46:C.addMember(U[et-1],C.cleanupLabel(U[et]));break;case 47:break;case 48:break;case 49:this.$={id1:U[et-2],id2:U[et],relation:U[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:U[et-3],id2:U[et],relation:U[et-1],relationTitle1:U[et-2],relationTitle2:"none"};break;case 51:this.$={id1:U[et-3],id2:U[et],relation:U[et-2],relationTitle1:"none",relationTitle2:U[et-1]};break;case 52:this.$={id1:U[et-4],id2:U[et],relation:U[et-2],relationTitle1:U[et-3],relationTitle2:U[et-1]};break;case 53:C.addNote(U[et],U[et-1]);break;case 54:C.addNote(U[et]);break;case 55:this.$={type1:U[et-2],type2:U[et],lineType:U[et-1]};break;case 56:this.$={type1:"none",type2:U[et],lineType:U[et-1]};break;case 57:this.$={type1:U[et-1],type2:"none",lineType:U[et]};break;case 58:this.$={type1:"none",type2:"none",lineType:U[et]};break;case 59:this.$=C.relationType.AGGREGATION;break;case 60:this.$=C.relationType.EXTENSION;break;case 61:this.$=C.relationType.COMPOSITION;break;case 62:this.$=C.relationType.DEPENDENCY;break;case 63:this.$=C.relationType.LOLLIPOP;break;case 64:this.$=C.lineType.LINE;break;case 65:this.$=C.lineType.DOTTED_LINE;break;case 66:case 72:this.$=U[et-2],C.setClickEvent(U[et-1],U[et]);break;case 67:case 73:this.$=U[et-3],C.setClickEvent(U[et-2],U[et-1]),C.setTooltip(U[et-2],U[et]);break;case 68:case 76:this.$=U[et-2],C.setLink(U[et-1],U[et]);break;case 69:this.$=U[et-3],C.setLink(U[et-2],U[et-1],U[et]);break;case 70:case 78:this.$=U[et-3],C.setLink(U[et-2],U[et-1]),C.setTooltip(U[et-2],U[et]);break;case 71:case 79:this.$=U[et-4],C.setLink(U[et-3],U[et-2],U[et]),C.setTooltip(U[et-3],U[et-1]);break;case 74:this.$=U[et-3],C.setClickEvent(U[et-2],U[et-1],U[et]);break;case 75:this.$=U[et-4],C.setClickEvent(U[et-3],U[et-2],U[et-1]),C.setTooltip(U[et-3],U[et]);break;case 77:this.$=U[et-3],C.setLink(U[et-2],U[et-1],U[et]);break;case 80:C.setCssClass(U[et-1],U[et]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:r,9:n,10:i,11:s,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:r,9:n,10:i,11:s,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:31,7:30,8:r,9:n,10:i,11:s,13:11,19:a,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:d,41:f,43:p,44:g,49:b,51:k,52:T,55:L,57:E,67:I,68:V,70:H,74:G,88:Y,89:W,90:N,91:D},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(w,[2,25],{32:[1,57]}),t(w,[2,27]),t(w,[2,28]),t(w,[2,29]),t(w,[2,30]),t(w,[2,31]),t(w,[2,32]),t(w,[2,33]),t(w,[2,34]),{40:[1,58]},{42:[1,59]},t(w,[2,37]),t(w,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:v,61:M,62:m,63:Q,64:x,65:ct,66:Dt}),{27:72,28:46,29:47,88:Y,89:W,90:N,91:D},t(w,[2,47]),t(w,[2,48]),{28:73,88:Y,89:W,90:N},{27:74,28:46,29:47,88:Y,89:W,90:N,91:D},{27:75,28:46,29:47,88:Y,89:W,90:N,91:D},{27:76,28:46,29:47,88:Y,89:W,90:N,91:D},{54:[1,77]},{27:78,28:46,29:47,88:Y,89:W,90:N,91:D},{54:kt,56:79},t(j,[2,20],{28:46,29:47,27:81,30:[1,82],88:Y,89:W,90:N,91:D}),t(j,[2,21],{30:[1,83]}),t(ot,[2,94]),t(ot,[2,95]),t(ot,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(rt,[2,10]),{15:84,22:u},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:r,9:n,10:i,11:s,13:11,19:a,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:d,41:f,43:p,44:g,49:b,51:k,52:T,55:L,57:E,67:I,68:V,70:H,74:G,88:Y,89:W,90:N,91:D},t(w,[2,26]),t(w,[2,35]),t(w,[2,36]),{27:86,28:46,29:47,54:[1,87],88:Y,89:W,90:N,91:D},{53:88,58:63,59:64,60:v,61:M,62:m,63:Q,64:x,65:ct,66:Dt},t(w,[2,46]),{59:89,65:ct,66:Dt},t(nt,[2,58],{58:90,60:v,61:M,62:m,63:Q,64:x}),t(ut,[2,59]),t(ut,[2,60]),t(ut,[2,61]),t(ut,[2,62]),t(ut,[2,63]),t(_t,[2,64]),t(_t,[2,65]),t(w,[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:Y,89:W,90:N},{54:kt,56:99},t(w,[2,54]),t(w,[2,98]),t(j,[2,22]),t(j,[2,23]),t(j,[2,24]),{16:[1,100]},{25:[2,19]},t(K,[2,49]),{27:101,28:46,29:47,88:Y,89:W,90:N,91:D},{27:102,28:46,29:47,54:[1,103],88:Y,89:W,90:N,91:D},t(nt,[2,57],{58:104,60:v,61:M,62:m,63:Q,64:x}),t(nt,[2,56]),{28:105,88:Y,89:W,90:N},{47:106,51:Ot},{27:108,28:46,29:47,88:Y,89:W,90:N,91:D},t(w,[2,66],{54:[1,109]}),t(w,[2,68],{54:[1,111],69:[1,110]}),t(w,[2,72],{54:[1,112],72:[1,113]}),t(w,[2,76],{54:[1,115],69:[1,114]}),t(w,[2,80]),t(w,[2,53]),t(rt,[2,11]),t(K,[2,51]),t(K,[2,50]),{27:116,28:46,29:47,88:Y,89:W,90:N,91:D},t(nt,[2,55]),t(w,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Ot},t(w,[2,42]),t(w,[2,67]),t(w,[2,69]),t(w,[2,70],{69:[1,120]}),t(w,[2,73]),t(w,[2,74],{54:[1,121]}),t(w,[2,77]),t(w,[2,78],{69:[1,122]}),t(K,[2,52]),{47:123,51:Ot},t(w,[2,40]),{48:[2,44]},t(w,[2,71]),t(w,[2,75]),t(w,[2,79]),{48:[1,124]},t(w,[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(O,A){if(A.recoverable)this.trace(O);else{var J=new Error(O);throw J.hash=A,J}},parse:function(O){var A=this,J=[0],C=[],ht=[null],U=[],Yt=this.table,et="",Mt=0,Tt=0,gt=2,Et=1,wt=U.slice.call(arguments,1),pt=Object.create(this.lexer),st={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(st.yy[le]=this.yy[le]);pt.setInput(O,st.yy),st.yy.lexer=pt,st.yy.parser=this,typeof pt.yylloc>"u"&&(pt.yylloc={});var Xt=pt.yylloc;U.push(Xt);var jt=pt.options&&pt.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Kt(){var at;return at=C.pop()||pt.lex()||Et,typeof at!="number"&&(at instanceof Array&&(C=at,at=C.pop()),at=A.symbols_[at]||at),at}for(var Gt,Ee,Ht,Vt,Ft={},xt,ft,Lt,bt;;){if(Ee=J[J.length-1],this.defaultActions[Ee]?Ht=this.defaultActions[Ee]:((Gt===null||typeof Gt>"u")&&(Gt=Kt()),Ht=Yt[Ee]&&Yt[Ee][Gt]),typeof Ht>"u"||!Ht.length||!Ht[0]){var Ut="";bt=[];for(xt in Yt[Ee])this.terminals_[xt]&&xt>gt&&bt.push("'"+this.terminals_[xt]+"'");pt.showPosition?Ut="Parse error on line "+(Mt+1)+`:
`+pt.showPosition()+`
Expecting `+bt.join(", ")+", got '"+(this.terminals_[Gt]||Gt)+"'":Ut="Parse error on line "+(Mt+1)+": Unexpected "+(Gt==Et?"end of input":"'"+(this.terminals_[Gt]||Gt)+"'"),this.parseError(Ut,{text:pt.match,token:this.terminals_[Gt]||Gt,line:pt.yylineno,loc:Xt,expected:bt})}if(Ht[0]instanceof Array&&Ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+Gt);switch(Ht[0]){case 1:J.push(Gt),ht.push(pt.yytext),U.push(pt.yylloc),J.push(Ht[1]),Gt=null,Tt=pt.yyleng,et=pt.yytext,Mt=pt.yylineno,Xt=pt.yylloc;break;case 2:if(ft=this.productions_[Ht[1]][1],Ft.$=ht[ht.length-ft],Ft._$={first_line:U[U.length-(ft||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(ft||1)].first_column,last_column:U[U.length-1].last_column},jt&&(Ft._$.range=[U[U.length-(ft||1)].range[0],U[U.length-1].range[1]]),Vt=this.performAction.apply(Ft,[et,Tt,Mt,st.yy,Ht[1],ht,U].concat(wt)),typeof Vt<"u")return Vt;ft&&(J=J.slice(0,-1*ft*2),ht=ht.slice(0,-1*ft),U=U.slice(0,-1*ft)),J.push(this.productions_[Ht[1]][0]),ht.push(Ft.$),U.push(Ft._$),Lt=Yt[J[J.length-2]][J[J.length-1]],J.push(Lt);break;case 3:return!0}}return!0}},z=function(){var F={EOF:1,parseError:function(A,J){if(this.yy.parser)this.yy.parser.parseError(A,J);else throw new Error(A)},setInput:function(O,A){return this.yy=A||this.yy||{},this._input=O,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var O=this._input[0];this.yytext+=O,this.yyleng++,this.offset++,this.match+=O,this.matched+=O;var A=O.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),O},unput:function(O){var A=O.length,J=O.split(/(?:\r\n?|\n)/g);this._input=O+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var C=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),J.length-1&&(this.yylineno-=J.length-1);var ht=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:J?(J.length===C.length?this.yylloc.first_column:0)+C[C.length-J.length].length-J[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[ht[0],ht[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(O){this.unput(this.match.slice(O))},pastInput:function(){var O=this.matched.substr(0,this.matched.length-this.match.length);return(O.length>20?"...":"")+O.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var O=this.match;return O.length<20&&(O+=this._input.substr(0,20-O.length)),(O.substr(0,20)+(O.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var O=this.pastInput(),A=new Array(O.length+1).join("-");return O+this.upcomingInput()+`
`+A+"^"},test_match:function(O,A){var J,C,ht;if(this.options.backtrack_lexer&&(ht={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&&(ht.yylloc.range=this.yylloc.range.slice(0))),C=O[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+O[0].length},this.yytext+=O[0],this.match+=O[0],this.matches=O,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(O[0].length),this.matched+=O[0],J=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),J)return J;if(this._backtrack){for(var U in ht)this[U]=ht[U];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var O,A,J,C;this._more||(this.yytext="",this.match="");for(var ht=this._currentRules(),U=0;U<ht.length;U++)if(J=this._input.match(this.rules[ht[U]]),J&&(!A||J[0].length>A[0].length)){if(A=J,C=U,this.options.backtrack_lexer){if(O=this.test_match(J,ht[U]),O!==!1)return O;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(O=this.test_match(A,ht[C]),O!==!1?O:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var A=this.next();return A||this.lex()},begin:function(A){this.conditionStack.push(A)},popState:function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},pushState:function(A){this.begin(A)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(A,J,C,ht){switch(C){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:break;case 10: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:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;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 27:break;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 39:this.popState();break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 42:this.popState();break;case 43:return"STR";case 44:this.begin("bqstring");break;case 45:this.popState();break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 48:this.popState();break;case 49:return 73;case 50:this.begin("callback_name");break;case 51:this.popState();break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 54:this.popState();break;case 55:return 72;case 56:return 69;case 57:return 69;case 58:return 69;case 59:return 69;case 60:return 61;case 61:return 61;case 62:return 63;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:return"EQUALS";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}}};return F}();P.lexer=z;function X(){this.yy={}}return X.prototype=P,P.Parser=X,new X}();F1.parser=F1;const Dg=F1,MC=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},NC=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},P1="classid-";let Y1=[],Ke={},Wc=[],Mg=0,ko=[];const wo=t=>he.sanitizeText(t,$()),BC=function(t,e,r){ze.parseDirective(this,t,e,r)},To=function(t){let e="",r=t;if(t.indexOf("~")>0){let n=t.split("~");r=n[0],e=he.sanitizeText(n[1],$())}return{className:r,type:e}},V1=function(t){let e=To(t);Ke[e.className]===void 0&&(Ke[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:P1+e.className+"-"+Mg},Mg++)},Ng=function(t){const e=Object.keys(Ke);for(const r of e)if(Ke[r].id===t)return Ke[r].domId},IC=function(){Y1=[],Ke={},Wc=[],ko=[],ko.push(Ig),vn()},OC=function(t){return Ke[t]},RC=function(){return Ke},FC=function(){return Y1},PC=function(){return Wc},YC=function(t){B.debug("Adding relation: "+JSON.stringify(t)),V1(t.id1),V1(t.id2),t.id1=To(t.id1).className,t.id2=To(t.id2).className,t.relationTitle1=he.sanitizeText(t.relationTitle1.trim(),$()),t.relationTitle2=he.sanitizeText(t.relationTitle2.trim(),$()),Y1.push(t)},VC=function(t,e){const r=To(t).className;Ke[r].annotations.push(e)},Bg=function(t,e){const r=To(t).className,n=Ke[r];if(typeof e=="string"){const i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(wo(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(wo(i)):i&&n.members.push(wo(i))}},UC=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Bg(t,r)))},zC=function(t,e){const r={id:`note${Wc.length}`,class:e,text:t};Wc.push(r)},WC=function(t){return t.substring(0,1)===":"?he.sanitizeText(t.substr(1).trim(),$()):wo(t.trim())},U1=function(t,e){t.split(",").forEach(function(r){let n=r;r[0].match(/\d/)&&(n=P1+n),Ke[n]!==void 0&&Ke[n].cssClasses.push(e)})},HC=function(t,e){const r=$();t.split(",").forEach(function(n){e!==void 0&&(Ke[n].tooltip=he.sanitizeText(e,r))})},GC=function(t){return Ke[t].tooltip},qC=function(t,e,r){const n=$();t.split(",").forEach(function(i){let s=i;i[0].match(/\d/)&&(s=P1+s),Ke[s]!==void 0&&(Ke[s].link=ge.formatUrl(e,n),n.securityLevel==="sandbox"?Ke[s].linkTarget="_top":typeof r=="string"?Ke[s].linkTarget=wo(r):Ke[s].linkTarget="_blank")}),U1(t,"clickable")},jC=function(t,e,r){t.split(",").forEach(function(n){$C(n,e,r),Ke[n].haveCallback=!0}),U1(t,"clickable")},$C=function(t,e,r){const n=$();let i=t,s=Ng(i);if(n.securityLevel==="loose"&&e!==void 0&&Ke[i]!==void 0){let a=[];if(typeof r=="string"){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<a.length;o++){let l=a[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),a[o]=l}}a.length===0&&a.push(s),ko.push(function(){const o=document.querySelector(`[id="${s}"]`);o!==null&&o.addEventListener("click",function(){ge.runFunc(e,...a)},!1)})}},XC=function(t){ko.forEach(function(e){e(t)})},KC={LINE:0,DOTTED_LINE:1},ZC={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Ig=function(t){let e=St(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=St("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),St(t).select("svg").selectAll("g.node").on("mouseover",function(){const i=St(this);if(i.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),St(this).classed("hover",!1)})};ko.push(Ig);let Og="TB";const fa={parseDirective:BC,setAccTitle:nn,getAccTitle:kn,getAccDescription:Tn,setAccDescription:wn,getConfig:()=>$().class,addClass:V1,bindFunctions:XC,clear:IC,getClass:OC,getClasses:RC,getNotes:PC,addAnnotation:VC,addNote:zC,getRelations:FC,addRelation:YC,getDirection:()=>Og,setDirection:t=>{Og=t},addMember:Bg,addMembers:UC,cleanupLabel:WC,lineType:KC,relationType:ZC,setClickEvent:jC,setCssClass:U1,setLink:qC,getTooltip:GC,setTooltip:HC,lookUpDomId:Ng,setDiagramTitle:hi,getDiagramTitle:di};function Hn(t){return t!=null&&typeof t=="object"}var QC="[object Symbol]";function ks(t){return typeof t=="symbol"||Hn(t)&&ps(t)==QC}function pa(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var JC=Array.isArray;const nr=JC;var t9=1/0,Rg=en?en.prototype:void 0,Fg=Rg?Rg.toString:void 0;function Pg(t){if(typeof t=="string")return t;if(nr(t))return pa(t,Pg)+"";if(ks(t))return Fg?Fg.call(t):"";var e=t+"";return e=="0"&&1/t==-t9?"-0":e}var e9=/\s/;function r9(t){for(var e=t.length;e--&&e9.test(t.charAt(e)););return e}var n9=/^\s+/;function i9(t){return t&&t.slice(0,r9(t)+1).replace(n9,"")}var Yg=0/0,s9=/^[-+]0x[0-9a-f]+$/i,a9=/^0b[01]+$/i,o9=/^0o[0-7]+$/i,l9=parseInt;function c9(t){if(typeof t=="number")return t;if(ks(t))return Yg;if(Gr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Gr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=i9(t);var r=a9.test(t);return r||o9.test(t)?l9(t.slice(2),r?2:8):s9.test(t)?Yg:+t}var Vg=1/0,u9=17976931348623157e292;function Hc(t){if(!t)return t===0?t:0;if(t=c9(t),t===Vg||t===-Vg){var e=t<0?-1:1;return e*u9}return t===t?t:0}function h9(t){var e=Hc(t),r=e%1;return e===e?r?e-r:e:0}function ws(t){return t}var d9=ys(mn,"WeakMap");const z1=d9;var Ug=Object.create,f9=function(){function t(){}return function(e){if(!Gr(e))return{};if(Ug)return Ug(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const p9=f9;function g9(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function y9(){}function zg(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var m9=800,b9=16,_9=Date.now;function x9(t){var e=0,r=0;return function(){var n=_9(),i=b9-(n-r);if(r=n,i>0){if(++e>=m9)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ga(t){return function(){return t}}var v9=function(){try{var t=ys(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Gc=v9;var k9=Gc?function(t,e){return Gc(t,"toString",{configurable:!0,enumerable:!1,value:ga(e),writable:!0})}:ws,w9=x9(k9);const Wg=w9;function Hg(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function Gg(t,e,r,n){for(var i=t.length,s=r+(n?1:-1);n?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function T9(t){return t!==t}function E9(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function C9(t,e,r){return e===e?E9(t,e,r):Gg(t,T9,r)}function S9(t,e){var r=t==null?0:t.length;return!!r&&C9(t,e,0)>-1}var A9=9007199254740991,L9=/^(?:0|[1-9]\d*)$/;function qc(t,e){var r=typeof t;return e=e==null?A9:e,!!e&&(r=="number"||r!="symbol"&&L9.test(t))&&t>-1&&t%1==0&&t<e}function jc(t,e,r){e=="__proto__"&&Gc?Gc(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var D9=Object.prototype,M9=D9.hasOwnProperty;function $c(t,e,r){var n=t[e];(!(M9.call(t,e)&&oa(n,r))||r===void 0&&!(e in t))&&jc(t,e,r)}function Eo(t,e,r,n){var i=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var o=e[s],l=n?n(r[o],t[o],o,r,t):void 0;l===void 0&&(l=t[o]),i?jc(r,o,l):$c(r,o,l)}return r}var qg=Math.max;function jg(t,e,r){return e=qg(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,s=qg(n.length-e,0),a=Array(s);++i<s;)a[i]=n[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=n[i];return o[e]=r(a),g9(t,this,o)}}function Xc(t,e){return Wg(jg(t,e,ws),t+"")}var N9=9007199254740991;function W1(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=N9}function Hi(t){return t!=null&&W1(t.length)&&!aa(t)}function Co(t,e,r){if(!Gr(r))return!1;var n=typeof e;return(n=="number"?Hi(r)&&qc(e,r.length):n=="string"&&e in r)?oa(r[e],t):!1}function B9(t){return Xc(function(e,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,a&&Co(r[0],r[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++n<i;){var o=r[n];o&&t(e,o,n,s)}return e})}var I9=Object.prototype;function Kc(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||I9;return t===r}function O9(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var R9="[object Arguments]";function $g(t){return Hn(t)&&ps(t)==R9}var Xg=Object.prototype,F9=Xg.hasOwnProperty,P9=Xg.propertyIsEnumerable,Y9=$g(function(){return arguments}())?$g:function(t){return Hn(t)&&F9.call(t,"callee")&&!P9.call(t,"callee")};const ya=Y9;function V9(){return!1}var Kg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zg=Kg&&typeof module=="object"&&module&&!module.nodeType&&module,U9=Zg&&Zg.exports===Kg,Qg=U9?mn.Buffer:void 0,z9=Qg?Qg.isBuffer:void 0,W9=z9||V9;const ma=W9;var H9="[object Arguments]",G9="[object Array]",q9="[object Boolean]",j9="[object Date]",$9="[object Error]",X9="[object Function]",K9="[object Map]",Z9="[object Number]",Q9="[object Object]",J9="[object RegExp]",tS="[object Set]",eS="[object String]",rS="[object WeakMap]",nS="[object ArrayBuffer]",iS="[object DataView]",sS="[object Float32Array]",aS="[object Float64Array]",oS="[object Int8Array]",lS="[object Int16Array]",cS="[object Int32Array]",uS="[object Uint8Array]",hS="[object Uint8ClampedArray]",dS="[object Uint16Array]",fS="[object Uint32Array]",Fe={};Fe[sS]=Fe[aS]=Fe[oS]=Fe[lS]=Fe[cS]=Fe[uS]=Fe[hS]=Fe[dS]=Fe[fS]=!0,Fe[H9]=Fe[G9]=Fe[nS]=Fe[q9]=Fe[iS]=Fe[j9]=Fe[$9]=Fe[X9]=Fe[K9]=Fe[Z9]=Fe[Q9]=Fe[J9]=Fe[tS]=Fe[eS]=Fe[rS]=!1;function pS(t){return Hn(t)&&W1(t.length)&&!!Fe[ps(t)]}function Zc(t){return function(e){return t(e)}}var Jg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,So=Jg&&typeof module=="object"&&module&&!module.nodeType&&module,gS=So&&So.exports===Jg,H1=gS&&Dp.process,yS=function(){try{var t=So&&So.require&&So.require("util").types;return t||H1&&H1.binding&&H1.binding("util")}catch{}}();const ba=yS;var ty=ba&&ba.isTypedArray,mS=ty?Zc(ty):pS;const Qc=mS;var bS=Object.prototype,_S=bS.hasOwnProperty;function ey(t,e){var r=nr(t),n=!r&&ya(t),i=!r&&!n&&ma(t),s=!r&&!n&&!i&&Qc(t),a=r||n||i||s,o=a?O9(t.length,String):[],l=o.length;for(var u in t)(e||_S.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qc(u,l)))&&o.push(u);return o}function ry(t,e){return function(r){return t(e(r))}}var xS=ry(Object.keys,Object);const vS=xS;var kS=Object.prototype,wS=kS.hasOwnProperty;function ny(t){if(!Kc(t))return vS(t);var e=[];for(var r in Object(t))wS.call(t,r)&&r!="constructor"&&e.push(r);return e}function jr(t){return Hi(t)?ey(t):ny(t)}function TS(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ES=Object.prototype,CS=ES.hasOwnProperty;function SS(t){if(!Gr(t))return TS(t);var e=Kc(t),r=[];for(var n in t)n=="constructor"&&(e||!CS.call(t,n))||r.push(n);return r}function Ts(t){return Hi(t)?ey(t,!0):SS(t)}var AS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,LS=/^\w*$/;function G1(t,e){if(nr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||ks(t)?!0:LS.test(t)||!AS.test(t)||e!=null&&t in Object(e)}var DS=500;function MS(t){var e=la(t,function(n){return r.size===DS&&r.clear(),n}),r=e.cache;return e}var NS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BS=/\\(\\)?/g,IS=MS(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(NS,function(r,n,i,s){e.push(i?s.replace(BS,"$1"):n||r)}),e});const OS=IS;function iy(t){return t==null?"":Pg(t)}function Jc(t,e){return nr(t)?t:G1(t,e)?[t]:OS(iy(t))}var RS=1/0;function Ao(t){if(typeof t=="string"||ks(t))return t;var e=t+"";return e=="0"&&1/t==-RS?"-0":e}function tu(t,e){e=Jc(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Ao(e[r++])];return r&&r==n?t:void 0}function FS(t,e,r){var n=t==null?void 0:tu(t,e);return n===void 0?r:n}function q1(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var sy=en?en.isConcatSpreadable:void 0;function PS(t){return nr(t)||ya(t)||!!(sy&&t&&t[sy])}function eu(t,e,r,n,i){var s=-1,a=t.length;for(r||(r=PS),i||(i=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?eu(o,e-1,r,n,i):q1(i,o):n||(i[i.length]=o)}return i}function _a(t){var e=t==null?0:t.length;return e?eu(t,1):[]}function YS(t){return Wg(jg(t,void 0,_a),t+"")}var VS=ry(Object.getPrototypeOf,Object);const j1=VS;var US="[object Object]",zS=Function.prototype,WS=Object.prototype,ay=zS.toString,HS=WS.hasOwnProperty,GS=ay.call(Object);function oy(t){if(!Hn(t)||ps(t)!=US)return!1;var e=j1(t);if(e===null)return!0;var r=HS.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ay.call(r)==GS}function qS(t,e,r,n){var i=-1,s=t==null?0:t.length;for(n&&s&&(r=t[++i]);++i<s;)r=e(r,t[i],i,t);return r}function jS(){this.__data__=new ci,this.size=0}function $S(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function XS(t){return this.__data__.get(t)}function KS(t){return this.__data__.has(t)}var ZS=200;function QS(t,e){var r=this.__data__;if(r instanceof ci){var n=r.__data__;if(!uo||n.length<ZS-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ui(n)}return r.set(t,e),this.size=r.size,this}function An(t){var e=this.__data__=new ci(t);this.size=e.size}An.prototype.clear=jS,An.prototype.delete=$S,An.prototype.get=XS,An.prototype.has=KS,An.prototype.set=QS;function JS(t,e){return t&&Eo(e,jr(e),t)}function tA(t,e){return t&&Eo(e,Ts(e),t)}var ly=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cy=ly&&typeof module=="object"&&module&&!module.nodeType&&module,eA=cy&&cy.exports===ly,uy=eA?mn.Buffer:void 0,hy=uy?uy.allocUnsafe:void 0;function dy(t,e){if(e)return t.slice();var r=t.length,n=hy?hy(r):new t.constructor(r);return t.copy(n),n}function fy(t,e){for(var r=-1,n=t==null?0:t.length,i=0,s=[];++r<n;){var a=t[r];e(a,r,t)&&(s[i++]=a)}return s}function py(){return[]}var rA=Object.prototype,nA=rA.propertyIsEnumerable,gy=Object.getOwnPropertySymbols,iA=gy?function(t){return t==null?[]:(t=Object(t),fy(gy(t),function(e){return nA.call(t,e)}))}:py;const $1=iA;function sA(t,e){return Eo(t,$1(t),e)}var aA=Object.getOwnPropertySymbols,oA=aA?function(t){for(var e=[];t;)q1(e,$1(t)),t=j1(t);return e}:py;const yy=oA;function lA(t,e){return Eo(t,yy(t),e)}function my(t,e,r){var n=e(t);return nr(t)?n:q1(n,r(t))}function X1(t){return my(t,jr,$1)}function cA(t){return my(t,Ts,yy)}var uA=ys(mn,"DataView");const K1=uA;var hA=ys(mn,"Promise");const Z1=hA;var dA=ys(mn,"Set");const xa=dA;var by="[object Map]",fA="[object Object]",_y="[object Promise]",xy="[object Set]",vy="[object WeakMap]",ky="[object DataView]",pA=gs(K1),gA=gs(uo),yA=gs(Z1),mA=gs(xa),bA=gs(z1),Es=ps;(K1&&Es(new K1(new ArrayBuffer(1)))!=ky||uo&&Es(new uo)!=by||Z1&&Es(Z1.resolve())!=_y||xa&&Es(new xa)!=xy||z1&&Es(new z1)!=vy)&&(Es=function(t){var e=ps(t),r=e==fA?t.constructor:void 0,n=r?gs(r):"";if(n)switch(n){case pA:return ky;case gA:return by;case yA:return _y;case mA:return xy;case bA:return vy}return e});const va=Es;var _A=Object.prototype,xA=_A.hasOwnProperty;function vA(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&xA.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var kA=mn.Uint8Array;const ru=kA;function Q1(t){var e=new t.constructor(t.byteLength);return new ru(e).set(new ru(t)),e}function wA(t,e){var r=e?Q1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var TA=/\w*$/;function EA(t){var e=new t.constructor(t.source,TA.exec(t));return e.lastIndex=t.lastIndex,e}var wy=en?en.prototype:void 0,Ty=wy?wy.valueOf:void 0;function CA(t){return Ty?Object(Ty.call(t)):{}}function Ey(t,e){var r=e?Q1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var SA="[object Boolean]",AA="[object Date]",LA="[object Map]",DA="[object Number]",MA="[object RegExp]",NA="[object Set]",BA="[object String]",IA="[object Symbol]",OA="[object ArrayBuffer]",RA="[object DataView]",FA="[object Float32Array]",PA="[object Float64Array]",YA="[object Int8Array]",VA="[object Int16Array]",UA="[object Int32Array]",zA="[object Uint8Array]",WA="[object Uint8ClampedArray]",HA="[object Uint16Array]",GA="[object Uint32Array]";function qA(t,e,r){var n=t.constructor;switch(e){case OA:return Q1(t);case SA:case AA:return new n(+t);case RA:return wA(t,r);case FA:case PA:case YA:case VA:case UA:case zA:case WA:case HA:case GA:return Ey(t,r);case LA:return new n;case DA:case BA:return new n(t);case MA:return EA(t);case NA:return new n;case IA:return CA(t)}}function Cy(t){return typeof t.constructor=="function"&&!Kc(t)?p9(j1(t)):{}}var jA="[object Map]";function $A(t){return Hn(t)&&va(t)==jA}var Sy=ba&&ba.isMap,XA=Sy?Zc(Sy):$A;const KA=XA;var ZA="[object Set]";function QA(t){return Hn(t)&&va(t)==ZA}var Ay=ba&&ba.isSet,JA=Ay?Zc(Ay):QA;const tL=JA;var eL=1,rL=2,nL=4,Ly="[object Arguments]",iL="[object Array]",sL="[object Boolean]",aL="[object Date]",oL="[object Error]",Dy="[object Function]",lL="[object GeneratorFunction]",cL="[object Map]",uL="[object Number]",My="[object Object]",hL="[object RegExp]",dL="[object Set]",fL="[object String]",pL="[object Symbol]",gL="[object WeakMap]",yL="[object ArrayBuffer]",mL="[object DataView]",bL="[object Float32Array]",_L="[object Float64Array]",xL="[object Int8Array]",vL="[object Int16Array]",kL="[object Int32Array]",wL="[object Uint8Array]",TL="[object Uint8ClampedArray]",EL="[object Uint16Array]",CL="[object Uint32Array]",Oe={};Oe[Ly]=Oe[iL]=Oe[yL]=Oe[mL]=Oe[sL]=Oe[aL]=Oe[bL]=Oe[_L]=Oe[xL]=Oe[vL]=Oe[kL]=Oe[cL]=Oe[uL]=Oe[My]=Oe[hL]=Oe[dL]=Oe[fL]=Oe[pL]=Oe[wL]=Oe[TL]=Oe[EL]=Oe[CL]=!0,Oe[oL]=Oe[Dy]=Oe[gL]=!1;function Lo(t,e,r,n,i,s){var a,o=e&eL,l=e&rL,u=e&nL;if(r&&(a=i?r(t,n,i,s):r(t)),a!==void 0)return a;if(!Gr(t))return t;var d=nr(t);if(d){if(a=vA(t),!o)return zg(t,a)}else{var f=va(t),p=f==Dy||f==lL;if(ma(t))return dy(t,o);if(f==My||f==Ly||p&&!i){if(a=l||p?{}:Cy(t),!o)return l?lA(t,tA(a,t)):sA(t,JS(a,t))}else{if(!Oe[f])return i?t:{};a=qA(t,f,o)}}s||(s=new An);var g=s.get(t);if(g)return g;s.set(t,a),tL(t)?t.forEach(function(T){a.add(Lo(T,e,r,T,t,s))}):KA(t)&&t.forEach(function(T,L){a.set(L,Lo(T,e,r,L,t,s))});var b=u?l?cA:X1:l?Ts:jr,k=d?void 0:b(t);return Hg(k||t,function(T,L){k&&(L=T,T=t[L]),$c(a,L,Lo(T,e,r,L,t,s))}),a}var SL=4;function AL(t){return Lo(t,SL)}var LL=1,DL=4;function ML(t){return Lo(t,LL|DL)}var NL="__lodash_hash_undefined__";function BL(t){return this.__data__.set(t,NL),this}function IL(t){return this.__data__.has(t)}function Do(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ui;++e<r;)this.add(t[e])}Do.prototype.add=Do.prototype.push=BL,Do.prototype.has=IL;function OL(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function Ny(t,e){return t.has(e)}var RL=1,FL=2;function By(t,e,r,n,i,s){var a=r&RL,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(t),d=s.get(e);if(u&&d)return u==e&&d==t;var f=-1,p=!0,g=r&FL?new Do:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var b=t[f],k=e[f];if(n)var T=a?n(k,b,f,e,t,s):n(b,k,f,t,e,s);if(T!==void 0){if(T)continue;p=!1;break}if(g){if(!OL(e,function(L,E){if(!Ny(g,E)&&(b===L||i(b,L,r,n,s)))return g.push(E)})){p=!1;break}}else if(!(b===k||i(b,k,r,n,s))){p=!1;break}}return s.delete(t),s.delete(e),p}function PL(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function J1(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var YL=1,VL=2,UL="[object Boolean]",zL="[object Date]",WL="[object Error]",HL="[object Map]",GL="[object Number]",qL="[object RegExp]",jL="[object Set]",$L="[object String]",XL="[object Symbol]",KL="[object ArrayBuffer]",ZL="[object DataView]",Iy=en?en.prototype:void 0,t0=Iy?Iy.valueOf:void 0;function QL(t,e,r,n,i,s,a){switch(r){case ZL:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case KL:return!(t.byteLength!=e.byteLength||!s(new ru(t),new ru(e)));case UL:case zL:case GL:return oa(+t,+e);case WL:return t.name==e.name&&t.message==e.message;case qL:case $L:return t==e+"";case HL:var o=PL;case jL:var l=n&YL;if(o||(o=J1),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;n|=VL,a.set(t,e);var d=By(o(t),o(e),n,i,s,a);return a.delete(t),d;case XL:if(t0)return t0.call(t)==t0.call(e)}return!1}var JL=1,tD=Object.prototype,eD=tD.hasOwnProperty;function rD(t,e,r,n,i,s){var a=r&JL,o=X1(t),l=o.length,u=X1(e),d=u.length;if(l!=d&&!a)return!1;for(var f=l;f--;){var p=o[f];if(!(a?p in e:eD.call(e,p)))return!1}var g=s.get(t),b=s.get(e);if(g&&b)return g==e&&b==t;var k=!0;s.set(t,e),s.set(e,t);for(var T=a;++f<l;){p=o[f];var L=t[p],E=e[p];if(n)var I=a?n(E,L,p,e,t,s):n(L,E,p,t,e,s);if(!(I===void 0?L===E||i(L,E,r,n,s):I)){k=!1;break}T||(T=p=="constructor")}if(k&&!T){var V=t.constructor,H=e.constructor;V!=H&&"constructor"in t&&"constructor"in e&&!(typeof V=="function"&&V instanceof V&&typeof H=="function"&&H instanceof H)&&(k=!1)}return s.delete(t),s.delete(e),k}var nD=1,Oy="[object Arguments]",Ry="[object Array]",nu="[object Object]",iD=Object.prototype,Fy=iD.hasOwnProperty;function sD(t,e,r,n,i,s){var a=nr(t),o=nr(e),l=a?Ry:va(t),u=o?Ry:va(e);l=l==Oy?nu:l,u=u==Oy?nu:u;var d=l==nu,f=u==nu,p=l==u;if(p&&ma(t)){if(!ma(e))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new An),a||Qc(t)?By(t,e,r,n,i,s):QL(t,e,l,r,n,i,s);if(!(r&nD)){var g=d&&Fy.call(t,"__wrapped__"),b=f&&Fy.call(e,"__wrapped__");if(g||b){var k=g?t.value():t,T=b?e.value():e;return s||(s=new An),i(k,T,r,n,s)}}return p?(s||(s=new An),rD(t,e,r,n,i,s)):!1}function e0(t,e,r,n,i){return t===e?!0:t==null||e==null||!Hn(t)&&!Hn(e)?t!==t&&e!==e:sD(t,e,r,n,e0,i)}var aD=1,oD=2;function lD(t,e,r,n){var i=r.length,s=i,a=!n;if(t==null)return!s;for(t=Object(t);i--;){var o=r[i];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=r[i];var l=o[0],u=t[l],d=o[1];if(a&&o[2]){if(u===void 0&&!(l in t))return!1}else{var f=new An;if(n)var p=n(u,d,l,t,e,f);if(!(p===void 0?e0(d,u,aD|oD,n,f):p))return!1}}return!0}function Py(t){return t===t&&!Gr(t)}function cD(t){for(var e=jr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Py(i)]}return e}function Yy(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function uD(t){var e=cD(t);return e.length==1&&e[0][2]?Yy(e[0][0],e[0][1]):function(r){return r===t||lD(r,t,e)}}function hD(t,e){return t!=null&&e in Object(t)}function Vy(t,e,r){e=Jc(e,t);for(var n=-1,i=e.length,s=!1;++n<i;){var a=Ao(e[n]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++n!=i?s:(i=t==null?0:t.length,!!i&&W1(i)&&qc(a,i)&&(nr(t)||ya(t)))}function Uy(t,e){return t!=null&&Vy(t,e,hD)}var dD=1,fD=2;function pD(t,e){return G1(t)&&Py(e)?Yy(Ao(t),e):function(r){var n=FS(r,t);return n===void 0&&n===e?Uy(r,t):e0(e,n,dD|fD)}}function gD(t){return function(e){return e==null?void 0:e[t]}}function yD(t){return function(e){return tu(e,t)}}function mD(t){return G1(t)?gD(Ao(t)):yD(t)}function Gi(t){return typeof t=="function"?t:t==null?ws:typeof t=="object"?nr(t)?pD(t[0],t[1]):uD(t):mD(t)}function bD(t){return function(e,r,n){for(var i=-1,s=Object(e),a=n(e),o=a.length;o--;){var l=a[t?o:++i];if(r(s[l],l,s)===!1)break}return e}}var _D=bD();const r0=_D;function zy(t,e){return t&&r0(t,e,jr)}function xD(t,e){return function(r,n){if(r==null)return r;if(!Hi(r))return t(r,n);for(var i=r.length,s=e?i:-1,a=Object(r);(e?s--:++s<i)&&n(a[s],s,a)!==!1;);return r}}var vD=xD(zy);const iu=vD;var kD=function(){return mn.Date.now()};const Wy=kD;var Hy=Object.prototype,wD=Hy.hasOwnProperty,TD=Xc(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Co(e[0],e[1],i)&&(n=1);++r<n;)for(var s=e[r],a=Ts(s),o=-1,l=a.length;++o<l;){var u=a[o],d=t[u];(d===void 0||oa(d,Hy[u])&&!wD.call(t,u))&&(t[u]=s[u])}return t});const ka=TD;function n0(t,e,r){(r!==void 0&&!oa(t[e],r)||r===void 0&&!(e in t))&&jc(t,e,r)}function Gy(t){return Hn(t)&&Hi(t)}function i0(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function ED(t){return Eo(t,Ts(t))}function CD(t,e,r,n,i,s,a){var o=i0(t,r),l=i0(e,r),u=a.get(l);if(u){n0(t,r,u);return}var d=s?s(o,l,r+"",t,e,a):void 0,f=d===void 0;if(f){var p=nr(l),g=!p&&ma(l),b=!p&&!g&&Qc(l);d=l,p||g||b?nr(o)?d=o:Gy(o)?d=zg(o):g?(f=!1,d=dy(l,!0)):b?(f=!1,d=Ey(l,!0)):d=[]:oy(l)||ya(l)?(d=o,ya(o)?d=ED(o):(!Gr(o)||aa(o))&&(d=Cy(l))):f=!1}f&&(a.set(l,d),i(d,l,n,s,a),a.delete(l)),n0(t,r,d)}function qy(t,e,r,n,i){t!==e&&r0(e,function(s,a){if(i||(i=new An),Gr(s))CD(t,e,a,r,qy,n,i);else{var o=n?n(i0(t,a),s,a+"",t,e,i):void 0;o===void 0&&(o=s),n0(t,a,o)}},Ts)}function SD(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function su(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function jy(t){return typeof t=="function"?t:ws}function vt(t,e){var r=nr(t)?Hg:iu;return r(t,jy(e))}function AD(t,e){var r=[];return iu(t,function(n,i,s){e(n,i,s)&&r.push(n)}),r}function pi(t,e){var r=nr(t)?fy:AD;return r(t,Gi(e))}function LD(t){return function(e,r,n){var i=Object(e);if(!Hi(e)){var s=Gi(r);e=jr(e),r=function(o){return s(i[o],o,i)}}var a=t(e,r,n);return a>-1?i[s?e[a]:a]:void 0}}var DD=Math.max;function MD(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:h9(r);return i<0&&(i=DD(n+i,0)),Gg(t,Gi(e),i)}var ND=LD(MD);const s0=ND;function $y(t,e){var r=-1,n=Hi(t)?Array(t.length):[];return iu(t,function(i,s,a){n[++r]=e(i,s,a)}),n}function ir(t,e){var r=nr(t)?pa:$y;return r(t,Gi(e))}function BD(t,e){return t==null?t:r0(t,jy(e),Ts)}function ID(t,e){return t>e}var OD=Object.prototype,RD=OD.hasOwnProperty;function FD(t,e){return t!=null&&RD.call(t,e)}function me(t,e){return t!=null&&Vy(t,e,FD)}function PD(t,e){return pa(e,function(r){return t[r]})}function gi(t){return t==null?[]:PD(t,jr(t))}var YD="[object Map]",VD="[object Set]",UD=Object.prototype,zD=UD.hasOwnProperty;function wa(t){if(t==null)return!0;if(Hi(t)&&(nr(t)||typeof t=="string"||typeof t.splice=="function"||ma(t)||Qc(t)||ya(t)))return!t.length;var e=va(t);if(e==YD||e==VD)return!t.size;if(Kc(t))return!ny(t).length;for(var r in t)if(zD.call(t,r))return!1;return!0}function Ze(t){return t===void 0}function Xy(t,e){return t<e}function au(t,e){var r={};return e=Gi(e),zy(t,function(n,i,s){jc(r,i,e(n,i,s))}),r}function a0(t,e,r){for(var n=-1,i=t.length;++n<i;){var s=t[n],a=e(s);if(a!=null&&(o===void 0?a===a&&!ks(a):r(a,o)))var o=a,l=s}return l}function Cs(t){return t&&t.length?a0(t,ws,ID):void 0}var WD=B9(function(t,e,r){qy(t,e,r)});const o0=WD;function Mo(t){return t&&t.length?a0(t,ws,Xy):void 0}function l0(t,e){return t&&t.length?a0(t,Gi(e),Xy):void 0}function HD(t,e,r,n){if(!Gr(t))return t;e=Jc(e,t);for(var i=-1,s=e.length,a=s-1,o=t;o!=null&&++i<s;){var l=Ao(e[i]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=a){var d=o[l];u=n?n(d,l,o):void 0,u===void 0&&(u=Gr(d)?d:qc(e[i+1])?[]:{})}$c(o,l,u),o=o[l]}return t}function GD(t,e,r){for(var n=-1,i=e.length,s={};++n<i;){var a=e[n],o=tu(t,a);r(o,a)&&HD(s,Jc(a,t),o)}return s}function qD(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function jD(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,s=ks(t),a=e!==void 0,o=e===null,l=e===e,u=ks(e);if(!o&&!u&&!s&&t>e||s&&a&&l&&!o&&!u||n&&a&&l||!r&&l||!i)return 1;if(!n&&!s&&!u&&t<e||u&&r&&i&&!n&&!s||o&&r&&i||!a&&i||!l)return-1}return 0}function $D(t,e,r){for(var n=-1,i=t.criteria,s=e.criteria,a=i.length,o=r.length;++n<a;){var l=jD(i[n],s[n]);if(l){if(n>=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}function XD(t,e,r){e.length?e=pa(e,function(s){return nr(s)?function(a){return tu(a,s.length===1?s[0]:s)}:s}):e=[ws];var n=-1;e=pa(e,Zc(Gi));var i=$y(t,function(s,a,o){var l=pa(e,function(u){return u(s)});return{criteria:l,index:++n,value:s}});return qD(i,function(s,a){return $D(s,a,r)})}function KD(t,e){return GD(t,e,function(r,n){return Uy(t,n)})}var ZD=YS(function(t,e){return t==null?{}:KD(t,e)});const No=ZD;var QD=Math.ceil,JD=Math.max;function tM(t,e,r,n){for(var i=-1,s=JD(QD((e-t)/(r||1)),0),a=Array(s);s--;)a[n?s:++i]=t,t+=r;return a}function eM(t){return function(e,r,n){return n&&typeof n!="number"&&Co(e,r,n)&&(r=n=void 0),e=Hc(e),r===void 0?(r=e,e=0):r=Hc(r),n=n===void 0?e<r?1:-1:Hc(n),tM(e,r,n,t)}}var rM=eM();const Ss=rM;function nM(t,e,r,n,i){return i(t,function(s,a,o){r=n?(n=!1,s):e(r,s,a,o)}),r}function Bo(t,e,r){var n=nr(t)?qS:nM,i=arguments.length<3;return n(t,Gi(e),r,i,iu)}var iM=Xc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Co(t,e[0],e[1])?e=[]:r>2&&Co(e[0],e[1],e[2])&&(e=[e[0]]),XD(t,eu(e,1),[])});const Io=iM;var sM=1/0,aM=xa&&1/J1(new xa([,-0]))[1]==sM?function(t){return new xa(t)}:y9;const oM=aM;var lM=200;function cM(t,e,r){var n=-1,i=S9,s=t.length,a=!0,o=[],l=o;if(r)a=!1,i=SD;else if(s>=lM){var u=e?null:oM(t);if(u)return J1(u);a=!1,i=Ny,l=new Do}else l=e?[]:o;t:for(;++n<s;){var d=t[n],f=e?e(d):d;if(d=r||d!==0?d:0,a&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue t;e&&l.push(f),o.push(d)}else i(l,f,r)||(l!==o&&l.push(f),o.push(d))}return o}var uM=Xc(function(t){return cM(eu(t,1,Gy,!0))});const hM=uM;var dM=0;function ou(t){var e=++dM;return iy(t)+e}function fM(t,e,r){for(var n=-1,i=t.length,s=e.length,a={};++n<i;){var o=n<s?e[n]:void 0;r(a,t[n],o)}return a}function pM(t,e){return fM(t||[],e||[],$c)}var gM="\0",As="\0",Ky="";class sr{constructor(e={}){this._isDirected=me(e,"directed")?e.directed:!0,this._isMultigraph=me(e,"multigraph")?e.multigraph:!1,this._isCompound=me(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ga(void 0),this._defaultEdgeLabelFn=ga(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[As]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return aa(e)||(e=ga(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return jr(this._nodes)}sources(){var e=this;return pi(this.nodes(),function(r){return wa(e._in[r])})}sinks(){var e=this;return pi(this.nodes(),function(r){return wa(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return vt(e,function(s){n.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(e,r){return me(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=As,this._children[e]={},this._children[As][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return me(this._nodes,e)}removeNode(e){var r=this;if(me(this._nodes,e)){var n=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],vt(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),vt(jr(this._in[e]),n),delete this._in[e],delete this._preds[e],vt(jr(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ze(r))r=As;else{r+="";for(var n=r;!Ze(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==As)return r}}children(e){if(Ze(e)&&(e=As),this._isCompound){var r=this._children[e];if(r)return jr(r)}else{if(e===As)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return jr(r)}successors(e){var r=this._sucs[e];if(r)return jr(r)}neighbors(e){var r=this.predecessors(e);if(r)return hM(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;vt(this._nodes,function(a,o){e(o)&&r.setNode(o,a)}),vt(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,n.edge(a))});var i={};function s(a){var o=n.parent(a);return o===void 0||r.hasNode(o)?(i[a]=o,o):o in i?i[o]:s(o)}return this._isCompound&&vt(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(e){return aa(e)||(e=ga(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return gi(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Bo(e,function(s,a){return i.length>1?n.setEdge(s,a,r):n.setEdge(s,a),a}),this}setEdge(){var e,r,n,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(e=a.v,r=a.w,n=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(e=a,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=""+e,r=""+r,Ze(n)||(n=""+n);var o=Oo(this._isDirected,e,r,n);if(me(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(!Ze(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(e,r,n);var l=yM(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,Zy(this._preds[r],e),Zy(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?c0(this._isDirected,arguments[0]):Oo(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?c0(this._isDirected,arguments[0]):Oo(this._isDirected,e,r,n);return me(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?c0(this._isDirected,arguments[0]):Oo(this._isDirected,e,r,n),s=this._edgeObjs[i];return s&&(e=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Qy(this._preds[r],e),Qy(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=gi(n);return r?pi(i,function(s){return s.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=gi(n);return r?pi(i,function(s){return s.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}}sr.prototype._nodeCount=0,sr.prototype._edgeCount=0;function Zy(t,e){t[e]?t[e]++:t[e]=1}function Qy(t,e){--t[e]||delete t[e]}function Oo(t,e,r,n){var i=""+e,s=""+r;if(!t&&i>s){var a=i;i=s,s=a}return i+Ky+s+Ky+(Ze(n)?gM:n)}function yM(t,e,r,n){var i=""+e,s=""+r;if(!t&&i>s){var a=i;i=s,s=a}var o={v:i,w:s};return n&&(o.name=n),o}function c0(t,e){return Oo(t,e.v,e.w,e.name)}class mM{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return Jy(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&Jy(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,bM)),n=n._prev;return"["+e.join(", ")+"]"}}function Jy(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function bM(t,e){if(t!=="_next"&&t!=="_prev")return e}var _M=ga(1);function xM(t,e){if(t.nodeCount()<=1)return[];var r=kM(t,e||_M),n=vM(r.graph,r.buckets,r.zeroIdx);return _a(ir(n,function(i){return t.outEdges(i.v,i.w)}))}function vM(t,e,r){for(var n=[],i=e[e.length-1],s=e[0],a;t.nodeCount();){for(;a=s.dequeue();)u0(t,e,r,a);for(;a=i.dequeue();)u0(t,e,r,a);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(a=e[o].dequeue(),a){n=n.concat(u0(t,e,r,a,!0));break}}}return n}function u0(t,e,r,n,i){var s=i?[]:void 0;return vt(t.inEdges(n.v),function(a){var o=t.edge(a),l=t.node(a.v);i&&s.push({v:a.v,w:a.w}),l.out-=o,h0(e,r,l)}),vt(t.outEdges(n.v),function(a){var o=t.edge(a),l=a.w,u=t.node(l);u.in-=o,h0(e,r,u)}),t.removeNode(n.v),s}function kM(t,e){var r=new sr,n=0,i=0;vt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),vt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),d=l+u;r.setEdge(o.v,o.w,d),i=Math.max(i,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var s=Ss(i+n+3).map(function(){return new mM}),a=n+1;return vt(r.nodes(),function(o){h0(s,a,r.node(o))}),{graph:r,buckets:s,zeroIdx:a}}function h0(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function wM(t){var e=t.graph().acyclicer==="greedy"?xM(t,r(t)):TM(t);vt(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,ou("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function TM(t){var e=[],r={},n={};function i(s){me(n,s)||(n[s]=!0,r[s]=!0,vt(t.outEdges(s),function(a){me(r,a.w)?e.push(a):i(a.w)}),delete r[s])}return vt(t.nodes(),i),e}function EM(t){vt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}function Ta(t,e,r,n){var i;do i=ou(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function CM(t){var e=new sr().setGraph(t.graph());return vt(t.nodes(),function(r){e.setNode(r,t.node(r))}),vt(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function tm(t){var e=new sr({multigraph:t.isMultigraph()}).setGraph(t.graph());return vt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),vt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function em(t,e){var r=t.x,n=t.y,i=e.x-r,s=e.y-n,a=t.width/2,o=t.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(s)*a>Math.abs(i)*o?(s<0&&(o=-o),l=o*i/s,u=o):(i<0&&(a=-a),l=a,u=a*s/i),{x:r+l,y:n+u}}function lu(t){var e=ir(Ss(nm(t)+1),function(){return[]});return vt(t.nodes(),function(r){var n=t.node(r),i=n.rank;Ze(i)||(e[i][n.order]=r)}),e}function SM(t){var e=Mo(ir(t.nodes(),function(r){return t.node(r).rank}));vt(t.nodes(),function(r){var n=t.node(r);me(n,"rank")&&(n.rank-=e)})}function AM(t){var e=Mo(ir(t.nodes(),function(s){return t.node(s).rank})),r=[];vt(t.nodes(),function(s){var a=t.node(s).rank-e;r[a]||(r[a]=[]),r[a].push(s)});var n=0,i=t.graph().nodeRankFactor;vt(r,function(s,a){Ze(s)&&a%i!==0?--n:n&&vt(s,function(o){t.node(o).rank+=n})})}function rm(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Ta(t,"border",i,e)}function nm(t){return Cs(ir(t.nodes(),function(e){var r=t.node(e).rank;if(!Ze(r))return r}))}function LM(t,e){var r={lhs:[],rhs:[]};return vt(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function DM(t,e){var r=Wy();try{return e()}finally{console.log(t+" time: "+(Wy()-r)+"ms")}}function MM(t,e){return e()}function NM(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&vt(n,e),me(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,a=i.maxRank+1;s<a;++s)im(t,"borderLeft","_bl",r,i,s),im(t,"borderRight","_br",r,i,s)}}vt(t.children(),e)}function im(t,e,r,n,i,s){var a={width:0,height:0,rank:s,borderType:e},o=i[e][s-1],l=Ta(t,"border",a,r);i[e][s]=l,t.setParent(l,n),o&&t.setEdge(o,l,{weight:1})}function BM(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&sm(t)}function IM(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&OM(t),(e==="lr"||e==="rl")&&(RM(t),sm(t))}function sm(t){vt(t.nodes(),function(e){am(t.node(e))}),vt(t.edges(),function(e){am(t.edge(e))})}function am(t){var e=t.width;t.width=t.height,t.height=e}function OM(t){vt(t.nodes(),function(e){d0(t.node(e))}),vt(t.edges(),function(e){var r=t.edge(e);vt(r.points,d0),me(r,"y")&&d0(r)})}function d0(t){t.y=-t.y}function RM(t){vt(t.nodes(),function(e){f0(t.node(e))}),vt(t.edges(),function(e){var r=t.edge(e);vt(r.points,f0),me(r,"x")&&f0(r)})}function f0(t){var e=t.x;t.x=t.y,t.y=e}function FM(t){var e=Ta(t,"root",{},"_root"),r=PM(t),n=Cs(gi(r))-1,i=2*n+1;t.graph().nestingRoot=e,vt(t.edges(),function(a){t.edge(a).minlen*=i});var s=YM(t)+1;vt(t.children(),function(a){om(t,e,i,s,n,r,a)}),t.graph().nodeRankFactor=i}function om(t,e,r,n,i,s,a){var o=t.children(a);if(!o.length){a!==e&&t.setEdge(e,a,{weight:0,minlen:r});return}var l=rm(t,"_bt"),u=rm(t,"_bb"),d=t.node(a);t.setParent(l,a),d.borderTop=l,t.setParent(u,a),d.borderBottom=u,vt(o,function(f){om(t,e,r,n,i,s,f);var p=t.node(f),g=p.borderTop?p.borderTop:f,b=p.borderBottom?p.borderBottom:f,k=p.borderTop?n:2*n,T=g!==b?1:i-s[a]+1;t.setEdge(l,g,{weight:k,minlen:T,nestingEdge:!0}),t.setEdge(b,u,{weight:k,minlen:T,nestingEdge:!0})}),t.parent(a)||t.setEdge(e,l,{weight:0,minlen:i+s[a]})}function PM(t){var e={};function r(n,i){var s=t.children(n);s&&s.length&&vt(s,function(a){r(a,i+1)}),e[n]=i}return vt(t.children(),function(n){r(n,1)}),e}function YM(t){return Bo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function VM(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,vt(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}function UM(t,e,r){var n={},i;vt(r,function(s){for(var a=t.parent(s),o,l;a;){if(o=t.parent(a),o?(l=n[o],n[o]=a):(l=i,i=a),l&&l!==a){e.setEdge(l,a);return}a=o}})}function zM(t,e,r){var n=WM(t),i=new sr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(s){return t.node(s)});return vt(t.nodes(),function(s){var a=t.node(s),o=t.parent(s);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(i.setNode(s),i.setParent(s,o||n),vt(t[r](s),function(l){var u=l.v===s?l.w:l.v,d=i.edge(u,s),f=Ze(d)?0:d.weight;i.setEdge(u,s,{weight:t.edge(l).weight+f})}),me(a,"minRank")&&i.setNode(s,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),i}function WM(t){for(var e;t.hasNode(e=ou("_root")););return e}function HM(t,e){for(var r=0,n=1;n<e.length;++n)r+=GM(t,e[n-1],e[n]);return r}function GM(t,e,r){for(var n=pM(r,ir(r,function(u,d){return d})),i=_a(ir(e,function(u){return Io(ir(t.outEdges(u),function(d){return{pos:n[d.w],weight:t.edge(d).weight}}),"pos")})),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var o=ir(new Array(a),function(){return 0}),l=0;return vt(i.forEach(function(u){var d=u.pos+s;o[d]+=u.weight;for(var f=0;d>0;)d%2&&(f+=o[d+1]),d=d-1>>1,o[d]+=u.weight;l+=u.weight*f})),l}function qM(t){var e={},r=pi(t.nodes(),function(o){return!t.children(o).length}),n=Cs(ir(r,function(o){return t.node(o).rank})),i=ir(Ss(n+1),function(){return[]});function s(o){if(!me(e,o)){e[o]=!0;var l=t.node(o);i[l.rank].push(o),vt(t.successors(o),s)}}var a=Io(r,function(o){return t.node(o).rank});return vt(a,s),i}function jM(t,e){return ir(e,function(r){var n=t.inEdges(r);if(n.length){var i=Bo(n,function(s,a){var o=t.edge(a),l=t.node(a.v);return{sum:s.sum+o.weight*l.order,weight:s.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function $M(t,e){var r={};vt(t,function(i,s){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};Ze(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),vt(e.edges(),function(i){var s=r[i.v],a=r[i.w];!Ze(s)&&!Ze(a)&&(a.indegree++,s.out.push(r[i.w]))});var n=pi(r,function(i){return!i.indegree});return XM(n)}function XM(t){var e=[];function r(s){return function(a){a.merged||(Ze(a.barycenter)||Ze(s.barycenter)||a.barycenter>=s.barycenter)&&KM(s,a)}}function n(s){return function(a){a.in.push(s),--a.indegree===0&&t.push(a)}}for(;t.length;){var i=t.pop();e.push(i),vt(i.in.reverse(),r(i)),vt(i.out,n(i))}return ir(pi(e,function(s){return!s.merged}),function(s){return No(s,["vs","i","barycenter","weight"])})}function KM(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}function ZM(t,e){var r=LM(t,function(d){return me(d,"barycenter")}),n=r.lhs,i=Io(r.rhs,function(d){return-d.i}),s=[],a=0,o=0,l=0;n.sort(QM(!!e)),l=lm(s,i,l),vt(n,function(d){l+=d.vs.length,s.push(d.vs),a+=d.barycenter*d.weight,o+=d.weight,l=lm(s,i,l)});var u={vs:_a(s)};return o&&(u.barycenter=a/o,u.weight=o),u}function lm(t,e,r){for(var n;e.length&&(n=su(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function QM(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}function cm(t,e,r,n){var i=t.children(e),s=t.node(e),a=s?s.borderLeft:void 0,o=s?s.borderRight:void 0,l={};a&&(i=pi(i,function(b){return b!==a&&b!==o}));var u=jM(t,i);vt(u,function(b){if(t.children(b.v).length){var k=cm(t,b.v,r,n);l[b.v]=k,me(k,"barycenter")&&tN(b,k)}});var d=$M(u,r);JM(d,l);var f=ZM(d,n);if(a&&(f.vs=_a([a,f.vs,o]),t.predecessors(a).length)){var p=t.node(t.predecessors(a)[0]),g=t.node(t.predecessors(o)[0]);me(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+g.order)/(f.weight+2),f.weight+=2}return f}function JM(t,e){vt(t,function(r){r.vs=_a(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function tN(t,e){Ze(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}function eN(t){var e=nm(t),r=um(t,Ss(1,e+1),"inEdges"),n=um(t,Ss(e-1,-1,-1),"outEdges"),i=qM(t);hm(t,i);for(var s=Number.POSITIVE_INFINITY,a,o=0,l=0;l<4;++o,++l){rN(o%2?r:n,o%4>=2),i=lu(t);var u=HM(t,i);u<s&&(l=0,a=ML(i),s=u)}hm(t,a)}function um(t,e,r){return ir(e,function(n){return zM(t,n,r)})}function rN(t,e){var r=new sr;vt(t,function(n){var i=n.graph().root,s=cm(n,i,r,e);vt(s.vs,function(a,o){n.node(a).order=o}),UM(n,r,s.vs)})}function hm(t,e){vt(e,function(r){vt(r,function(n,i){t.node(n).order=i})})}function nN(t){var e=sN(t);vt(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,s=iN(t,e,i.v,i.w),a=s.path,o=s.lca,l=0,u=a[l],d=!0;r!==i.w;){if(n=t.node(r),d){for(;(u=a[l])!==o&&t.node(u).maxRank<n.rank;)l++;u===o&&(d=!1)}if(!d){for(;l<a.length-1&&t.node(u=a[l+1]).minRank<=n.rank;)l++;u=a[l]}t.setParent(r,u),r=t.successors(r)[0]}})}function iN(t,e,r,n){var i=[],s=[],a=Math.min(e[r].low,e[n].low),o=Math.max(e[r].lim,e[n].lim),l,u;l=r;do l=t.parent(l),i.push(l);while(l&&(e[l].low>a||o>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)s.push(l);return{path:i.concat(s.reverse()),lca:u}}function sN(t){var e={},r=0;function n(i){var s=r;vt(t.children(i),n),e[i]={low:s,lim:r++}}return vt(t.children(),n),e}function aN(t,e){var r={};function n(i,s){var a=0,o=0,l=i.length,u=su(s);return vt(s,function(d,f){var p=lN(t,d),g=p?t.node(p).order:l;(p||d===u)&&(vt(s.slice(o,f+1),function(b){vt(t.predecessors(b),function(k){var T=t.node(k),L=T.order;(L<a||g<L)&&!(T.dummy&&t.node(b).dummy)&&dm(r,k,b)})}),o=f+1,a=g)}),s}return Bo(e,n),r}function oN(t,e){var r={};function n(s,a,o,l,u){var d;vt(Ss(a,o),function(f){d=s[f],t.node(d).dummy&&vt(t.predecessors(d),function(p){var g=t.node(p);g.dummy&&(g.order<l||g.order>u)&&dm(r,p,d)})})}function i(s,a){var o=-1,l,u=0;return vt(a,function(d,f){if(t.node(d).dummy==="border"){var p=t.predecessors(d);p.length&&(l=t.node(p[0]).order,n(a,u,f,o,l),u=f,o=l)}n(a,u,a.length,l,s.length)}),a}return Bo(e,i),r}function lN(t,e){if(t.node(e).dummy)return s0(t.predecessors(e),function(r){return t.node(r).dummy})}function dm(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function cN(t,e,r){if(e>r){var n=e;e=r,r=n}return me(t[e],r)}function uN(t,e,r,n){var i={},s={},a={};return vt(e,function(o){vt(o,function(l,u){i[l]=l,s[l]=l,a[l]=u})}),vt(e,function(o){var l=-1;vt(o,function(u){var d=n(u);if(d.length){d=Io(d,function(k){return a[k]});for(var f=(d.length-1)/2,p=Math.floor(f),g=Math.ceil(f);p<=g;++p){var b=d[p];s[u]===u&&l<a[b]&&!cN(r,u,b)&&(s[b]=u,s[u]=i[u]=i[b],l=a[b])}}})}),{root:i,align:s}}function hN(t,e,r,n,i){var s={},a=dN(t,e,r,i),o=i?"borderLeft":"borderRight";function l(f,p){for(var g=a.nodes(),b=g.pop(),k={};b;)k[b]?f(b):(k[b]=!0,g.push(b),g=g.concat(p(b))),b=g.pop()}function u(f){s[f]=a.inEdges(f).reduce(function(p,g){return Math.max(p,s[g.v]+a.edge(g))},0)}function d(f){var p=a.outEdges(f).reduce(function(b,k){return Math.min(b,s[k.w]-a.edge(k))},Number.POSITIVE_INFINITY),g=t.node(f);p!==Number.POSITIVE_INFINITY&&g.borderType!==o&&(s[f]=Math.max(s[f],p))}return l(u,a.predecessors.bind(a)),l(d,a.successors.bind(a)),vt(n,function(f){s[f]=s[r[f]]}),s}function dN(t,e,r,n){var i=new sr,s=t.graph(),a=mN(s.nodesep,s.edgesep,n);return vt(e,function(o){var l;vt(o,function(u){var d=r[u];if(i.setNode(d),l){var f=r[l],p=i.edge(f,d);i.setEdge(f,d,Math.max(a(t,u,l),p||0))}l=u})}),i}function fN(t,e){return l0(gi(e),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return BD(r,function(s,a){var o=bN(t,a)/2;n=Math.max(s+o,n),i=Math.min(s-o,i)}),n-i})}function pN(t,e){var r=gi(e),n=Mo(r),i=Cs(r);vt(["u","d"],function(s){vt(["l","r"],function(a){var o=s+a,l=t[o],u;if(l!==e){var d=gi(l);u=a==="l"?n-Mo(d):i-Cs(d),u&&(t[o]=au(l,function(f){return f+u}))}})})}function gN(t,e){return au(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=Io(ir(t,n));return(i[1]+i[2])/2})}function yN(t){var e=lu(t),r=o0(aN(t,e),oN(t,e)),n={},i;vt(["u","d"],function(a){i=a==="u"?e:gi(e).reverse(),vt(["l","r"],function(o){o==="r"&&(i=ir(i,function(f){return gi(f).reverse()}));var l=(a==="u"?t.predecessors:t.successors).bind(t),u=uN(t,i,r,l),d=hN(t,i,u.root,u.align,o==="r");o==="r"&&(d=au(d,function(f){return-f})),n[a+o]=d})});var s=fN(t,n);return pN(n,s),gN(n,t.graph().align)}function mN(t,e,r){return function(n,i,s){var a=n.node(i),o=n.node(s),l=0,u;if(l+=a.width/2,me(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(a.dummy?e:t)/2,l+=(o.dummy?e:t)/2,l+=o.width/2,me(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=o.width/2;break;case"r":u=-o.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function bN(t,e){return t.node(e).width}function _N(t){t=tm(t),xN(t),vt(yN(t),function(e,r){t.node(r).x=e})}function xN(t){var e=lu(t),r=t.graph().ranksep,n=0;vt(e,function(i){var s=Cs(ir(i,function(a){return t.node(a).height}));vt(i,function(a){t.node(a).y=n+s/2}),n+=s+r})}function Ea(t,e){var r=e&&e.debugTiming?DM:MM;r("layout",function(){var n=r(" buildLayoutGraph",function(){return MN(t)});r(" runLayout",function(){vN(n,r)}),r(" updateInputGraph",function(){kN(t,n)})})}function vN(t,e){e(" makeSpaceForEdgeLabels",function(){NN(t)}),e(" removeSelfEdges",function(){UN(t)}),e(" acyclic",function(){wM(t)}),e(" nestingGraph.run",function(){FM(t)}),e(" rank",function(){rB(tm(t))}),e(" injectEdgeLabelProxies",function(){BN(t)}),e(" removeEmptyRanks",function(){AM(t)}),e(" nestingGraph.cleanup",function(){VM(t)}),e(" normalizeRanks",function(){SM(t)}),e(" assignRankMinMax",function(){IN(t)}),e(" removeEdgeLabelProxies",function(){ON(t)}),e(" normalize.run",function(){HN(t)}),e(" parentDummyChains",function(){nN(t)}),e(" addBorderSegments",function(){NM(t)}),e(" order",function(){eN(t)}),e(" insertSelfEdges",function(){zN(t)}),e(" adjustCoordinateSystem",function(){BM(t)}),e(" position",function(){_N(t)}),e(" positionSelfEdges",function(){WN(t)}),e(" removeBorderNodes",function(){VN(t)}),e(" normalize.undo",function(){qN(t)}),e(" fixupEdgeLabelCoords",function(){PN(t)}),e(" undoCoordinateSystem",function(){IM(t)}),e(" translateGraph",function(){RN(t)}),e(" assignNodeIntersects",function(){FN(t)}),e(" reversePoints",function(){YN(t)}),e(" acyclic.undo",function(){EM(t)})}function kN(t,e){vt(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),vt(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,me(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var wN=["nodesep","edgesep","ranksep","marginx","marginy"],TN={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},EN=["acyclicer","ranker","rankdir","align"],CN=["width","height"],SN={width:0,height:0},AN=["minlen","weight","width","height","labeloffset"],LN={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},DN=["labelpos"];function MN(t){var e=new sr({multigraph:!0,compound:!0}),r=g0(t.graph());return e.setGraph(o0({},TN,p0(r,wN),No(r,EN))),vt(t.nodes(),function(n){var i=g0(t.node(n));e.setNode(n,ka(p0(i,CN),SN)),e.setParent(n,t.parent(n))}),vt(t.edges(),function(n){var i=g0(t.edge(n));e.setEdge(n,o0({},LN,p0(i,AN),No(i,DN)))}),e}function NN(t){var e=t.graph();e.ranksep/=2,vt(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function BN(t){vt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),s={rank:(i.rank-n.rank)/2+n.rank,e};Ta(t,"edge-proxy",s,"_ep")}})}function IN(t){var e=0;vt(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=Cs(e,n.maxRank))}),t.graph().maxRank=e}function ON(t){vt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function RN(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,s=t.graph(),a=s.marginx||0,o=s.marginy||0;function l(u){var d=u.x,f=u.y,p=u.width,g=u.height;e=Math.min(e,d-p/2),r=Math.max(r,d+p/2),n=Math.min(n,f-g/2),i=Math.max(i,f+g/2)}vt(t.nodes(),function(u){l(t.node(u))}),vt(t.edges(),function(u){var d=t.edge(u);me(d,"x")&&l(d)}),e-=a,n-=o,vt(t.nodes(),function(u){var d=t.node(u);d.x-=e,d.y-=n}),vt(t.edges(),function(u){var d=t.edge(u);vt(d.points,function(f){f.x-=e,f.y-=n}),me(d,"x")&&(d.x-=e),me(d,"y")&&(d.y-=n)}),s.width=r-e+a,s.height=i-n+o}function FN(t){vt(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),s,a;r.points?(s=r.points[0],a=r.points[r.points.length-1]):(r.points=[],s=i,a=n),r.points.unshift(em(n,s)),r.points.push(em(i,a))})}function PN(t){vt(t.edges(),function(e){var r=t.edge(e);if(me(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function YN(t){vt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function VN(t){vt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),s=t.node(su(r.borderLeft)),a=t.node(su(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(i.y-n.y),r.x=s.x+r.width/2,r.y=n.y+r.height/2}}),vt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function UN(t){vt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function zN(t){var e=lu(t);vt(e,function(r){var n=0;vt(r,function(i,s){var a=t.node(i);a.order=s+n,vt(a.selfEdges,function(o){Ta(t,"selfedge",{width:o.label.width,height:o.label.height,rank:a.rank,order:s+ ++n,e:o.e,label:o.label},"_se")}),delete a.selfEdges})})}function WN(t){vt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,s=n.y,a=r.x-i,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*a/3,y:s-o},{x:i+5*a/6,y:s-o},{x:i+a,y:s},{x:i+5*a/6,y:s+o},{x:i+2*a/3,y:s+o}],r.label.x=r.x,r.label.y=r.y}})}function p0(t,e){return au(No(t,e),Number)}function g0(t){var e={};return vt(t,function(r,n){e[n.toLowerCase()]=r}),e}function HN(t){t.graph().dummyChains=[],vt(t.edges(),function(e){GN(t,e)})}function GN(t,e){var r=e.v,n=t.node(r).rank,i=e.w,s=t.node(i).rank,a=e.name,o=t.edge(e),l=o.labelRank;if(s!==n+1){t.removeEdge(e);var u,d,f;for(f=0,++n;n<s;++f,++n)o.points=[],d={width:0,height:0,edgeLabel:o,edgeObj:e,rank:n},u=Ta(t,"edge",d,"_d"),n===l&&(d.width=o.width,d.height=o.height,d.dummy="edge-label",d.labelpos=o.labelpos),t.setEdge(r,u,{weight:o.weight},a),f===0&&t.graph().dummyChains.push(u),r=u;t.setEdge(r,i,{weight:o.weight},a)}}function qN(t){vt(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,i;for(t.setEdge(r.edgeObj,n);r.dummy;)i=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=i,r=t.node(e)})}function y0(t){var e={};function r(n){var i=t.node(n);if(me(e,n))return i.rank;e[n]=!0;var s=Mo(ir(t.outEdges(n),function(a){return r(a.w)-t.edge(a).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),i.rank=s}vt(t.sources(),r)}function Ro(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function fm(t){var e=new sr({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,s;jN(e,t)<n;)i=$N(e,t),s=e.hasNode(i.v)?Ro(t,i):-Ro(t,i),XN(e,t,s);return e}function jN(t,e){function r(n){vt(e.nodeEdges(n),function(i){var s=i.v,a=n===s?i.w:s;!t.hasNode(a)&&!Ro(e,i)&&(t.setNode(a,{}),t.setEdge(n,a,{}),r(a))})}return vt(t.nodes(),r),t.nodeCount()}function $N(t,e){return l0(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return Ro(e,r)})}function XN(t,e,r){vt(t.nodes(),function(n){e.node(n).rank+=r})}function KN(){}KN.prototype=new Error;function pm(t,e,r){nr(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],s={};return vt(e,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);gm(t,a,r==="post",s,n,i)}),i}function gm(t,e,r,n,i,s){me(n,e)||(n[e]=!0,r||s.push(e),vt(i(e),function(a){gm(t,a,r,n,i,s)}),r&&s.push(e))}function ZN(t,e){return pm(t,e,"post")}function QN(t,e){return pm(t,e,"pre")}Ls.initLowLimValues=b0,Ls.initCutValues=m0,Ls.calcCutValue=ym,Ls.leaveEdge=bm,Ls.enterEdge=_m,Ls.exchangeEdges=xm;function Ls(t){t=CM(t),y0(t);var e=fm(t);b0(e),m0(e,t);for(var r,n;r=bm(e);)n=_m(e,t,r),xm(e,t,r,n)}function m0(t,e){var r=ZN(t,t.nodes());r=r.slice(0,r.length-1),vt(r,function(n){JN(t,e,n)})}function JN(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=ym(t,e,r)}function ym(t,e,r){var n=t.node(r),i=n.parent,s=!0,a=e.edge(r,i),o=0;return a||(s=!1,a=e.edge(i,r)),o=a.weight,vt(e.nodeEdges(r),function(l){var u=l.v===r,d=u?l.w:l.v;if(d!==i){var f=u===s,p=e.edge(l).weight;if(o+=f?p:-p,eB(t,r,d)){var g=t.edge(r,d).cutvalue;o+=f?-g:g}}}),o}function b0(t,e){arguments.length<2&&(e=t.nodes()[0]),mm(t,{},1,e)}function mm(t,e,r,n,i){var s=r,a=t.node(n);return e[n]=!0,vt(t.neighbors(n),function(o){me(e,o)||(r=mm(t,e,r,o,n))}),a.low=s,a.lim=r++,i?a.parent=i:delete a.parent,r}function bm(t){return s0(t.edges(),function(e){return t.edge(e).cutvalue<0})}function _m(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var s=t.node(n),a=t.node(i),o=s,l=!1;s.lim>a.lim&&(o=a,l=!0);var u=pi(e.edges(),function(d){return l===vm(t,t.node(d.v),o)&&l!==vm(t,t.node(d.w),o)});return l0(u,function(d){return Ro(e,d)})}function xm(t,e,r,n){var i=r.v,s=r.w;t.removeEdge(i,s),t.setEdge(n.v,n.w,{}),b0(t),m0(t,e),tB(t,e)}function tB(t,e){var r=s0(t.nodes(),function(i){return!e.node(i).parent}),n=QN(t,r);n=n.slice(1),vt(n,function(i){var s=t.node(i).parent,a=e.edge(i,s),o=!1;a||(a=e.edge(s,i),o=!0),e.node(i).rank=e.node(s).rank+(o?a.minlen:-a.minlen)})}function eB(t,e,r){return t.hasEdge(e,r)}function vm(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function rB(t){switch(t.graph().ranker){case"network-simplex":km(t);break;case"tight-tree":iB(t);break;case"longest-path":nB(t);break;default:km(t)}}var nB=y0;function iB(t){y0(t),fm(t)}function km(t){Ls(t)}let wm=0;const sB=function(t,e,r,n,i){const s=function(E){switch(E){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(E=>!Number.isNaN(E.y));const a=e.points,o=Js().x(function(E){return E.x}).y(function(E){return E.y}).curve(ta),l=t.append("path").attr("d",o(a)).attr("id","edge"+wm).attr("class","relation");let u="";n.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),r.relation.lineType==1&&l.attr("class","relation dashed-line"),r.relation.lineType==10&&l.attr("class","relation dotted-line"),r.relation.type1!=="none"&&l.attr("marker-start","url("+u+"#"+s(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+u+"#"+s(r.relation.type2)+"End)");let d,f;const p=e.points.length;let g=ge.calcLabelPosition(e.points);d=g.x,f=g.y;let b,k,T,L;if(p%2!==0&&p>1){let E=ge.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),I=ge.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);B.debug("cardinality_1_point "+JSON.stringify(E)),B.debug("cardinality_2_point "+JSON.stringify(I)),b=E.x,k=E.y,T=I.x,L=I.y}if(r.title!==void 0){const E=t.append("g").attr("class","classLabel"),I=E.append("text").attr("class","label").attr("x",d).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=I;const V=I.node().getBBox();E.insert("rect",":first-child").attr("class","box").attr("x",V.x-n.padding/2).attr("y",V.y-n.padding/2).attr("width",V.width+n.padding).attr("height",V.height+n.padding)}B.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",k).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",T).attr("y",L).attr("fill","black").attr("font-size","6").text(r.relationTitle2),wm++},aB=function(t,e,r,n){B.debug("Rendering class ",e,r);const i=e.id,s={id:i,label:e.id,width:0,height:0},a=t.append("g").attr("id",n.db.lookUpDomId(i)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let l=!0;e.annotations.forEach(function(H){const G=o.append("tspan").text("\xAB"+H+"\xBB");l||G.attr("dy",r.textHeight),l=!1});let u=e.id;e.type!==void 0&&e.type!==""&&(u+="<"+e.type+">");const d=o.append("tspan").text(u).attr("class","title");l||d.attr("dy",r.textHeight);const f=o.node().getBBox().height,p=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin/2).attr("y2",r.padding+f+r.dividerMargin/2),g=a.append("text").attr("x",r.padding).attr("y",f+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(H){Tm(g,H,l,r),l=!1});const b=g.node().getBBox(),k=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin+b.height).attr("y2",r.padding+f+r.dividerMargin+b.height),T=a.append("text").attr("x",r.padding).attr("y",f+2*r.dividerMargin+b.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(H){Tm(T,H,l,r),l=!1});const L=a.node().getBBox();var E=" ";e.cssClasses.length>0&&(E=E+e.cssClasses.join(" "));const V=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",L.width+2*r.padding).attr("height",L.height+r.padding+.5*r.dividerMargin).attr("class",E).node().getBBox().width;return o.node().childNodes.forEach(function(H){H.setAttribute("x",(V-H.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),p.attr("x2",V),k.attr("x2",V),s.width=V,s.height=L.height+r.padding+.5*r.dividerMargin,s},oB=function(t,e,r,n){B.debug("Rendering note ",e,r);const i=e.id,s={id:i,text:e.text,width:0,height:0},a=t.append("g").attr("id",i).attr("class","classGroup");let o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
`);l.forEach(function(p){B.debug(`Adding line: ${p}`),o.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});const u=a.node().getBBox(),f=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",u.width+2*r.padding).attr("height",u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(p){p.setAttribute("x",(f-p.getBBox().width)/2)}),s.width=f,s.height=u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,s},cu=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,r=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let n=t.match(e),i=t.match(r);return n&&!i?lB(n):i?cB(i):uB(t)},lB=function(t){let e="",r="";try{let n=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",s=t[3]?Oi(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=n+i+s+" "+a,e=_0(o)}catch{r=t}return{displayText:r,cssStyle:e}},cB=function(t){let e="",r="";try{let n=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",s=t[3]?Oi(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+Oi(t[5]).trim():"";r=n+i+"("+s+")"+o,e=_0(a)}catch{r=t}return{displayText:r,cssStyle:e}},uB=function(t){let e="",r="",n="",i=t.indexOf("("),s=t.indexOf(")");if(i>1&&s>i&&s<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,i).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,i).trim());const u=t.substring(i+1,s);t.substring(s+1,1),r=_0(t.substring(s+1,s+2)),e=a+o+"("+Oi(u.trim())+")",s<t.length&&(n=t.substring(s+2).trim(),n!==""&&(n=" : "+Oi(n),e+=n))}else e=Oi(t);return{displayText:e,cssStyle:r}},Tm=function(t,e,r,n){let i=cu(e);const s=t.append("tspan").attr("x",n.padding).text(i.displayText);i.cssStyle!==""&&s.attr("style",i.cssStyle),r||s.attr("dy",n.textHeight)},_0=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},x0={drawClass:aB,drawEdge:sB,drawNote:oB,parseMember:cu};let uu={};const hu=20,Fo=function(t){const e=Object.entries(uu).find(r=>r[1].label===t);if(e)return e[0]},hB=function(t){t.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"),t.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"),t.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"),t.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"),t.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"),t.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"),t.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"),t.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")},dB={draw:function(t,e,r,n){const i=$().class;uu={},B.info("Rendering diagram "+t);const s=$().securityLevel;let a;s==="sandbox"&&(a=St("#i"+e));const o=St(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=o.select(`[id='${e}']`);hB(l);const u=new sr({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel(function(){return{}});const d=n.db.getClasses(),f=Object.keys(d);for(const E of f){const I=d[E],V=x0.drawClass(l,I,i,n);uu[V.id]=V,u.setNode(V.id,V),B.info("Org height: "+V.height)}n.db.getRelations().forEach(function(E){B.info("tjoho"+Fo(E.id1)+Fo(E.id2)+JSON.stringify(E)),u.setEdge(Fo(E.id1),Fo(E.id2),{relation:E},E.title||"DEFAULT")}),n.db.getNotes().forEach(function(E){B.debug(`Adding note: ${JSON.stringify(E)}`);const I=x0.drawNote(l,E,i,n);uu[I.id]=I,u.setNode(I.id,I),E.class&&E.class in d&&u.setEdge(E.id,Fo(E.class),{relation:{id1:E.id,id2:E.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Ea(u),u.nodes().forEach(function(E){E!==void 0&&u.node(E)!==void 0&&(B.debug("Node "+E+": "+JSON.stringify(u.node(E))),o.select("#"+(n.db.lookUpDomId(E)||E)).attr("transform","translate("+(u.node(E).x-u.node(E).width/2)+","+(u.node(E).y-u.node(E).height/2)+" )"))}),u.edges().forEach(function(E){E!==void 0&&u.edge(E)!==void 0&&(B.debug("Edge "+E.v+" -> "+E.w+": "+JSON.stringify(u.edge(E))),x0.drawEdge(l,u.edge(E),u.edge(E).relation,i,n))});const b=l.node().getBBox(),k=b.width+hu*2,T=b.height+hu*2;xn(l,T,k,i.useMaxWidth);const L=`${b.x-hu} ${b.y-hu} ${k} ${T}`;B.debug(`viewBox ${L}`),l.attr("viewBox",L)}};function yi(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:fB(t),edges:pB(t)};return Ze(t.graph())||(e.value=AL(t.graph())),e}function fB(t){return ir(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return Ze(r)||(i.value=r),Ze(n)||(i.parent=n),i})}function pB(t){return ir(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return Ze(e.name)||(n.name=e.name),Ze(r)||(n.value=r),n})}const gB=(t,e,r,n)=>{e.forEach(i=>{yB[i](t,r,n)})},yB={extension:(t,e,r)=>{B.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).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:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).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:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).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:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).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:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).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:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).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:(t,e)=>{t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).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:(t,e)=>{t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).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:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-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")}},mB=gB;function bB(t,e){e&&t.attr("style",e)}function _B(t){const e=St(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+n+"</span>"),bB(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const Vr=(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),pr($().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),B.info("vertexText"+i);const s={isNode:n,label:Id(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return _B(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof i=="string"?a=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?a=i:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),s.appendChild(l)}return s}},Er=(t,e,r,n)=>{let i;r?i=r:i="node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(Vr(yn(Id(o),$()),e.labelStyle,!1,n));let u=l.getBBox();if(pr($().flowchart.htmlLabels)){const f=l.children[0],p=St(l);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}const d=e.padding/2;return a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:s,bbox:u,halfPadding:d,label:a}},Qe=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function mi(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}let Te={},Ln={},Em={};const xB=()=>{Ln={},Em={},Te={}},du=(t,e)=>(B.trace("In isDecendant",e," ",t," = ",Ln[e].includes(t)),!!Ln[e].includes(t)),vB=(t,e)=>(B.info("Decendants of ",e," is ",Ln[e]),B.info("Edge is ",t),t.v===e||t.w===e?!1:Ln[e]?Ln[e].includes(t.v)||du(t.v,e)||du(t.w,e)||Ln[e].includes(t.w):(B.debug("Tilt, ",e,",not in decendants"),!1)),Cm=(t,e,r,n)=>{B.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const i=e.children(t)||[];t!==n&&i.push(t),B.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(s=>{if(e.children(s).length>0)Cm(s,e,r,n);else{const a=e.node(s);B.info("cp ",s," to ",n," with parent ",t),r.setNode(s,a),n!==e.parent(s)&&(B.warn("Setting parent",s,e.parent(s)),r.setParent(s,e.parent(s))),t!==n&&s!==t?(B.debug("Setting parent",s,t),r.setParent(s,t)):(B.info("In copy ",t,"root",n,"data",e.node(t),n),B.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==n,"node!==clusterId",s!==t));const o=e.edges(s);B.debug("Copying Edges",o),o.forEach(l=>{B.info("Edge",l);const u=e.edge(l.v,l.w,l.name);B.info("Edge data",u,n);try{vB(l,n)?(B.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),B.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):B.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(d){B.error(d)}})}B.debug("Removing node",s),e.removeNode(s)})},Sm=(t,e)=>{const r=e.children(t);let n=[...r];for(const i of r)Em[i]=t,n=[...n,...Sm(i,e)];return n},Po=(t,e)=>{B.trace("Searching",t);const r=e.children(t);if(B.trace("Searching children of id ",t,r),r.length<1)return B.trace("This is a valid node",t),t;for(const n of r){const i=Po(n,e);if(i)return B.trace("Found replacement for",t," => ",i),i}},fu=t=>!Te[t]||!Te[t].externalConnections?t:Te[t]?Te[t].id:t,kB=(t,e)=>{if(!t||e>10){B.debug("Opting out, no graph ");return}else B.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(B.warn("Cluster identified",r," Replacement id in edges: ",Po(r,t)),Ln[r]=Sm(r,t),Te[r]={id:Po(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const n=t.children(r),i=t.edges();n.length>0?(B.debug("Cluster identified",r,Ln),i.forEach(s=>{if(s.v!==r&&s.w!==r){const a=du(s.v,r),o=du(s.w,r);a^o&&(B.warn("Edge: ",s," leaves cluster ",r),B.warn("Decendants of XXX ",r,": ",Ln[r]),Te[r].externalConnections=!0)}})):B.debug("Not a cluster ",r,Ln)}),t.edges().forEach(function(r){const n=t.edge(r);B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,s=r.w;if(B.warn("Fix XXX",Te,"ids:",r.v,r.w,"Translating: ",Te[r.v]," --- ",Te[r.w]),Te[r.v]&&Te[r.w]&&Te[r.v]===Te[r.w]){B.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=fu(r.v),s=fu(r.w),t.removeEdge(r.v,r.w,r.name);const a=r.w+"---"+r.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(n)),l=JSON.parse(JSON.stringify(n));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=r.v,l.toCluster=r.v,t.setEdge(i,a,o,r.name+"-cyclic-special"),t.setEdge(a,s,l,r.name+"-cyclic-special")}else(Te[r.v]||Te[r.w])&&(B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=fu(r.v),s=fu(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v&&(n.fromCluster=r.v),s!==r.w&&(n.toCluster=r.w),B.warn("Fix Replacing with XXX",i,s,r.name),t.setEdge(i,s,n,r.name))}),B.warn("Adjusted Graph",yi(t)),Am(t,0),B.trace(Te)},Am=(t,e)=>{if(B.warn("extractor - ",e,yi(t),t.children("D")),e>10){B.error("Bailing out");return}let r=t.nodes(),n=!1;for(const i of r){const s=t.children(i);n=n||s.length>0}if(!n){B.debug("Done, no node has children",t.nodes());return}B.debug("Nodes = ",r,e);for(const i of r)if(B.debug("Extracting node",i,Te,Te[i]&&!Te[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Te[i])B.debug("Not a cluster",i,e);else if(!Te[i].externalConnections&&t.children(i)&&t.children(i).length>0){B.warn("Cluster without external connections, without a parent and with children",i,e);let a=t.graph().rankdir==="TB"?"LR":"TB";Te[i]&&Te[i].clusterData&&Te[i].clusterData.dir&&(a=Te[i].clusterData.dir,B.warn("Fixing dir",Te[i].clusterData.dir,a));const o=new sr({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});B.warn("Old graph before copy",yi(t)),Cm(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Te[i].clusterData,labelText:Te[i].labelText,graph:o}),B.warn("New graph after copy node: (",i,")",yi(o)),B.debug("Old graph after copy",yi(t))}else B.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Te[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),B.debug(Te);r=t.nodes(),B.warn("New list of nodes",r);for(const i of r){const s=t.node(i);B.warn(" Now next level",i,s),s.clusterNode&&Am(s.graph,e+1)}},Lm=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(n=>{const i=t.children(n),s=Lm(t,i);r=[...r,...s]}),r},wB=t=>Lm(t,t.children());function TB(t,e){return t.intersect(e)}function Dm(t,e,r,n){var i=t.x,s=t.y,a=i-n.x,o=s-n.y,l=Math.sqrt(e*e*o*o+r*r*a*a),u=Math.abs(e*r*a/l);n.x<i&&(u=-u);var d=Math.abs(e*r*o/l);return n.y<s&&(d=-d),{x:i+u,y:s+d}}function EB(t,e,r){return Dm(t,e,e,r)}function CB(t,e,r,n){var i,s,a,o,l,u,d,f,p,g,b,k,T,L,E;if(i=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=i*r.x+a*r.y+l,g=i*n.x+a*n.y+l,!(p!==0&&g!==0&&Mm(p,g))&&(s=n.y-r.y,o=r.x-n.x,u=n.x*r.y-r.x*n.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&Mm(d,f))&&(b=i*o-s*a,b!==0)))return k=Math.abs(b/2),T=a*u-o*l,L=T<0?(T-k)/b:(T+k)/b,T=s*l-i*u,E=T<0?(T-k)/b:(T+k)/b,{x:L,y:E}}function Mm(t,e){return t*e>0}function SB(t,e,r){var n=t.x,i=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(b){a=Math.min(a,b.x),o=Math.min(o,b.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-a,u=i-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=CB(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(b,k){var T=b.x-r.x,L=b.y-r.y,E=Math.sqrt(T*T+L*L),I=k.x-r.x,V=k.y-r.y,H=Math.sqrt(I*I+V*V);return E<H?-1:E===H?0:1}),s[0]):t}const Yo=(t,e)=>{var r=t.x,n=t.y,i=e.x-r,s=e.y-n,a=t.width/2,o=t.height/2,l,u;return Math.abs(s)*a>Math.abs(i)*o?(s<0&&(o=-o),l=s===0?0:o*i/s,u=o):(i<0&&(a=-a),l=a,u=i===0?0:a*s/i),{x:r+l,y:n+u}},Ge={node:TB,circle:EB,ellipse:Dm,polygon:SB,rect:Yo},AB=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Er(t,e,"node "+e.classes,!0);B.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),Qe(e,s),e.intersect=function(a){return Ge.rect(e,a)},r},LB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=i+s,o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];B.info("Question main (Circle)");const l=mi(r,a,a,o);return l.attr("style",e.style),Qe(e,l),e.intersect=function(u){return B.warn("Intersect called"),Ge.polygon(e,o,u)},r},DB=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(a){return Ge.circle(e,14,a)},r},MB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=4,s=n.height+e.padding,a=s/i,o=n.width+2*a+e.padding,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-s/2},{x:o-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}],u=mi(r,o,s,l);return u.attr("style",e.style),Qe(e,u),e.intersect=function(d){return Ge.polygon(e,l,d)},r},NB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return mi(r,i,s,a).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(l){return Ge.polygon(e,a,l)},r},BB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],o=mi(r,i,s,a);return o.attr("style",e.style),Qe(e,o),e.intersect=function(l){return Ge.polygon(e,a,l)},r},IB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],o=mi(r,i,s,a);return o.attr("style",e.style),Qe(e,o),e.intersect=function(l){return Ge.polygon(e,a,l)},r},OB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],o=mi(r,i,s,a);return o.attr("style",e.style),Qe(e,o),e.intersect=function(l){return Ge.polygon(e,a,l)},r},RB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=mi(r,i,s,a);return o.attr("style",e.style),Qe(e,o),e.intersect=function(l){return Ge.polygon(e,a,l)},r},FB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],o=mi(r,i,s,a);return o.attr("style",e.style),Qe(e,o),e.intersect=function(l){return Ge.polygon(e,a,l)},r},PB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=i/2,a=s/(2.5+i/50),o=n.height+a+e.padding,l="M 0,"+a+" a "+s+","+a+" 0,0,0 "+i+" 0 a "+s+","+a+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+s+","+a+" 0,0,0 "+i+" 0 l 0,"+-o,u=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+a)+")");return Qe(e,u),e.intersect=function(d){const f=Ge.rect(e,d),p=f.x-e.x;if(s!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-a)){let g=a*a*(1-p*p/(s*s));g!=0&&(g=Math.sqrt(g)),g=a-g,d.y-e.y>0&&(g=-g),f.y+=g}return f},r},YB=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Er(t,e,"node "+e.classes,!0);B.trace("Classes = ",e.classes);const s=r.insert("rect",":first-child"),a=n.width+e.padding,o=n.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",a).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(Nm(s,e.props.borders,a,o),l.delete("borders")),l.forEach(u=>{B.warn(`Unknown node property ${u}`)})}return Qe(e,s),e.intersect=function(l){return Ge.rect(e,l)},r},VB=(t,e)=>{const{shapeSvg:r}=Er(t,e,"label",!0);B.trace("Classes = ",e.classes);const n=r.insert("rect",":first-child"),i=0,s=0;if(n.attr("width",i).attr("height",s),r.attr("class","label edgeLabel"),e.props){const a=new Set(Object.keys(e.props));e.props.borders&&(Nm(n,e.props.borders,i,s),a.delete("borders")),a.forEach(o=>{B.warn(`Unknown node property ${o}`)})}return Qe(e,n),e.intersect=function(a){return Ge.rect(e,a)},r};function Nm(t,e,r,n){const i=[],s=o=>{i.push(o,0)},a=o=>{i.push(0,o)};e.includes("t")?(B.debug("add top border"),s(r)):a(r),e.includes("r")?(B.debug("add right border"),s(n)):a(n),e.includes("b")?(B.debug("add bottom border"),s(r)):a(r),e.includes("l")?(B.debug("add left border"),s(n)):a(n),t.attr("stroke-dasharray",i.join(" "))}const UB=(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),s=n.insert("line"),a=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,B.info("Label text abc79",l,o,typeof o=="object");const u=a.node().appendChild(Vr(l,e.labelStyle,!0,!0));let d={width:0,height:0};if(pr($().flowchart.htmlLabels)){const k=u.children[0],T=St(u);d=k.getBoundingClientRect(),T.attr("width",d.width),T.attr("height",d.height)}B.info("Text 2",o);const f=o.slice(1,o.length);let p=u.getBBox();const g=a.node().appendChild(Vr(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(pr($().flowchart.htmlLabels)){const k=g.children[0],T=St(g);d=k.getBoundingClientRect(),T.attr("width",d.width),T.attr("height",d.height)}const b=e.padding/2;return St(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+b+5)+")"),St(u).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", "+0+")"),d=a.node().getBBox(),a.attr("transform","translate("+-d.width/2+", "+(-d.height/2-b+3)+")"),i.attr("class","outer title-state").attr("x",-d.width/2-b).attr("y",-d.height/2-b).attr("width",d.width+e.padding).attr("height",d.height+e.padding),s.attr("class","divider").attr("x1",-d.width/2-b).attr("x2",d.width/2+b).attr("y1",-d.height/2-b+p.height+b).attr("y2",-d.height/2-b+p.height+b),Qe(e,i),e.intersect=function(k){return Ge.rect(e,k)},n},zB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.height+e.padding,s=n.width+i/4+e.padding,a=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return Qe(e,a),e.intersect=function(o){return Ge.rect(e,o)},r},WB=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Er(t,e,void 0,!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),B.info("Circle main"),Qe(e,s),e.intersect=function(a){return B.info("Circle intersect",e,n.width/2+i,a),Ge.circle(e,n.width/2+i,a)},r},HB=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Er(t,e,void 0,!0),s=5,a=r.insert("g",":first-child"),o=a.insert("circle"),l=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+s).attr("width",n.width+e.padding+s*2).attr("height",n.height+e.padding+s*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),B.info("DoubleCircle main"),Qe(e,o),e.intersect=function(u){return B.info("DoubleCircle intersect",e,n.width/2+i+s,u),Ge.circle(e,n.width/2+i+s,u)},r},GB=(t,e)=>{const{shapeSvg:r,bbox:n}=Er(t,e,void 0,!0),i=n.width+e.padding,s=n.height+e.padding,a=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=mi(r,i,s,a);return o.attr("style",e.style),Qe(e,o),e.intersect=function(l){return Ge.polygon(e,a,l)},r},qB=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Qe(e,n),e.intersect=function(i){return Ge.circle(e,7,i)},r},Bm=(t,e,r)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,s=10;r==="LR"&&(i=10,s=70);const a=n.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return Qe(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return Ge.rect(e,o)},n},Im={question:LB,rect:YB,labelRect:VB,rectWithTitle:UB,choice:DB,circle:WB,doublecircle:HB,stadium:zB,hexagon:MB,rect_left_inv_arrow:NB,lean_right:BB,lean_left:IB,trapezoid:OB,inv_trapezoid:RB,rect_right_inv_arrow:FB,cylinder:PB,start:qB,end:(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Qe(e,i),e.intersect=function(s){return Ge.circle(e,7,s)},r},note:AB,subroutine:GB,fork:Bm,join:Bm,class_box:(t,e)=>{const r=e.padding/2,n=4,i=8;let s;e.classes?s="node "+e.classes:s="node default";const a=t.insert("g").attr("class",s).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),l=a.insert("line"),u=a.insert("line");let d=0,f=n;const p=a.insert("g").attr("class","label");let g=0;const b=e.classData.annotations&&e.classData.annotations[0],k=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",T=p.node().appendChild(Vr(k,e.labelStyle,!0,!0));let L=T.getBBox();if(pr($().flowchart.htmlLabels)){const W=T.children[0],N=St(T);L=W.getBoundingClientRect(),N.attr("width",L.width),N.attr("height",L.height)}e.classData.annotations[0]&&(f+=L.height+n,d+=L.width);let E=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&($().flowchart.htmlLabels?E+="&lt;"+e.classData.type+"&gt;":E+="<"+e.classData.type+">");const I=p.node().appendChild(Vr(E,e.labelStyle,!0,!0));St(I).attr("class","classTitle");let V=I.getBBox();if(pr($().flowchart.htmlLabels)){const W=I.children[0],N=St(I);V=W.getBoundingClientRect(),N.attr("width",V.width),N.attr("height",V.height)}f+=V.height+n,V.width>d&&(d=V.width);const H=[];e.classData.members.forEach(W=>{const N=cu(W);let D=N.displayText;$().flowchart.htmlLabels&&(D=D.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const w=p.node().appendChild(Vr(D,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=w.getBBox();if(pr($().flowchart.htmlLabels)){const M=w.children[0],m=St(w);v=M.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+n,H.push(w)}),f+=i;const G=[];if(e.classData.methods.forEach(W=>{const N=cu(W);let D=N.displayText;$().flowchart.htmlLabels&&(D=D.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const w=p.node().appendChild(Vr(D,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=w.getBBox();if(pr($().flowchart.htmlLabels)){const M=w.children[0],m=St(w);v=M.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+n,G.push(w)}),f+=i,b){let W=(d-L.width)/2;St(T).attr("transform","translate( "+(-1*d/2+W)+", "+-1*f/2+")"),g=L.height+n}let Y=(d-V.width)/2;return St(I).attr("transform","translate( "+(-1*d/2+Y)+", "+(-1*f/2+g)+")"),g+=V.height+n,l.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+i+g).attr("y2",-f/2-r+i+g),g+=i,H.forEach(W=>{St(W).attr("transform","translate( "+-d/2+", "+(-1*f/2+g+i/2)+")"),g+=V.height+n}),g+=i,u.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+i+g).attr("y2",-f/2-r+i+g),g+=i,G.forEach(W=>{St(W).attr("transform","translate( "+-d/2+", "+(-1*f/2+g)+")"),g+=V.height+n}),o.attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(f/2)-r).attr("width",d+e.padding).attr("height",f+e.padding),Qe(e,o),e.intersect=function(W){return Ge.rect(e,W)},a}};let Ca={};const jB=(t,e,r)=>{let n,i;if(e.link){let s;$().securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=Im[e.shape](n,e,r)}else i=Im[e.shape](t,e,r),n=i;e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),Ca[e.id]=n,e.haveCallback&&Ca[e.id].attr("class",Ca[e.id].attr("class")+" clickable")},$B=(t,e)=>{Ca[e.id]=t},XB=()=>{Ca={}},Om=t=>{const e=Ca[t.id];B.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},KB={rect:(t,e)=>{B.trace("Creating subgraph rect for ",e.id,e);const r=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),n=r.insert("rect",":first-child"),i=r.insert("g").attr("class","cluster-label"),s=i.node().appendChild(Vr(e.labelText,e.labelStyle,void 0,!0));let a=s.getBBox();if(pr($().flowchart.htmlLabels)){const f=s.children[0],p=St(s);a=f.getBoundingClientRect(),p.attr("width",a.width),p.attr("height",a.height)}const o=0*e.padding,l=o/2,u=e.width<=a.width+o?a.width+o:e.width;e.width<=a.width+o?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,B.trace("Data ",e,JSON.stringify(e)),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-u/2).attr("y",e.y-e.height/2-l).attr("width",u).attr("height",e.height+o),i.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const d=n.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(f){return Yo(e,f)},r},roundedWithTitle:(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),n=r.insert("rect",":first-child"),i=r.insert("g").attr("class","cluster-label"),s=r.append("rect"),a=i.node().appendChild(Vr(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(pr($().flowchart.htmlLabels)){const p=a.children[0],g=St(a);o=p.getBoundingClientRect(),g.attr("width",o.width),g.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,u=l/2,d=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,n.attr("class","outer").attr("x",e.x-d/2-u).attr("y",e.y-e.height/2-u).attr("width",d+l).attr("height",e.height+l),s.attr("class","inner").attr("x",e.x-d/2-u).attr("y",e.y-e.height/2-u+o.height-1).attr("width",d+l).attr("height",e.height+l-o.height-3),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(pr($().flowchart.htmlLabels)?5:3))+")");const f=n.node().getBBox();return e.height=f.height,e.intersect=function(p){return Yo(e,p)},r},noteGroup:(t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,s=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const a=n.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return Yo(e,o)},r},divider:(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,s=i/2;n.attr("class","divider").attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);const a=n.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(o){return Yo(e,o)},r}};let Rm={};const ZB=(t,e)=>{B.trace("Inserting cluster");const r=e.shape||"rect";Rm[e.id]=KB[r](t,e)},QB=()=>{Rm={}};let pu={},br={};const JB=()=>{pu={},br={}},tI=(t,e)=>{const r=Vr(e.label,e.labelStyle),n=t.insert("g").attr("class","edgeLabel"),i=n.insert("g").attr("class","label");i.node().appendChild(r);let s=r.getBBox();if(pr($().flowchart.htmlLabels)){const o=r.children[0],l=St(r);s=o.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)}i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),pu[e.id]=n,e.width=s.width,e.height=s.height;let a;if(e.startLabelLeft){const o=Vr(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),br[e.id]||(br[e.id]={}),br[e.id].startLeft=l,gu(a,e.startLabelLeft)}if(e.startLabelRight){const o=Vr(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=l.node().appendChild(o),u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),br[e.id]||(br[e.id]={}),br[e.id].startRight=l,gu(a,e.startLabelRight)}if(e.endLabelLeft){const o=Vr(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),br[e.id]||(br[e.id]={}),br[e.id].endLeft=l,gu(a,e.endLabelLeft)}if(e.endLabelRight){const o=Vr(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),br[e.id]||(br[e.id]={}),br[e.id].endRight=l,gu(a,e.endLabelRight)}};function gu(t,e){$().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const eI=(t,e)=>{B.info("Moving label abc78 ",t.id,t.label,pu[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const n=pu[t.id];let i=t.x,s=t.y;if(r){const a=ge.calcLabelPosition(r);B.info("Moving label "+t.label+" from (",i,",",s,") to (",a.x,",",a.y,") abc78"),e.updatedPath&&(i=a.x,s=a.y)}n.attr("transform","translate("+i+", "+s+")")}if(t.startLabelLeft){const n=br[t.id].startLeft;let i=t.x,s=t.y;if(r){const a=ge.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=a.x,s=a.y}n.attr("transform","translate("+i+", "+s+")")}if(t.startLabelRight){const n=br[t.id].startRight;let i=t.x,s=t.y;if(r){const a=ge.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=a.x,s=a.y}n.attr("transform","translate("+i+", "+s+")")}if(t.endLabelLeft){const n=br[t.id].endLeft;let i=t.x,s=t.y;if(r){const a=ge.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=a.x,s=a.y}n.attr("transform","translate("+i+", "+s+")")}if(t.endLabelRight){const n=br[t.id].endRight;let i=t.x,s=t.y;if(r){const a=ge.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=a.x,s=a.y}n.attr("transform","translate("+i+", "+s+")")}},rI=(t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-n),a=t.width/2,o=t.height/2;return i>=a||s>=o},nI=(t,e,r)=>{B.warn(`intersection calc abc89:
outsidePoint: ${JSON.stringify(e)}
insidePoint : ${JSON.stringify(r)}
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,s=Math.abs(n-r.x),a=t.width/2;let o=r.x<e.x?a-s:a+s;const l=t.height/2,u=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*a>Math.abs(n-e.x)*l){let f=r.y<e.y?e.y-l-i:i-l-e.y;o=d*f/u;const p={x:r.x<e.x?r.x+o:r.x-d+o,y:r.y<e.y?r.y+u-f:r.y-u+f};return o===0&&(p.x=e.x,p.y=e.y),d===0&&(p.x=e.x),u===0&&(p.y=e.y),B.warn(`abc89 topp/bott calc, Q ${u}, q ${f}, R ${d}, r ${o}`,p),p}else{r.x<e.x?o=e.x-a-n:o=n-a-e.x;let f=u*o/d,p=r.x<e.x?r.x+d-o:r.x-d+o,g=r.y<e.y?r.y+f:r.y-f;return B.warn(`sides calc abc89, Q ${u}, q ${f}, R ${d}, r ${o}`,{_x:p,_y:g}),o===0&&(p=e.x,g=e.y),d===0&&(p=e.x),u===0&&(g=e.y),{x:p,y:g}}},Fm=(t,e)=>{B.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(s=>{if(B.info("abc88 checking point",s,e),!rI(e,s)&&!i){const a=nI(e,n,s);B.warn("abc88 inside",s,n,a),B.warn("abc88 intersection",a);let o=!1;r.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?B.warn("abc88 no intersect",a,r):r.push(a),i=!0}else B.warn("abc88 outside",s,n),n=s,i||r.push(s)}),B.warn("abc88 returning points",r),r},iI=function(t,e,r,n,i,s){let a=r.points,o=!1;const l=s.node(e.v);var u=s.node(e.w);B.info("abc88 InsertEdge: ",r),u.intersect&&l.intersect&&(a=a.slice(1,r.points.length-1),a.unshift(l.intersect(a[0])),B.info("Last point",a[a.length-1],u,u.intersect(a[a.length-1])),a.push(u.intersect(a[a.length-1]))),r.toCluster&&(B.info("to cluster abc88",n[r.toCluster]),a=Fm(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(B.info("from cluster abc88",n[r.fromCluster]),a=Fm(a.reverse(),n[r.fromCluster].node).reverse(),o=!0);const d=a.filter(L=>!Number.isNaN(L.y));let f;i==="graph"||i==="flowchart"?f=r.curve||ta:f=ta;const p=Js().x(function(L){return L.x}).y(function(L){return L.y}).curve(f);let g;switch(r.thickness){case"normal":g="edge-thickness-normal";break;case"thick":g="edge-thickness-thick";break;default:g=""}switch(r.pattern){case"solid":g+=" edge-pattern-solid";break;case"dotted":g+=" edge-pattern-dotted";break;case"dashed":g+=" edge-pattern-dashed";break}const b=t.append("path").attr("d",p(d)).attr("id",r.id).attr("class"," "+g+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";switch(($().flowchart.arrowMarkerAbsolute||$().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),B.info("arrowTypeStart",r.arrowTypeStart),B.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":b.attr("marker-start","url("+k+"#"+i+"-crossStart)");break;case"arrow_point":b.attr("marker-start","url("+k+"#"+i+"-pointStart)");break;case"arrow_barb":b.attr("marker-start","url("+k+"#"+i+"-barbStart)");break;case"arrow_circle":b.attr("marker-start","url("+k+"#"+i+"-circleStart)");break;case"aggregation":b.attr("marker-start","url("+k+"#"+i+"-aggregationStart)");break;case"extension":b.attr("marker-start","url("+k+"#"+i+"-extensionStart)");break;case"composition":b.attr("marker-start","url("+k+"#"+i+"-compositionStart)");break;case"dependency":b.attr("marker-start","url("+k+"#"+i+"-dependencyStart)");break;case"lollipop":b.attr("marker-start","url("+k+"#"+i+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":b.attr("marker-end","url("+k+"#"+i+"-crossEnd)");break;case"arrow_point":b.attr("marker-end","url("+k+"#"+i+"-pointEnd)");break;case"arrow_barb":b.attr("marker-end","url("+k+"#"+i+"-barbEnd)");break;case"arrow_circle":b.attr("marker-end","url("+k+"#"+i+"-circleEnd)");break;case"aggregation":b.attr("marker-end","url("+k+"#"+i+"-aggregationEnd)");break;case"extension":b.attr("marker-end","url("+k+"#"+i+"-extensionEnd)");break;case"composition":b.attr("marker-end","url("+k+"#"+i+"-compositionEnd)");break;case"dependency":b.attr("marker-end","url("+k+"#"+i+"-dependencyEnd)");break;case"lollipop":b.attr("marker-end","url("+k+"#"+i+"-lollipopEnd)");break}let T={};return o&&(T.updatedPath=a),T.originalPath=r.points,T},Pm=(t,e,r,n)=>{B.info("Graph in recursive render: XXX",yi(e),n);const i=e.graph().rankdir;B.trace("Dir in recursive render - dir:",i);const s=t.insert("g").attr("class","root");e.nodes()?B.info("Recursive render XXX",e.nodes()):B.info("No nodes found for",e),e.edges().length>0&&B.trace("Recursive edges",e.edge(e.edges()[0]));const a=s.insert("g").attr("class","clusters"),o=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),u=s.insert("g").attr("class","nodes");e.nodes().forEach(function(f){const p=e.node(f);if(n!==void 0){const g=JSON.parse(JSON.stringify(n.clusterData));B.info("Setting data for cluster XXX (",f,") ",g,n),e.setNode(n.id,g),e.parent(f)||(B.trace("Setting parent",f,n.id),e.setParent(f,n.id,g))}if(B.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),p&&p.clusterNode){B.info("Cluster identified",f,p.width,e.node(f));const g=Pm(u,p.graph,r,e.node(f)),b=g.elem;Qe(p,b),p.diff=g.diff||0,B.info("Node bounds (abc123)",f,p,p.width,p.x,p.y),$B(b,p),B.warn("Recursive render complete ",b,p)}else e.children(f).length>0?(B.info("Cluster - the non recursive path XXX",f,p.id,p,e),B.info(Po(p.id,e)),Te[p.id]={id:Po(p.id,e),node:p}):(B.info("Node - the non recursive path",f,p.id,p),jB(u,e.node(f),i))}),e.edges().forEach(function(f){const p=e.edge(f.v,f.w,f.name);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),B.info("Edge "+f.v+" -> "+f.w+": ",f," ",JSON.stringify(e.edge(f))),B.info("Fix",Te,"ids:",f.v,f.w,"Translateing: ",Te[f.v],Te[f.w]),tI(l,p)}),e.edges().forEach(function(f){B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f))}),B.info("#############################################"),B.info("### Layout ###"),B.info("#############################################"),B.info(e),Ea(e),B.info("Graph after layout:",yi(e));let d=0;return wB(e).forEach(function(f){const p=e.node(f);B.info("Position "+f+": "+JSON.stringify(e.node(f))),B.info("Position "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p&&p.clusterNode?Om(p):e.children(f).length>0?(ZB(a,p),Te[p.id].node=p):Om(p)}),e.edges().forEach(function(f){const p=e.edge(f);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(p),p);const g=iI(o,f,p,Te,r,e);eI(p,g)}),e.nodes().forEach(function(f){const p=e.node(f);B.info(f,p.type,p.diff),p.type==="group"&&(d=p.diff)}),{elem:s,diff:d}},v0=(t,e,r,n,i)=>{mB(t,r,n,i),XB(),JB(),QB(),xB(),B.warn("Graph at first:",yi(e)),kB(e),B.warn("Graph after:",yi(e)),Pm(t,e,n)},Ym=t=>he.sanitizeText(t,$());let Vm={dividerMargin:10,padding:5,textHeight:10};const sI=function(t,e,r,n){const i=Object.keys(t);B.info("keys:",i),B.info(t),i.forEach(function(s){const a=t[s];let o="";a.cssClasses.length>0&&(o=o+" "+a.cssClasses.join(" "));const l={labelStyle:""};let u=a.text!==void 0?a.text:a.id,d=0,f="";switch(a.type){case"class":f="class_box";break;default:f="class_box"}e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:Ym(u),classData:a,rx:d,ry:d,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:$().flowchart.padding}),B.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:u,rx:d,ry:d,class:o,style:l.style,id:a.id,width:a.type==="group"?500:void 0,type:a.type,padding:$().flowchart.padding})})},aI=function(t,e,r,n){B.info(t),t.forEach(function(i,s){const a=i;let o="";const l={labelStyle:"",style:""};let u=a.text,d=0,f="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:Ym(u),noteData:a,rx:d,ry:d,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:$().flowchart.padding}),B.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:u,rx:d,ry:d,style:l.style,id:a.id,type:"note",padding:$().flowchart.padding}),!a.class||!(a.class in n))return;const p=r+s,g={};g.classes="relation",g.pattern="dotted",g.id=`edgeNote${p}`,g.arrowhead="none",B.info(`Note edge: ${JSON.stringify(g)}, ${JSON.stringify(a)}`),g.startLabelRight="",g.endLabelLeft="",g.arrowTypeStart="none",g.arrowTypeEnd="none";let b="fill:none",k="";g.style=b,g.labelStyle=k,g.curve=bn(Vm.curve,Hr),e.setEdge(a.id,a.class,g,p)})},oI=function(t,e){const r=$().flowchart;let n=0;t.forEach(function(i){n++;const s={};s.classes="relation",s.pattern=i.relation.lineType==1?"dashed":"solid",s.id="id"+n,i.type==="arrow_open"?s.arrowhead="none":s.arrowhead="normal",B.info(s,i),s.startLabelRight=i.relationTitle1==="none"?"":i.relationTitle1,s.endLabelLeft=i.relationTitle2==="none"?"":i.relationTitle2,s.arrowTypeStart=Um(i.relation.type1),s.arrowTypeEnd=Um(i.relation.type2);let a="",o="";if(i.style!==void 0){const l=Vi(i.style);a=l.style,o=l.labelStyle}else a="fill:none";s.style=a,s.labelStyle=o,i.interpolate!==void 0?s.curve=bn(i.interpolate,Hr):t.defaultInterpolate!==void 0?s.curve=bn(t.defaultInterpolate,Hr):s.curve=bn(r.curve,Hr),i.text=i.title,i.text===void 0?i.style!==void 0&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",$().flowchart.htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+i.text+"</span>"):(s.labelType="text",s.label=i.text.replace(he.lineBreakRegex,`
`),i.style===void 0&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(i.id1,i.id2,s,n)})},lI=function(t){Object.keys(t).forEach(function(r){Vm[r]=t[r]})},cI=function(t,e,r,n){B.info("Drawing class - ",e);const i=$().flowchart,s=$().securityLevel;B.info("config:",i);const a=i.nodeSpacing||50,o=i.rankSpacing||50,l=new sr({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),u=n.db.getClasses(),d=n.db.getRelations(),f=n.db.getNotes();B.info(d),sI(u,l,e,n),oI(d,l),aI(f,l,d.length+1,u);let p;s==="sandbox"&&(p=St("#i"+e));const g=St(s==="sandbox"?p.nodes()[0].contentDocument.body:"body"),b=g.select(`[id="${e}"]`),k=g.select("#"+e+" g");if(v0(k,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),ge.insertTitle(b,"classTitleText",i.titleTopMargin,n.db.getDiagramTitle()),Sc(l,b,i.diagramPadding,i.useMaxWidth),!i.htmlLabels){const T=s==="sandbox"?p.nodes()[0].contentDocument:document,L=T.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const E of L){const I=E.getBBox(),V=T.createElementNS("http://www.w3.org/2000/svg","rect");V.setAttribute("rx",0),V.setAttribute("ry",0),V.setAttribute("width",I.width),V.setAttribute("height",I.height),E.insertBefore(V,E.firstChild)}}};function Um(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const uI={setConf:lI,draw:cI};var k0=function(){var t=function(N,D,w,v){for(w=w||{},v=N.length;v--;w[N[v]]=D);return w},e=[1,2],r=[1,5],n=[6,9,11,23,25,27,29,30,31,49],i=[1,17],s=[1,18],a=[1,19],o=[1,20],l=[1,21],u=[1,22],d=[1,25],f=[1,30],p=[1,31],g=[1,32],b=[1,33],k=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],T=[1,45],L=[30,31,46,47],E=[4,6,9,11,23,25,27,29,30,31,49],I=[42,43,44,45],V=[22,37],H=[1,64],G={trace:function(){},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(D,w,v,M,m,Q,x){var ct=Q.length-1;switch(m){case 1:break;case 3:this.$=[];break;case 4:Q[ct-1].push(Q[ct]),this.$=Q[ct-1];break;case 5:case 6:this.$=Q[ct];break;case 7:case 8:this.$=[];break;case 12:M.addEntity(Q[ct-4]),M.addEntity(Q[ct-2]),M.addRelationship(Q[ct-4],Q[ct],Q[ct-2],Q[ct-3]);break;case 13:M.addEntity(Q[ct-3]),M.addAttributes(Q[ct-3],Q[ct-1]);break;case 14:M.addEntity(Q[ct-2]);break;case 15:M.addEntity(Q[ct]);break;case 16:case 17:this.$=Q[ct].trim(),M.setAccTitle(this.$);break;case 18:case 19:this.$=Q[ct].trim(),M.setAccDescription(this.$);break;case 20:case 41:this.$=Q[ct];break;case 21:case 39:case 40:this.$=Q[ct].replace(/"/g,"");break;case 22:this.$=[Q[ct]];break;case 23:Q[ct].push(Q[ct-1]),this.$=Q[ct];break;case 24:this.$={attributeType:Q[ct-1],attributeName:Q[ct]};break;case 25:this.$={attributeType:Q[ct-2],attributeName:Q[ct-1],attributeKeyType:Q[ct]};break;case 26:this.$={attributeType:Q[ct-2],attributeName:Q[ct-1],attributeComment:Q[ct]};break;case 27:this.$={attributeType:Q[ct-3],attributeName:Q[ct-2],attributeKeyType:Q[ct-1],attributeComment:Q[ct]};break;case 28:case 29:case 30:this.$=Q[ct];break;case 31:this.$=Q[ct].replace(/"/g,"");break;case 32:this.$={cardA:Q[ct],relType:Q[ct-1],cardB:Q[ct-2]};break;case 33:this.$=M.Cardinality.ZERO_OR_ONE;break;case 34:this.$=M.Cardinality.ZERO_OR_MORE;break;case 35:this.$=M.Cardinality.ONE_OR_MORE;break;case 36:this.$=M.Cardinality.ONLY_ONE;break;case 37:this.$=M.Identification.NON_IDENTIFYING;break;case 38:this.$=M.Identification.IDENTIFYING;break;case 42:M.parseDirective("%%{","open_directive");break;case 43:M.parseDirective(Q[ct],"type_directive");break;case 44:Q[ct]=Q[ct].trim().replace(/'/g,'"'),M.parseDirective(Q[ct],"arg_directive");break;case 45:M.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,49:r},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,49:r},{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:i,25:s,27:a,29:o,30:l,31:u,49:r},{1:[2,2]},{14:23,15:[1,24],52:d},t([15,52],[2,43]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:15,10:26,12:4,17:16,23:i,25:s,27:a,29:o,30:l,31:u,49:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),t(n,[2,15],{18:27,40:29,20:[1,28],42:f,43:p,44:g,45:b}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(n,[2,19]),t(k,[2,20]),t(k,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},t(n,[2,5]),{17:40,30:l,31:u},{21:41,22:[1,42],32:43,33:44,37:T},{41:46,46:[1,47],47:[1,48]},t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(E,[2,9]),{14:49,52:d},{52:[2,44]},{15:[1,50]},{22:[1,51]},t(n,[2,14]),{21:52,22:[2,22],32:43,33:44,37:T},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:f,43:p,44:g,45:b},t(I,[2,37]),t(I,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},t(n,[2,13]),{22:[2,23]},t(V,[2,24],{35:61,36:62,38:[1,63],39:H}),t([22,37,38,39],[2,29]),t([30,31],[2,32]),t(E,[2,10]),t(n,[2,12]),t(n,[2,39]),t(n,[2,40]),t(n,[2,41]),t(V,[2,25],{36:65,39:H}),t(V,[2,26]),t([22,37,39],[2,30]),t(V,[2,31]),t(V,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function(D,w){if(w.recoverable)this.trace(D);else{var v=new Error(D);throw v.hash=w,v}},parse:function(D){var w=this,v=[0],M=[],m=[null],Q=[],x=this.table,ct="",Dt=0,kt=0,j=2,ot=1,rt=Q.slice.call(arguments,1),nt=Object.create(this.lexer),ut={yy:{}};for(var _t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_t)&&(ut.yy[_t]=this.yy[_t]);nt.setInput(D,ut.yy),ut.yy.lexer=nt,ut.yy.parser=this,typeof nt.yylloc>"u"&&(nt.yylloc={});var K=nt.yylloc;Q.push(K);var Ot=nt.options&&nt.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function P(){var et;return et=M.pop()||nt.lex()||ot,typeof et!="number"&&(et instanceof Array&&(M=et,et=M.pop()),et=w.symbols_[et]||et),et}for(var z,X,F,O,A={},J,C,ht,U;;){if(X=v[v.length-1],this.defaultActions[X]?F=this.defaultActions[X]:((z===null||typeof z>"u")&&(z=P()),F=x[X]&&x[X][z]),typeof F>"u"||!F.length||!F[0]){var Yt="";U=[];for(J in x[X])this.terminals_[J]&&J>j&&U.push("'"+this.terminals_[J]+"'");nt.showPosition?Yt="Parse error on line "+(Dt+1)+`:
`+nt.showPosition()+`
Expecting `+U.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Yt="Parse error on line "+(Dt+1)+": Unexpected "+(z==ot?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(Yt,{text:nt.match,token:this.terminals_[z]||z,line:nt.yylineno,loc:K,expected:U})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+z);switch(F[0]){case 1:v.push(z),m.push(nt.yytext),Q.push(nt.yylloc),v.push(F[1]),z=null,kt=nt.yyleng,ct=nt.yytext,Dt=nt.yylineno,K=nt.yylloc;break;case 2:if(C=this.productions_[F[1]][1],A.$=m[m.length-C],A._$={first_line:Q[Q.length-(C||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(C||1)].first_column,last_column:Q[Q.length-1].last_column},Ot&&(A._$.range=[Q[Q.length-(C||1)].range[0],Q[Q.length-1].range[1]]),O=this.performAction.apply(A,[ct,kt,Dt,ut.yy,F[1],m,Q].concat(rt)),typeof O<"u")return O;C&&(v=v.slice(0,-1*C*2),m=m.slice(0,-1*C),Q=Q.slice(0,-1*C)),v.push(this.productions_[F[1]][0]),m.push(A.$),Q.push(A._$),ht=x[v[v.length-2]][v[v.length-1]],v.push(ht);break;case 3:return!0}}return!0}},Y=function(){var N={EOF:1,parseError:function(w,v){if(this.yy.parser)this.yy.parser.parseError(w,v);else throw new Error(w)},setInput:function(D,w){return this.yy=w||this.yy||{},this._input=D,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var D=this._input[0];this.yytext+=D,this.yyleng++,this.offset++,this.match+=D,this.matched+=D;var w=D.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),D},unput:function(D){var w=D.length,v=D.split(/(?:\r\n?|\n)/g);this._input=D+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;var M=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===M.length?this.yylloc.first_column:0)+M[M.length-v.length].length-v[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-w]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(D){this.unput(this.match.slice(D))},pastInput:function(){var D=this.matched.substr(0,this.matched.length-this.match.length);return(D.length>20?"...":"")+D.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var D=this.match;return D.length<20&&(D+=this._input.substr(0,20-D.length)),(D.substr(0,20)+(D.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var D=this.pastInput(),w=new Array(D.length+1).join("-");return D+this.upcomingInput()+`
`+w+"^"},test_match:function(D,w){var v,M,m;if(this.options.backtrack_lexer&&(m={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&&(m.yylloc.range=this.yylloc.range.slice(0))),M=D[0].match(/(?:\r\n?|\n).*/g),M&&(this.yylineno+=M.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:M?M[M.length-1].length-M[M.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+D[0].length},this.yytext+=D[0],this.match+=D[0],this.matches=D,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(D[0].length),this.matched+=D[0],v=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var Q in m)this[Q]=m[Q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var D,w,v,M;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),Q=0;Q<m.length;Q++)if(v=this._input.match(this.rules[m[Q]]),v&&(!w||v[0].length>w[0].length)){if(w=v,M=Q,this.options.backtrack_lexer){if(D=this.test_match(v,m[Q]),D!==!1)return D;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(D=this.test_match(w,m[M]),D!==!1?D:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var w=this.next();return w||this.lex()},begin:function(w){this.conditionStack.push(w)},popState:function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},pushState:function(w){this.begin(w)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(w,v,M,m){switch(M){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:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 21:break;case 22:return 38;case 23:return 37;case 24:return 37;case 25:return 39;case 26:break;case 27:return this.popState(),22;case 28:return v.yytext[0];case 29:return 42;case 30:return 44;case 31:return 44;case 32:return 44;case 33:return 42;case 34:return 42;case 35:return 43;case 36:return 43;case 37:return 43;case 38:return 43;case 39:return 43;case 40:return 44;case 41:return 43;case 42:return 44;case 43:return 45;case 44:return 45;case 45:return 45;case 46:return 45;case 47:return 42;case 48:return 43;case 49:return 44;case 50:return 46;case 51:return 47;case 52:return 47;case 53:return 46;case 54:return 46;case 55:return 46;case 56:return 30;case 57:return v.yytext[0];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}}};return N}();G.lexer=Y;function W(){this.yy={}}return W.prototype=G,G.Parser=W,new W}();k0.parser=k0;const hI=k0,dI=t=>t.match(/^\s*erDiagram/)!==null;let Vo={},w0=[];const fI={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},pI={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},gI=function(t,e,r){ze.parseDirective(this,t,e,r)},zm=function(t){return Vo[t]===void 0&&(Vo[t]={attributes:[]},B.info("Added new entity :",t)),Vo[t]},yI={Cardinality:fI,Identification:pI,parseDirective:gI,getConfig:()=>$().er,addEntity:zm,addAttributes:function(t,e){let r=zm(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),B.debug("Added attribute ",e[n].attributeName)},getEntities:()=>Vo,addRelationship:function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};w0.push(i),B.debug("Added new relationship :",i)},getRelationships:()=>w0,clear:function(){Vo={},w0=[],vn()},setAccTitle:nn,getAccTitle:kn,setAccDescription:wn,getAccDescription:Tn,setDiagramTitle:hi,getDiagramTitle:di},bi={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"},_i={ERMarkers:bi,insertMarkers:function(t,e){let r;t.append("defs").append("marker").attr("id",bi.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",bi.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",bi.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",bi.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",bi.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",bi.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",bi.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",bi.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}};let yu;const mI=new Uint8Array(16);function bI(){if(!yu&&(yu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yu(mI)}const _r=[];for(let t=0;t<256;++t)_r.push((t+256).toString(16).slice(1));function _I(t,e=0){return(_r[t[e+0]]+_r[t[e+1]]+_r[t[e+2]]+_r[t[e+3]]+"-"+_r[t[e+4]]+_r[t[e+5]]+"-"+_r[t[e+6]]+_r[t[e+7]]+"-"+_r[t[e+8]]+_r[t[e+9]]+"-"+_r[t[e+10]]+_r[t[e+11]]+_r[t[e+12]]+_r[t[e+13]]+_r[t[e+14]]+_r[t[e+15]]).toLowerCase()}const Wm={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function xI(t,e,r){if(Wm.randomUUID&&!e&&!t)return Wm.randomUUID();t=t||{};const n=t.random||(t.rng||bI)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return _I(n)}const vI=/[^\dA-Za-z](\W)*/g;let ur={},Uo=new Map;const kI=function(t){const e=Object.keys(t);for(const r of e)ur[r]=t[r]},wI=(t,e,r)=>{const n=ur.entityPadding/3,i=ur.entityPadding/3,s=ur.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,u=!1,d=0,f=0,p=0,g=0,b=a.height+n*2,k=1;r.forEach(I=>{I.attributeKeyType!==void 0&&(l=!0),I.attributeComment!==void 0&&(u=!0)}),r.forEach(I=>{const V=`${e.node().id}-attr-${k}`;let H=0;const G=Oi(I.attributeType),Y=t.append("text").classed("er entityLabel",!0).attr("id",`${V}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(G),W=t.append("text").classed("er entityLabel",!0).attr("id",`${V}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(I.attributeName),N={};N.tn=Y,N.nn=W;const D=Y.node().getBBox(),w=W.node().getBBox();if(d=Math.max(d,D.width),f=Math.max(f,w.width),H=Math.max(D.height,w.height),l){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${V}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(I.attributeKeyType||"");N.kn=v;const M=v.node().getBBox();p=Math.max(p,M.width),H=Math.max(H,M.height)}if(u){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${V}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(I.attributeComment||"");N.cn=v;const M=v.node().getBBox();g=Math.max(g,M.width),H=Math.max(H,M.height)}N.height=H,o.push(N),b+=H+n*2,k+=1});let T=4;l&&(T+=2),u&&(T+=2);const L=d+f+p+g,E={width:Math.max(ur.minEntityWidth,Math.max(a.width+ur.entityPadding*2,L+i*T)),height:r.length>0?b:Math.max(ur.minEntityHeight,a.height+ur.entityPadding*2)};if(r.length>0){const I=Math.max(0,(E.width-L-i*T)/(T/2));e.attr("transform","translate("+E.width/2+","+(n+a.height/2)+")");let V=a.height+n*2,H="attributeBoxOdd";o.forEach(G=>{const Y=V+n+G.height/2;G.tn.attr("transform","translate("+i+","+Y+")");const W=t.insert("rect","#"+G.tn.node().id).classed(`er ${H}`,!0).attr("x",0).attr("y",V).attr("width",d+i*2+I).attr("height",G.height+n*2),N=parseFloat(W.attr("x"))+parseFloat(W.attr("width"));G.nn.attr("transform","translate("+(N+i)+","+Y+")");const D=t.insert("rect","#"+G.nn.node().id).classed(`er ${H}`,!0).attr("x",N).attr("y",V).attr("width",f+i*2+I).attr("height",G.height+n*2);let w=parseFloat(D.attr("x"))+parseFloat(D.attr("width"));if(l){G.kn.attr("transform","translate("+(w+i)+","+Y+")");const v=t.insert("rect","#"+G.kn.node().id).classed(`er ${H}`,!0).attr("x",w).attr("y",V).attr("width",p+i*2+I).attr("height",G.height+n*2);w=parseFloat(v.attr("x"))+parseFloat(v.attr("width"))}u&&(G.cn.attr("transform","translate("+(w+i)+","+Y+")"),t.insert("rect","#"+G.cn.node().id).classed(`er ${H}`,"true").attr("x",w).attr("y",V).attr("width",g+i*2+I).attr("height",G.height+n*2)),V+=G.height+n*2,H=H==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else E.height=Math.max(ur.minEntityHeight,b),e.attr("transform","translate("+E.width/2+","+E.height/2+")");return E},TI=function(t,e,r){const n=Object.keys(e);let i;return n.forEach(function(s){const a=LI(s,"entity");Uo.set(s,a);const o=t.append("g").attr("id",a);i=i===void 0?a:i;const l="text-"+a,u=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",$().fontFamily).style("font-size",ur.fontSize+"px").text(s),{width:d,height:f}=wI(o,u,e[s].attributes),g=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",d).attr("height",f).node().getBBox();r.setNode(a,{width:g.width,height:g.height,shape:"rect",id:a})}),i},EI=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},Hm=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},CI=function(t,e){return t.forEach(function(r){e.setEdge(Uo.get(r.entityA),Uo.get(r.entityB),{relationship:r},Hm(r))}),t};let Gm=0;const SI=function(t,e,r,n,i){Gm++;const s=r.edge(Uo.get(e.entityA),Uo.get(e.entityB),Hm(e)),a=Js().x(function(b){return b.x}).y(function(b){return b.y}).curve(ta),o=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",a(s.points)).style("stroke",ur.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(ur.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+_i.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+_i.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+_i.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+_i.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+_i.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+_i.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+_i.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+_i.ERMarkers.ONLY_ONE_START+")");break}const u=o.node().getTotalLength(),d=o.node().getPointAtLength(u*.5),f="rel"+Gm,g=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",d.x).attr("y",d.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",$().fontFamily).style("font-size",ur.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",d.x-g.width/2).attr("y",d.y-g.height/2).attr("width",g.width).attr("height",g.height)},AI=function(t,e,r,n){ur=$().er,B.info("Drawing ER diagram");const i=$().securityLevel;let s;i==="sandbox"&&(s=St("#i"+e));const o=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);_i.insertMarkers(o,ur);let l;l=new sr({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:ur.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const u=TI(o,n.db.getEntities(),l),d=CI(n.db.getRelationships(),l);Ea(l),EI(o,l),d.forEach(function(k){SI(o,k,l,u,n)});const f=ur.diagramPadding;ge.insertTitle(o,"entityTitleText",ur.titleTopMargin,n.db.getDiagramTitle());const p=o.node().getBBox(),g=p.width+f*2,b=p.height+f*2;xn(o,b,g,ur.useMaxWidth),o.attr("viewBox",`${p.x-f} ${p.y-f} ${g} ${b}`)};function LI(t="",e=""){const r=t.replace(vI,"");return`${qm(e)}${qm(r)}${xI()}`}function qm(t=""){return t.length>0?`${t}-`:""}const DI={setConf:kI,draw:AI};var T0=function(){var t=function(zr,qt,te,oe){for(te=te||{},oe=zr.length;oe--;te[zr[oe]]=qt);return te},e=[1,9],r=[1,7],n=[1,6],i=[1,8],s=[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],a=[2,10],o=[1,20],l=[1,21],u=[1,22],d=[1,23],f=[1,30],p=[1,32],g=[1,33],b=[1,34],k=[1,62],T=[1,48],L=[1,52],E=[1,36],I=[1,37],V=[1,38],H=[1,39],G=[1,40],Y=[1,56],W=[1,63],N=[1,51],D=[1,53],w=[1,55],v=[1,59],M=[1,60],m=[1,41],Q=[1,42],x=[1,43],ct=[1,44],Dt=[1,61],kt=[1,50],j=[1,54],ot=[1,57],rt=[1,58],nt=[1,49],ut=[1,66],_t=[1,71],K=[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],Ot=[1,75],P=[1,74],z=[1,76],X=[20,21,23,81,82],F=[1,99],O=[1,104],A=[1,107],J=[1,108],C=[1,101],ht=[1,106],U=[1,109],Yt=[1,102],et=[1,114],Mt=[1,113],Tt=[1,103],gt=[1,105],Et=[1,110],wt=[1,111],pt=[1,112],st=[1,115],le=[20,21,22,23,81,82],Xt=[20,21,22,23,53,81,82],jt=[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],Kt=[20,21,23],Gt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Ee=[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],Ht=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Vt=[1,149],Ft=[1,157],xt=[1,158],ft=[1,159],Lt=[1,160],bt=[1,144],Ut=[1,145],at=[1,141],ie=[1,152],dt=[1,153],ee=[1,154],fe=[1,155],be=[1,156],_e=[1,161],ke=[1,162],$t=[1,147],se=[1,150],ye=[1,146],Jt=[1,143],Nn=[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],Xr=[1,165],De=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],ae=[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],Be=[12,21,22,24],Re=[22,106],Pe=[1,250],Ye=[1,245],Ie=[1,246],$e=[1,254],ar=[1,251],zt=[1,248],Z=[1,247],At=[1,249],Nt=[1,252],pe=[1,253],Me=[1,255],Le=[1,273],We=[20,21,23,106],ve=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],Ne={trace:function(){},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(qt,te,oe,Rt,Ve,q,Is){var tt=q.length-1;switch(Ve){case 5:Rt.parseDirective("%%{","open_directive");break;case 6:Rt.parseDirective(q[tt],"type_directive");break;case 7:q[tt]=q[tt].trim().replace(/'/g,'"'),Rt.parseDirective(q[tt],"arg_directive");break;case 8:Rt.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(q[tt])||q[tt].length>0)&&q[tt-1].push(q[tt]),this.$=q[tt-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=q[tt];break;case 19:Rt.setDirection("TB"),this.$="TB";break;case 20:Rt.setDirection(q[tt-1]),this.$=q[tt-1];break;case 35:this.$=q[tt-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Rt.addSubGraph(q[tt-6],q[tt-1],q[tt-4]);break;case 42:this.$=Rt.addSubGraph(q[tt-3],q[tt-1],q[tt-3]);break;case 43:this.$=Rt.addSubGraph(void 0,q[tt-1],void 0);break;case 45:this.$=q[tt].trim(),Rt.setAccTitle(this.$);break;case 46:case 47:this.$=q[tt].trim(),Rt.setAccDescription(this.$);break;case 51:Rt.addLink(q[tt-2].stmt,q[tt],q[tt-1]),this.$={stmt:q[tt],nodes:q[tt].concat(q[tt-2].nodes)};break;case 52:Rt.addLink(q[tt-3].stmt,q[tt-1],q[tt-2]),this.$={stmt:q[tt-1],nodes:q[tt-1].concat(q[tt-3].nodes)};break;case 53:this.$={stmt:q[tt-1],nodes:q[tt-1]};break;case 54:this.$={stmt:q[tt],nodes:q[tt]};break;case 55:this.$=[q[tt]];break;case 56:this.$=q[tt-4].concat(q[tt]);break;case 57:this.$=[q[tt-2]],Rt.setClass(q[tt-2],q[tt]);break;case 58:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"square");break;case 59:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"doublecircle");break;case 60:this.$=q[tt-5],Rt.addVertex(q[tt-5],q[tt-2],"circle");break;case 61:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"ellipse");break;case 62:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"stadium");break;case 63:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"subroutine");break;case 64:this.$=q[tt-7],Rt.addVertex(q[tt-7],q[tt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[q[tt-5],q[tt-3]]]));break;case 65:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"cylinder");break;case 66:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"round");break;case 67:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"diamond");break;case 68:this.$=q[tt-5],Rt.addVertex(q[tt-5],q[tt-2],"hexagon");break;case 69:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"odd");break;case 70:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"trapezoid");break;case 71:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"inv_trapezoid");break;case 72:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"lean_right");break;case 73:this.$=q[tt-3],Rt.addVertex(q[tt-3],q[tt-1],"lean_left");break;case 74:this.$=q[tt],Rt.addVertex(q[tt]);break;case 75:q[tt-1].text=q[tt],this.$=q[tt-1];break;case 76:case 77:q[tt-2].text=q[tt-1],this.$=q[tt-2];break;case 78:this.$=q[tt];break;case 79:var Sr=Rt.destructLink(q[tt],q[tt-2]);this.$={type:Sr.type,stroke:Sr.stroke,length:Sr.length,text:q[tt-1]};break;case 80:var Sr=Rt.destructLink(q[tt]);this.$={type:Sr.type,stroke:Sr.stroke,length:Sr.length};break;case 81:this.$=q[tt-1];break;case 83:case 97:case 153:this.$=q[tt-1]+""+q[tt];break;case 98:case 99:this.$=q[tt-4],Rt.addClass(q[tt-2],q[tt]);break;case 100:this.$=q[tt-4],Rt.setClass(q[tt-2],q[tt]);break;case 101:case 109:this.$=q[tt-1],Rt.setClickEvent(q[tt-1],q[tt]);break;case 102:case 110:this.$=q[tt-3],Rt.setClickEvent(q[tt-3],q[tt-2]),Rt.setTooltip(q[tt-3],q[tt]);break;case 103:this.$=q[tt-2],Rt.setClickEvent(q[tt-2],q[tt-1],q[tt]);break;case 104:this.$=q[tt-4],Rt.setClickEvent(q[tt-4],q[tt-3],q[tt-2]),Rt.setTooltip(q[tt-4],q[tt]);break;case 105:case 111:this.$=q[tt-1],Rt.setLink(q[tt-1],q[tt]);break;case 106:case 112:this.$=q[tt-3],Rt.setLink(q[tt-3],q[tt-2]),Rt.setTooltip(q[tt-3],q[tt]);break;case 107:case 113:this.$=q[tt-3],Rt.setLink(q[tt-3],q[tt-2],q[tt]);break;case 108:case 114:this.$=q[tt-5],Rt.setLink(q[tt-5],q[tt-4],q[tt]),Rt.setTooltip(q[tt-5],q[tt-2]);break;case 115:this.$=q[tt-4],Rt.addVertex(q[tt-2],void 0,void 0,q[tt]);break;case 116:case 118:this.$=q[tt-4],Rt.updateLink(q[tt-2],q[tt]);break;case 117:this.$=q[tt-4],Rt.updateLink([q[tt-2]],q[tt]);break;case 119:this.$=q[tt-8],Rt.updateLinkInterpolate([q[tt-6]],q[tt-2]),Rt.updateLink([q[tt-6]],q[tt]);break;case 120:this.$=q[tt-8],Rt.updateLinkInterpolate(q[tt-6],q[tt-2]),Rt.updateLink(q[tt-6],q[tt]);break;case 121:this.$=q[tt-6],Rt.updateLinkInterpolate([q[tt-4]],q[tt]);break;case 122:this.$=q[tt-6],Rt.updateLinkInterpolate(q[tt-4],q[tt]);break;case 123:case 125:this.$=[q[tt]];break;case 124:case 126:q[tt-2].push(q[tt]),this.$=q[tt-2];break;case 128:this.$=q[tt-1]+q[tt];break;case 150:this.$=q[tt];break;case 151:this.$=q[tt-1]+""+q[tt];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"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:r,22:n,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:r,22:n,24:i},t(s,a,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:n,24:i},{16:15,21:r,22:n,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:p,46:g,48:b,50:35,51:45,52:k,54:46,66:T,67:L,86:E,87:I,88:V,89:H,90:G,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,116:47,118:m,119:Q,120:x,121:ct,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt},{8:64,10:[1,65],15:ut},t([10,15],[2,6]),t(s,[2,17]),t(s,[2,18]),t(s,[2,19]),{20:[1,68],21:[1,69],22:_t,27:67,30:70},t(K,[2,11]),t(K,[2,12]),t(K,[2,13]),t(K,[2,14]),t(K,[2,15]),t(K,[2,16]),{9:72,20:Ot,21:P,23:z,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Ot,21:P,23:z},{9:81,20:Ot,21:P,23:z},{9:82,20:Ot,21:P,23:z},{9:83,20:Ot,21:P,23:z},{9:84,20:Ot,21:P,23:z},{9:86,20:Ot,21:P,22:[1,85],23:z},t(K,[2,44]),{45:[1,87]},{47:[1,88]},t(K,[2,47]),t(X,[2,54],{30:89,22:_t}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:F,52:O,66:A,67:J,84:[1,97],91:C,97:96,98:[1,94],100:[1,95],105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(K,[2,158]),t(K,[2,159]),t(K,[2,160]),t(K,[2,161]),t(le,[2,55],{53:[1,116]}),t(Xt,[2,74],{116:129,40:[1,117],52:k,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:T,67:L,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:Y,95:W,105:N,106:D,109:w,111:v,112:M,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt}),t(jt,[2,150]),t(jt,[2,175]),t(jt,[2,176]),t(jt,[2,177]),t(jt,[2,178]),t(jt,[2,179]),t(jt,[2,180]),t(jt,[2,181]),t(jt,[2,182]),t(jt,[2,183]),t(jt,[2,184]),t(jt,[2,185]),t(jt,[2,186]),t(jt,[2,187]),t(jt,[2,188]),t(jt,[2,189]),t(jt,[2,190]),{9:130,20:Ot,21:P,23:z},{11:131,14:[1,132]},t(Kt,[2,8]),t(s,[2,20]),t(s,[2,26]),t(s,[2,27]),{21:[1,133]},t(Gt,[2,34],{30:134,22:_t}),t(K,[2,35]),{50:135,51:45,52:k,54:46,66:T,67:L,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,116:47,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt},t(Ee,[2,48]),t(Ee,[2,49]),t(Ee,[2,50]),t(Ht,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Vt,24:Ft,26:xt,38:ft,39:139,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(K,[2,36]),t(K,[2,37]),t(K,[2,38]),t(K,[2,39]),t(K,[2,40]),{22:Vt,24:Ft,26:xt,38:ft,39:163,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Nn,a,{17:164}),t(K,[2,45]),t(K,[2,46]),t(X,[2,53],{52:Xr}),{26:F,52:O,66:A,67:J,91:C,97:166,102:[1,167],105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{95:[1,168],103:169,105:[1,170]},{26:F,52:O,66:A,67:J,91:C,95:[1,171],97:172,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:O,66:A,67:J,91:C,97:173,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,101],{22:[1,174],99:[1,175]}),t(Kt,[2,105],{22:[1,176]}),t(Kt,[2,109],{115:100,117:178,22:[1,177],26:F,52:O,66:A,67:J,91:C,105:ht,106:U,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,111],{22:[1,179]}),t(De,[2,152]),t(De,[2,154]),t(De,[2,155]),t(De,[2,156]),t(De,[2,157]),t(ae,[2,162]),t(ae,[2,163]),t(ae,[2,164]),t(ae,[2,165]),t(ae,[2,166]),t(ae,[2,167]),t(ae,[2,168]),t(ae,[2,169]),t(ae,[2,170]),t(ae,[2,171]),t(ae,[2,172]),t(ae,[2,173]),t(ae,[2,174]),{52:k,54:180,66:T,67:L,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,116:47,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt},{22:Vt,24:Ft,26:xt,38:ft,39:181,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:182,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:184,42:Lt,52:O,57:[1,183],66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:185,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:186,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:187,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{66:[1,188]},{22:Vt,24:Ft,26:xt,38:ft,39:189,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:190,42:Lt,52:O,66:A,67:J,71:[1,191],73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:192,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:193,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:194,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(jt,[2,151]),t(Be,[2,3]),{8:195,15:ut},{15:[2,7]},t(s,[2,28]),t(Gt,[2,33]),t(X,[2,51],{30:196,22:_t}),t(Ht,[2,75],{22:[1,197]}),{22:[1,198]},{22:Vt,24:Ft,26:xt,38:ft,39:199,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,82:[1,200],83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ae,[2,82]),t(ae,[2,84]),t(ae,[2,140]),t(ae,[2,141]),t(ae,[2,142]),t(ae,[2,143]),t(ae,[2,144]),t(ae,[2,145]),t(ae,[2,146]),t(ae,[2,147]),t(ae,[2,148]),t(ae,[2,149]),t(ae,[2,85]),t(ae,[2,86]),t(ae,[2,87]),t(ae,[2,88]),t(ae,[2,89]),t(ae,[2,90]),t(ae,[2,91]),t(ae,[2,92]),t(ae,[2,93]),t(ae,[2,94]),t(ae,[2,95]),{9:203,20:Ot,21:P,22:Vt,23:z,24:Ft,26:xt,38:ft,40:[1,202],42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:p,46:g,48:b,50:35,51:45,52:k,54:46,66:T,67:L,86:E,87:I,88:V,89:H,90:G,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,116:47,118:m,119:Q,120:x,121:ct,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt},{22:_t,30:205},{22:[1,206],26:F,52:O,66:A,67:J,91:C,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(Re,[2,123]),{22:[1,211]},{22:[1,212],26:F,52:O,66:A,67:J,91:C,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,213],26:F,52:O,66:A,67:J,91:C,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{84:[1,214]},t(Kt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(De,[2,153]),{84:[1,219],101:[1,220]},t(le,[2,57],{116:129,52:k,66:T,67:L,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,221],42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,56:[1,222],66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:223,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,58:[1,224],66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,60:[1,225],66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,62:[1,226],66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,64:[1,227],66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{67:[1,228]},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,66:A,67:J,70:[1,229],73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,66:A,67:J,72:[1,230],73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:231,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,41:[1,232],42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,66:A,67:J,73:bt,75:[1,233],77:[1,234],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,66:A,67:J,73:bt,75:[1,236],77:[1,235],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{9:237,20:Ot,21:P,23:z},t(X,[2,52],{52:Xr}),t(Ht,[2,77]),t(Ht,[2,76]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,66:A,67:J,68:[1,238],73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Ht,[2,79]),t(ae,[2,83]),{22:Vt,24:Ft,26:xt,38:ft,39:239,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Nn,a,{17:240}),t(K,[2,43]),{51:241,52:k,54:46,66:T,67:L,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,116:47,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt},{22:Pe,66:Ye,67:Ie,86:$e,96:242,102:ar,105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},{22:Pe,66:Ye,67:Ie,86:$e,96:256,102:ar,105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},{22:Pe,66:Ye,67:Ie,86:$e,96:257,102:ar,104:[1,258],105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},{22:Pe,66:Ye,67:Ie,86:$e,96:259,102:ar,104:[1,260],105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},{105:[1,261]},{22:Pe,66:Ye,67:Ie,86:$e,96:262,102:ar,105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},{22:Pe,66:Ye,67:Ie,86:$e,96:263,102:ar,105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},{26:F,52:O,66:A,67:J,91:C,97:264,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,102]),{84:[1,265]},t(Kt,[2,106],{22:[1,266]}),t(Kt,[2,107]),t(Kt,[2,110]),t(Kt,[2,112],{22:[1,267]}),t(Kt,[2,113]),t(Xt,[2,58]),t(Xt,[2,59]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,58:[1,268],66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,66]),t(Xt,[2,61]),t(Xt,[2,62]),t(Xt,[2,63]),{66:[1,269]},t(Xt,[2,65]),t(Xt,[2,67]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:O,66:A,67:J,72:[1,270],73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,69]),t(Xt,[2,70]),t(Xt,[2,72]),t(Xt,[2,71]),t(Xt,[2,73]),t(Be,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Vt,24:Ft,26:xt,38:ft,41:[1,271],42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:p,46:g,48:b,50:35,51:45,52:k,54:46,66:T,67:L,86:E,87:I,88:V,89:H,90:G,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,116:47,118:m,119:Q,120:x,121:ct,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt},t(le,[2,56]),t(Kt,[2,115],{106:Le}),t(We,[2,125],{108:274,22:Pe,66:Ye,67:Ie,86:$e,102:ar,105:zt,109:Z,110:At,111:Nt,112:pe,113:Me}),t(ve,[2,127]),t(ve,[2,129]),t(ve,[2,130]),t(ve,[2,131]),t(ve,[2,132]),t(ve,[2,133]),t(ve,[2,134]),t(ve,[2,135]),t(ve,[2,136]),t(ve,[2,137]),t(ve,[2,138]),t(ve,[2,139]),t(Kt,[2,116],{106:Le}),t(Kt,[2,117],{106:Le}),{22:[1,275]},t(Kt,[2,118],{106:Le}),{22:[1,276]},t(Re,[2,124]),t(Kt,[2,98],{106:Le}),t(Kt,[2,99],{106:Le}),t(Kt,[2,100],{115:100,117:178,26:F,52:O,66:A,67:J,91:C,105:ht,106:U,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Ot,21:P,23:z},t(K,[2,42]),{22:Pe,66:Ye,67:Ie,86:$e,102:ar,105:zt,107:283,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},t(ve,[2,128]),{26:F,52:O,66:A,67:J,91:C,97:284,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:O,66:A,67:J,91:C,97:285,105:ht,106:U,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,108]),t(Kt,[2,114]),t(Xt,[2,60]),{22:Vt,24:Ft,26:xt,38:ft,39:286,42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,68]),t(Nn,a,{17:287}),t(We,[2,126],{108:274,22:Pe,66:Ye,67:Ie,86:$e,102:ar,105:zt,109:Z,110:At,111:Nt,112:pe,113:Me}),t(Kt,[2,121],{115:100,117:178,22:[1,288],26:F,52:O,66:A,67:J,91:C,105:ht,106:U,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,122],{115:100,117:178,22:[1,289],26:F,52:O,66:A,67:J,91:C,105:ht,106:U,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,290],42:Lt,52:O,66:A,67:J,73:bt,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:fe,90:be,91:_e,92:ke,94:142,95:$t,105:ht,106:U,109:se,111:et,112:Mt,113:ye,114:Jt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:p,46:g,48:b,50:35,51:45,52:k,54:46,66:T,67:L,86:E,87:I,88:V,89:H,90:G,91:Y,95:W,105:N,106:D,109:w,111:v,112:M,116:47,118:m,119:Q,120:x,121:ct,122:Dt,123:kt,124:j,125:ot,126:rt,127:nt},{22:Pe,66:Ye,67:Ie,86:$e,96:292,102:ar,105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},{22:Pe,66:Ye,67:Ie,86:$e,96:293,102:ar,105:zt,107:243,108:244,109:Z,110:At,111:Nt,112:pe,113:Me},t(Xt,[2,64]),t(K,[2,41]),t(Kt,[2,119],{106:Le}),t(Kt,[2,120],{106:Le})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(qt,te){if(te.recoverable)this.trace(qt);else{var oe=new Error(qt);throw oe.hash=te,oe}},parse:function(qt){var te=this,oe=[0],Rt=[],Ve=[null],q=[],Is=this.table,tt="",Sr=0,Wu=0,Rd=2,Hu=1,Gu=q.slice.call(arguments,1),or=Object.create(this.lexer),Zn={yy:{}};for(var Qn in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qn)&&(Zn.yy[Qn]=this.yy[Qn]);or.setInput(qt,Zn.yy),Zn.yy.lexer=or,Zn.yy.parser=this,typeof or.yylloc>"u"&&(or.yylloc={});var Os=or.yylloc;q.push(Os);var ll=or.options&&or.options.ranges;typeof Zn.yy.parseError=="function"?this.parseError=Zn.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qu(){var Zr;return Zr=Rt.pop()||or.lex()||Hu,typeof Zr!="number"&&(Zr instanceof Array&&(Rt=Zr,Zr=Rt.pop()),Zr=te.symbols_[Zr]||Zr),Zr}for(var xr,Se,Or,Ai,Bn={},Li,Kr,cl,Pa;;){if(Se=oe[oe.length-1],this.defaultActions[Se]?Or=this.defaultActions[Se]:((xr===null||typeof xr>"u")&&(xr=qu()),Or=Is[Se]&&Is[Se][xr]),typeof Or>"u"||!Or.length||!Or[0]){var Rs="";Pa=[];for(Li in Is[Se])this.terminals_[Li]&&Li>Rd&&Pa.push("'"+this.terminals_[Li]+"'");or.showPosition?Rs="Parse error on line "+(Sr+1)+`:
`+or.showPosition()+`
Expecting `+Pa.join(", ")+", got '"+(this.terminals_[xr]||xr)+"'":Rs="Parse error on line "+(Sr+1)+": Unexpected "+(xr==Hu?"end of input":"'"+(this.terminals_[xr]||xr)+"'"),this.parseError(Rs,{text:or.match,token:this.terminals_[xr]||xr,line:or.yylineno,loc:Os,expected:Pa})}if(Or[0]instanceof Array&&Or.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Se+", token: "+xr);switch(Or[0]){case 1:oe.push(xr),Ve.push(or.yytext),q.push(or.yylloc),oe.push(Or[1]),xr=null,Wu=or.yyleng,tt=or.yytext,Sr=or.yylineno,Os=or.yylloc;break;case 2:if(Kr=this.productions_[Or[1]][1],Bn.$=Ve[Ve.length-Kr],Bn._$={first_line:q[q.length-(Kr||1)].first_line,last_line:q[q.length-1].last_line,first_column:q[q.length-(Kr||1)].first_column,last_column:q[q.length-1].last_column},ll&&(Bn._$.range=[q[q.length-(Kr||1)].range[0],q[q.length-1].range[1]]),Ai=this.performAction.apply(Bn,[tt,Wu,Sr,Zn.yy,Or[1],Ve,q].concat(Gu)),typeof Ai<"u")return Ai;Kr&&(oe=oe.slice(0,-1*Kr*2),Ve=Ve.slice(0,-1*Kr),q=q.slice(0,-1*Kr)),oe.push(this.productions_[Or[1]][0]),Ve.push(Bn.$),q.push(Bn._$),cl=Is[oe[oe.length-2]][oe[oe.length-1]],oe.push(cl);break;case 3:return!0}}return!0}},Xi=function(){var zr={EOF:1,parseError:function(te,oe){if(this.yy.parser)this.yy.parser.parseError(te,oe);else throw new Error(te)},setInput:function(qt,te){return this.yy=te||this.yy||{},this._input=qt,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 qt=this._input[0];this.yytext+=qt,this.yyleng++,this.offset++,this.match+=qt,this.matched+=qt;var te=qt.match(/(?:\r\n?|\n).*/g);return te?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),qt},unput:function(qt){var te=qt.length,oe=qt.split(/(?:\r\n?|\n)/g);this._input=qt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-te),this.offset-=te;var Rt=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),oe.length-1&&(this.yylineno-=oe.length-1);var Ve=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:oe?(oe.length===Rt.length?this.yylloc.first_column:0)+Rt[Rt.length-oe.length].length-oe[0].length:this.yylloc.first_column-te},this.options.ranges&&(this.yylloc.range=[Ve[0],Ve[0]+this.yyleng-te]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(qt){this.unput(this.match.slice(qt))},pastInput:function(){var qt=this.matched.substr(0,this.matched.length-this.match.length);return(qt.length>20?"...":"")+qt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var qt=this.match;return qt.length<20&&(qt+=this._input.substr(0,20-qt.length)),(qt.substr(0,20)+(qt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var qt=this.pastInput(),te=new Array(qt.length+1).join("-");return qt+this.upcomingInput()+`
`+te+"^"},test_match:function(qt,te){var oe,Rt,Ve;if(this.options.backtrack_lexer&&(Ve={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&&(Ve.yylloc.range=this.yylloc.range.slice(0))),Rt=qt[0].match(/(?:\r\n?|\n).*/g),Rt&&(this.yylineno+=Rt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Rt?Rt[Rt.length-1].length-Rt[Rt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+qt[0].length},this.yytext+=qt[0],this.match+=qt[0],this.matches=qt,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(qt[0].length),this.matched+=qt[0],oe=this.performAction.call(this,this.yy,this,te,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var q in Ve)this[q]=Ve[q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var qt,te,oe,Rt;this._more||(this.yytext="",this.match="");for(var Ve=this._currentRules(),q=0;q<Ve.length;q++)if(oe=this._input.match(this.rules[Ve[q]]),oe&&(!te||oe[0].length>te[0].length)){if(te=oe,Rt=q,this.options.backtrack_lexer){if(qt=this.test_match(oe,Ve[q]),qt!==!1)return qt;if(this._backtrack){te=!1;continue}else return!1}else if(!this.options.flex)break}return te?(qt=this.test_match(te,Ve[Rt]),qt!==!1?qt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var te=this.next();return te||this.lex()},begin:function(te){this.conditionStack.push(te)},popState:function(){var te=this.conditionStack.length-1;return te>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(te){return te=this.conditionStack.length-1-Math.abs(te||0),te>=0?this.conditionStack[te]:"INITIAL"},pushState:function(te){this.begin(te)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(te,oe,Rt,Ve){switch(Rt){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:break;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:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();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 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return te.lex.firstGraph()&&this.begin("dir"),24;case 36:return te.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:return 101;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;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:return 82;case 67:return 82;case 68:return 82;case 69:return 81;case 70:return 81;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:return 125;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}}};return zr}();Ne.lexer=Xi;function Ki(){this.yy={}}return Ki.prototype=Ne,Ne.Parser=Ki,new Ki}();T0.parser=T0;const jm=T0,MI=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*graph/)!==null},NI=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"&&t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},BI="flowchart-";let $m=0,E0=$(),Ue={},Ds=[],Sa={},xi=[],mu={},C0={},bu=0,S0=!0,Gn,_u,xu=[];const vu=t=>he.sanitizeText(t,E0),II=function(t,e,r){ze.parseDirective(this,t,e,r)},ku=function(t){const e=Object.keys(Ue);for(const r of e)if(Ue[r].id===t)return Ue[r].domId;return t},OI=function(t,e,r,n,i,s,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(Ue[l]===void 0&&(Ue[l]={id:l,domId:BI+l+"-"+$m,styles:[],classes:[]}),$m++,e!==void 0?(E0=$(),o=vu(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),Ue[l].text=o):Ue[l].text===void 0&&(Ue[l].text=t),r!==void 0&&(Ue[l].type=r),n!=null&&n.forEach(function(u){Ue[l].styles.push(u)}),i!=null&&i.forEach(function(u){Ue[l].classes.push(u)}),s!==void 0&&(Ue[l].dir=s),Ue[l].props===void 0?Ue[l].props=a:a!==void 0&&Object.assign(Ue[l].props,a))},RI=function(t,e,r,n){const a={start:t,end:e,type:void 0,text:""};n=r.text,n!==void 0&&(a.text=vu(n.trim()),a.text[0]==='"'&&a.text[a.text.length-1]==='"'&&(a.text=a.text.substring(1,a.text.length-1))),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length),Ds.push(a)},FI=function(t,e,r,n){let i,s;for(i=0;i<t.length;i++)for(s=0;s<e.length;s++)RI(t[i],e[s],r,n)},PI=function(t,e){t.forEach(function(r){r==="default"?Ds.defaultInterpolate=e:Ds[r].interpolate=e})},YI=function(t,e){t.forEach(function(r){r==="default"?Ds.defaultStyle=e:(ge.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),Ds[r].style=e)})},VI=function(t,e){Sa[t]===void 0&&(Sa[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(r){if(r.match("color")){const i=r.replace("fill","bgFill").replace("color","fill");Sa[t].textStyles.push(i)}Sa[t].styles.push(r)})},UI=function(t){Gn=t,Gn.match(/.*</)&&(Gn="RL"),Gn.match(/.*\^/)&&(Gn="BT"),Gn.match(/.*>/)&&(Gn="LR"),Gn.match(/.*v/)&&(Gn="TB")},A0=function(t,e){t.split(",").forEach(function(r){let n=r;Ue[n]!==void 0&&Ue[n].classes.push(e),mu[n]!==void 0&&mu[n].classes.push(e)})},zI=function(t,e){t.split(",").forEach(function(r){e!==void 0&&(C0[_u==="gen-1"?ku(r):r]=vu(e))})},WI=function(t,e,r){let n=ku(t);if($().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let a=i[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),i[s]=a}}i.length===0&&i.push(t),Ue[t]!==void 0&&(Ue[t].haveCallback=!0,xu.push(function(){const s=document.querySelector(`[id="${n}"]`);s!==null&&s.addEventListener("click",function(){ge.runFunc(e,...i)},!1)}))},HI=function(t,e,r){t.split(",").forEach(function(n){Ue[n]!==void 0&&(Ue[n].link=ge.formatUrl(e,E0),Ue[n].linkTarget=r)}),A0(t,"clickable")},GI=function(t){return C0[t]},qI=function(t,e,r){t.split(",").forEach(function(n){WI(n,e,r)}),A0(t,"clickable")},jI=function(t){xu.forEach(function(e){e(t)})},$I=function(){return Gn.trim()},XI=function(){return Ue},KI=function(){return Ds},ZI=function(){return Sa},Xm=function(t){let e=St(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=St("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),St(t).select("svg").selectAll("g.node").on("mouseover",function(){const i=St(this);if(i.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),St(this).classed("hover",!1)})};xu.push(Xm);const QI=function(t="gen-1"){Ue={},Sa={},Ds=[],xu=[Xm],xi=[],mu={},bu=0,C0=[],S0=!0,_u=t,vn()},JI=t=>{_u=t||"gen-1"},tO=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},eO=function(t,e,r){let n=t.trim(),i=r;t===r&&r.match(/\s/)&&(n=void 0);function s(d){const f={boolean:{},number:{},string:{}},p=[];let g;return{nodeList:d.filter(function(k){const T=typeof k;return k.stmt&&k.stmt==="dir"?(g=k.value,!1):k.trim()===""?!1:T in f?f[T].hasOwnProperty(k)?!1:f[T][k]=!0:p.includes(k)?!1:p.push(k)}),dir:g}}let a=[];const{nodeList:o,dir:l}=s(a.concat.apply(a,e));if(a=o,_u==="gen-1")for(let d=0;d<a.length;d++)a[d]=ku(a[d]);n=n||"subGraph"+bu,i=i||"",i=vu(i),bu=bu+1;const u={id:n,nodes:a,title:i.trim(),classes:[],dir:l};return B.info("Adding",u.id,u.nodes,u.dir),u.nodes=Jm(u,xi).nodes,xi.push(u),mu[n]=u,n},rO=function(t){for(const[e,r]of xi.entries())if(r.id===t)return e;return-1};let zo=-1;const Km=[],Zm=function(t,e){const r=xi[e].nodes;if(zo=zo+1,zo>2e3)return;if(Km[zo]=e,xi[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){const s=rO(r[n]);if(s>=0){const a=Zm(t,s);if(a.result)return{result:!0,count:i+a.count};i=i+a.count}n=n+1}return{result:!1,count:i}},nO=function(t){return Km[t]},iO=function(){zo=-1,xi.length>0&&Zm("none",xi.length-1)},sO=function(){return xi},aO=()=>S0?(S0=!1,!0):!1,oO=t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},lO=(t,e)=>{const r=e.length;let n=0;for(let i=0;i<r;++i)e[i]===t&&++n;return n},cO=t=>{const e=t.trim();let r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e[0]==="x"&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e[0]==="<"&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e[0]==="o"&&(n="double_"+n,r=r.slice(1));break}let i="normal",s=r.length-1;r[0]==="="&&(i="thick");let a=lO(".",r);return a&&(i="dotted",s=a),{type:n,stroke:i,length:s}},uO=(t,e)=>{const r=cO(t);let n;if(e){if(n=oO(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},Qm=(t,e)=>{let r=!1;return t.forEach(n=>{n.nodes.indexOf(e)>=0&&(r=!0)}),r},Jm=(t,e)=>{const r=[];return t.nodes.forEach((n,i)=>{Qm(e,n)||r.push(t.nodes[i])}),{nodes:r}},vi={parseDirective:II,defaultConfig:()=>ha.flowchart,setAccTitle:nn,getAccTitle:kn,getAccDescription:Tn,setAccDescription:wn,addVertex:OI,lookUpDomId:ku,addLink:FI,updateLinkInterpolate:PI,updateLink:YI,addClass:VI,setDirection:UI,setClass:A0,setTooltip:zI,getTooltip:GI,setClickEvent:qI,setLink:HI,bindFunctions:jI,getDirection:$I,getVertices:XI,getEdges:KI,getClasses:ZI,clear:QI,setGen:JI,defaultStyle:tO,addSubGraph:eO,getDepthFirstPos:nO,indexNodes:iO,getSubGraphs:sO,destructLink:uO,lex:{firstGraph:aO},exists:Qm,makeUniq:Jm,setDiagramTitle:hi,getDiagramTitle:di};function t3(t,e){return!!t.children(e).length}function e3(t){return L0(t.v)+":"+L0(t.w)+":"+L0(t.name)}var hO=/:/g;function L0(t){return t?String(t).replace(hO,"\\:"):""}function qn(t,e){e&&t.attr("style",e)}function r3(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function Dn(t,e){var r=e.graph();if(oy(r)){var n=r.transition;if(aa(n))return n(t)}return t}var D0={normal:fO,vee:pO,undirected:gO};function dO(t){D0=t}function fO(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");qn(s,r[n+"Style"]),r[n+"Class"]&&s.attr("class",r[n+"Class"])}function pO(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");qn(s,r[n+"Style"]),r[n+"Class"]&&s.attr("class",r[n+"Class"])}function gO(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");qn(s,r[n+"Style"]),r[n+"Class"]&&s.attr("class",r[n+"Class"])}function M0(t,e){var r=t.append("foreignObject").attr("width","100000"),n=r.append("xhtml:div");n.attr("xmlns","http://www.w3.org/1999/xhtml");var i=e.label;switch(typeof i){case"function":n.insert(i);break;case"object":n.insert(function(){return i});break;default:n.html(i)}qn(n,e.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap");var s=n.node().getBoundingClientRect();return r.attr("width",s.width).attr("height",s.height),r}function yO(t,e){var r=t;return r.node().appendChild(e.label),qn(r,e.labelStyle),r}function mO(t,e){for(var r=t.append("text"),n=bO(e.label).split(`
`),i=0;i<n.length;i++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(n[i]);return qn(r,e.labelStyle),r}function bO(t){for(var e="",r=!1,n,i=0;i<t.length;++i)if(n=t[i],r){switch(n){case"n":e+=`
`;break;default:e+=n}r=!1}else n==="\\"?r=!0:e+=n;return e}function N0(t,e,r){var n=e.label,i=t.append("g");e.labelType==="svg"?yO(i,e):typeof n!="string"||e.labelType==="html"?M0(i,e):mO(i,e);var s=i.node().getBBox(),a;switch(r){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-s.height;break;default:a=-s.height/2}return i.attr("transform","translate("+-s.width/2+","+a+")"),i}var B0=function(t,e){var r=e.nodes().filter(function(s){return t3(e,s)}),n=t.selectAll("g.cluster").data(r,function(s){return s});Dn(n.exit(),e).style("opacity",0).remove();var i=n.enter().append("g").attr("class","cluster").attr("id",function(s){var a=e.node(s);return a.id}).style("opacity",0).each(function(s){var a=e.node(s),o=St(this);St(this).append("rect");var l=o.append("g").attr("class","label");N0(l,a,a.clusterLabelPos)});return n=n.merge(i),n=Dn(n,e).style("opacity",1),n.selectAll("rect").each(function(s){var a=e.node(s),o=St(this);qn(o,a.style)}),n};function _O(t){B0=t}let I0=function(t,e){var r=t.selectAll("g.edgeLabel").data(e.edges(),function(i){return e3(i)}).classed("update",!0);r.exit().remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),r=t.selectAll("g.edgeLabel"),r.each(function(i){var s=St(this);s.select(".label").remove();var a=e.edge(i),o=N0(s,e.edge(i),0).classed("label",!0),l=o.node().getBBox();a.labelId&&o.attr("id",a.labelId),me(a,"width")||(a.width=l.width),me(a,"height")||(a.height=l.height)});var n;return r.exit?n=r.exit():n=r.selectAll(null),Dn(n,e).style("opacity",0).remove(),r};function xO(t){I0=t}function n3(t,e){return t.intersect(e)}var O0=function(t,e,r){var n=t.selectAll("g.edgePath").data(e.edges(),function(a){return e3(a)}).classed("update",!0),i=EO(n,e);CO(n,e);var s=n.merge!==void 0?n.merge(i):n;return Dn(s,e).style("opacity",1),s.each(function(a){var o=St(this),l=e.edge(a);l.elem=this,l.id&&o.attr("id",l.id),r3(o,l.class,(o.classed("update")?"update ":"")+"edgePath")}),s.selectAll("path.path").each(function(a){var o=e.edge(a);o.arrowheadId=ou("arrowhead");var l=St(this).attr("marker-end",function(){return"url("+kO(location.href,o.arrowheadId)+")"}).style("fill","none");Dn(l,e).attr("d",function(u){return wO(e,u)}),qn(l,o.style)}),s.selectAll("defs *").remove(),s.selectAll("defs").each(function(a){var o=e.edge(a),l=r[o.arrowhead];l(St(this),o.arrowheadId,o,"arrowhead")}),s};function vO(t){O0=t}function kO(t,e){var r=t.split("#")[0];return r+"#"+e}function wO(t,e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),s=r.points.slice(1,r.points.length-1);return s.unshift(n3(n,s[0])),s.push(n3(i,s[s.length-1])),i3(r,s)}function i3(t,e){var r=(Js||S6.line)().x(function(n){return n.x}).y(function(n){return n.y});return(r.curve||r.interpolate)(t.curve),r(e)}function TO(t){var e=t.getBBox(),r=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2);return{x:r.e,y:r.f}}function EO(t,e){var r=t.enter().append("g").attr("class","edgePath").style("opacity",0);return r.append("path").attr("class","path").attr("d",function(n){var i=e.edge(n),s=e.node(n.v).elem,a=Ss(i.points.length).map(function(){return TO(s)});return i3(i,a)}),r.append("defs"),r}function CO(t,e){var r=t.exit();Dn(r,e).style("opacity",0).remove()}var R0=function(t,e,r){var n=e.nodes().filter(function(a){return!t3(e,a)}),i=t.selectAll("g.node").data(n,function(a){return a}).classed("update",!0);i.exit().remove(),i.enter().append("g").attr("class","node").style("opacity",0),i=t.selectAll("g.node"),i.each(function(a){var o=e.node(a),l=St(this);r3(l,o.class,(l.classed("update")?"update ":"")+"node"),l.select("g.label").remove();var u=l.append("g").attr("class","label"),d=N0(u,o),f=r[o.shape],p=No(d.node().getBBox(),"width","height");o.elem=this,o.id&&l.attr("id",o.id),o.labelId&&u.attr("id",o.labelId),me(o,"width")&&(p.width=o.width),me(o,"height")&&(p.height=o.height),p.width+=o.paddingLeft+o.paddingRight,p.height+=o.paddingTop+o.paddingBottom,u.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var g=St(this);g.select(".label-container").remove();var b=f(g,p,o).classed("label-container",!0);qn(b,o.style);var k=b.node().getBBox();o.width=k.width,o.height=k.height});var s;return i.exit?s=i.exit():s=i.selectAll(null),Dn(s,e).style("opacity",0).remove(),i};function SO(t){R0=t}function AO(t,e){var r=t.filter(function(){return!St(this).classed("update")});function n(i){var s=e.node(i);return"translate("+s.x+","+s.y+")"}r.attr("transform",n),Dn(t,e).style("opacity",1).attr("transform",n),Dn(r.selectAll("rect"),e).attr("width",function(i){return e.node(i).width}).attr("height",function(i){return e.node(i).height}).attr("x",function(i){var s=e.node(i);return-s.width/2}).attr("y",function(i){var s=e.node(i);return-s.height/2})}function LO(t,e){var r=t.filter(function(){return!St(this).classed("update")});function n(i){var s=e.edge(i);return me(s,"x")?"translate("+s.x+","+s.y+")":""}r.attr("transform",n),Dn(t,e).style("opacity",1).attr("transform",n)}function DO(t,e){var r=t.filter(function(){return!St(this).classed("update")});function n(i){var s=e.node(i);return"translate("+s.x+","+s.y+")"}r.attr("transform",n),Dn(t,e).style("opacity",1).attr("transform",n)}function s3(t,e,r,n){var i=t.x,s=t.y,a=i-n.x,o=s-n.y,l=Math.sqrt(e*e*o*o+r*r*a*a),u=Math.abs(e*r*a/l);n.x<i&&(u=-u);var d=Math.abs(e*r*o/l);return n.y<s&&(d=-d),{x:i+u,y:s+d}}function MO(t,e,r){return s3(t,e,e,r)}function NO(t,e,r,n){var i,s,a,o,l,u,d,f,p,g,b,k,T,L,E;if(i=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=i*r.x+a*r.y+l,g=i*n.x+a*n.y+l,!(p!==0&&g!==0&&a3(p,g))&&(s=n.y-r.y,o=r.x-n.x,u=n.x*r.y-r.x*n.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&a3(d,f))&&(b=i*o-s*a,b!==0)))return k=Math.abs(b/2),T=a*u-o*l,L=T<0?(T-k)/b:(T+k)/b,T=s*l-i*u,E=T<0?(T-k)/b:(T+k)/b,{x:L,y:E}}function a3(t,e){return t*e>0}function jn(t,e,r){var n=t.x,i=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(b){a=Math.min(a,b.x),o=Math.min(o,b.y)});for(var l=n-t.width/2-a,u=i-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=NO(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(b,k){var T=b.x-r.x,L=b.y-r.y,E=Math.sqrt(T*T+L*L),I=k.x-r.x,V=k.y-r.y,H=Math.sqrt(I*I+V*V);return E<H?-1:E===H?0:1}),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}function F0(t,e){var r=t.x,n=t.y,i=e.x-r,s=e.y-n,a=t.width/2,o=t.height/2,l,u;return Math.abs(s)*a>Math.abs(i)*o?(s<0&&(o=-o),l=s===0?0:o*i/s,u=o):(i<0&&(a=-a),l=a,u=i===0?0:a*s/i),{x:r+l,y:n+u}}var P0={rect:IO,ellipse:OO,circle:RO,diamond:FO};function BO(t){P0=t}function IO(t,e,r){var n=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(i){return F0(r,i)},n}function OO(t,e,r){var n=e.width/2,i=e.height/2,s=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",n).attr("ry",i);return r.intersect=function(a){return s3(r,n,i,a)},s}function RO(t,e,r){var n=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",n);return r.intersect=function(s){return MO(r,n,s)},i}function FO(t,e,r){var n=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,s=[{x:0,y:-i},{x:-n,y:0},{x:0,y:i},{x:n,y:0}],a=t.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return r.intersect=function(o){return jn(r,s,o)},a}function PO(){var t=function(e,r){UO(r);var n=Wo(e,"output"),i=Wo(n,"clusters"),s=Wo(n,"edgePaths"),a=I0(Wo(n,"edgeLabels"),r),o=R0(Wo(n,"nodes"),r,P0);Ea(r),DO(o,r),LO(a,r),O0(s,r,D0);var l=B0(i,r);AO(l,r),zO(r)};return t.createNodes=function(e){return arguments.length?(SO(e),t):R0},t.createClusters=function(e){return arguments.length?(_O(e),t):B0},t.createEdgeLabels=function(e){return arguments.length?(xO(e),t):I0},t.createEdgePaths=function(e){return arguments.length?(vO(e),t):O0},t.shapes=function(e){return arguments.length?(BO(e),t):P0},t.arrows=function(e){return arguments.length?(dO(e),t):D0},t}var YO={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},VO={arrowhead:"normal",curve:Hr};function UO(t){t.nodes().forEach(function(e){var r=t.node(e);!me(r,"label")&&!t.children(e).length&&(r.label=e),me(r,"paddingX")&&ka(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),me(r,"paddingY")&&ka(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),me(r,"padding")&&ka(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),ka(r,YO),vt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(n){r[n]=Number(r[n])}),me(r,"width")&&(r._prevWidth=r.width),me(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);me(r,"label")||(r.label=""),ka(r,VO)})}function zO(t){vt(t.nodes(),function(e){var r=t.node(e);me(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,me(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function Wo(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}function o3(t,e,r){const n=e.width,i=e.height,s=(n+i)*.9,a=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=ki(t,s,s,a);return r.intersect=function(l){return jn(r,a,l)},o}function l3(t,e,r){const i=e.height,s=i/4,a=e.width+2*s,o=[{x:s,y:0},{x:a-s,y:0},{x:a,y:-i/2},{x:a-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],l=ki(t,a,i,o);return r.intersect=function(u){return jn(r,o,u)},l}function c3(t,e,r){const n=e.width,i=e.height,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],a=ki(t,n,i,s);return r.intersect=function(o){return jn(r,s,o)},a}function u3(t,e,r){const n=e.width,i=e.height,s=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],a=ki(t,n,i,s);return r.intersect=function(o){return jn(r,s,o)},a}function h3(t,e,r){const n=e.width,i=e.height,s=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],a=ki(t,n,i,s);return r.intersect=function(o){return jn(r,s,o)},a}function d3(t,e,r){const n=e.width,i=e.height,s=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],a=ki(t,n,i,s);return r.intersect=function(o){return jn(r,s,o)},a}function f3(t,e,r){const n=e.width,i=e.height,s=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],a=ki(t,n,i,s);return r.intersect=function(o){return jn(r,s,o)},a}function p3(t,e,r){const n=e.width,i=e.height,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],a=ki(t,n,i,s);return r.intersect=function(o){return jn(r,s,o)},a}function g3(t,e,r){const n=e.height,i=e.width+n/4,s=t.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return r.intersect=function(a){return F0(r,a)},s}function y3(t,e,r){const n=e.width,i=e.height,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],a=ki(t,n,i,s);return r.intersect=function(o){return jn(r,s,o)},a}function m3(t,e,r){const n=e.width,i=n/2,s=i/(2.5+n/50),a=e.height+s,o="M 0,"+s+" a "+i+","+s+" 0,0,0 "+n+" 0 a "+i+","+s+" 0,0,0 "+-n+" 0 l 0,"+a+" a "+i+","+s+" 0,0,0 "+n+" 0 l 0,"+-a,l=t.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-n/2+","+-(a/2+s)+")");return r.intersect=function(u){const d=F0(r,u),f=d.x-r.x;if(i!=0&&(Math.abs(f)<r.width/2||Math.abs(f)==r.width/2&&Math.abs(d.y-r.y)>r.height/2-s)){let p=s*s*(1-f*f/(i*i));p!=0&&(p=Math.sqrt(p)),p=s-p,u.y-r.y>0&&(p=-p),d.y+=p}return d},l}function WO(t){t.shapes().question=o3,t.shapes().hexagon=l3,t.shapes().stadium=g3,t.shapes().subroutine=y3,t.shapes().cylinder=m3,t.shapes().rect_left_inv_arrow=c3,t.shapes().lean_right=u3,t.shapes().lean_left=h3,t.shapes().trapezoid=d3,t.shapes().inv_trapezoid=f3,t.shapes().rect_right_inv_arrow=p3}function HO(t){t({question:o3}),t({hexagon:l3}),t({stadium:g3}),t({subroutine:y3}),t({cylinder:m3}),t({rect_left_inv_arrow:c3}),t({lean_right:u3}),t({lean_left:h3}),t({trapezoid:d3}),t({inv_trapezoid:f3}),t({rect_right_inv_arrow:p3})}function ki(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}const GO={addToRender:WO,addToRenderV2:HO},b3={},qO=function(t){const e=Object.keys(t);for(const r of e)b3[r]=t[r]},_3=function(t,e,r,n,i,s){const a=n?n.select(`[id="${r}"]`):St(`[id="${r}"]`),o=i||document;Object.keys(t).forEach(function(u){const d=t[u];let f="default";d.classes.length>0&&(f=d.classes.join(" "));const p=Vi(d.styles);let g=d.text!==void 0?d.text:d.id,b;if(pr($().flowchart.htmlLabels)){const L={label:g.replace(/fa[blrs]?:fa-[\w-]+/g,E=>`<i class='${E.replace(":"," ")}'></i>`)};b=M0(a,L).node(),b.parentNode.removeChild(b)}else{const L=o.createElementNS("http://www.w3.org/2000/svg","text");L.setAttribute("style",p.labelStyle.replace("color:","fill:"));const E=g.split(he.lineBreakRegex);for(const I of E){const V=o.createElementNS("http://www.w3.org/2000/svg","tspan");V.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),V.setAttribute("dy","1em"),V.setAttribute("x","1"),V.textContent=I,L.appendChild(V)}b=L}let k=0,T="";switch(d.type){case"round":k=5,T="rect";break;case"square":T="rect";break;case"diamond":T="question";break;case"hexagon":T="hexagon";break;case"odd":T="rect_left_inv_arrow";break;case"lean_right":T="lean_right";break;case"lean_left":T="lean_left";break;case"trapezoid":T="trapezoid";break;case"inv_trapezoid":T="inv_trapezoid";break;case"odd_right":T="rect_left_inv_arrow";break;case"circle":T="circle";break;case"ellipse":T="ellipse";break;case"stadium":T="stadium";break;case"subroutine":T="subroutine";break;case"cylinder":T="cylinder";break;case"group":T="rect";break;default:T="rect"}B.warn("Adding node",d.id,d.domId),e.setNode(s.db.lookUpDomId(d.id),{labelType:"svg",labelStyle:p.labelStyle,shape:T,label:b,rx:k,ry:k,class:f,style:p.style,id:s.db.lookUpDomId(d.id)})})},x3=function(t,e,r){let n=0,i,s;if(t.defaultStyle!==void 0){const a=Vi(t.defaultStyle);i=a.style,s=a.labelStyle}t.forEach(function(a){n++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,u="LE-"+a.end;const d={};a.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal";let f="",p="";if(a.style!==void 0){const g=Vi(a.style);f=g.style,p=g.labelStyle}else switch(a.stroke){case"normal":f="fill:none",i!==void 0&&(f=i),s!==void 0&&(p=s);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none";break}d.style=f,d.labelStyle=p,a.interpolate!==void 0?d.curve=bn(a.interpolate,Hr):t.defaultInterpolate!==void 0?d.curve=bn(t.defaultInterpolate,Hr):d.curve=bn(b3.curve,Hr),a.text===void 0?a.style!==void 0&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",pr($().flowchart.htmlLabels)?(d.labelType="html",d.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${u}" style="${d.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,g=>`<i class='${g.replace(":"," ")}'></i>`)}</span>`):(d.labelType="text",d.label=a.text.replace(he.lineBreakRegex,`
`),a.style===void 0&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=o,d.class=l+" "+u,d.minlen=a.length||1,e.setEdge(r.db.lookUpDomId(a.start),r.db.lookUpDomId(a.end),d,n)})},jO={setConf:qO,addVertices:_3,addEdges:x3,getClasses:function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(r){return B.error(r),{}}},draw:function(t,e,r,n){B.info("Drawing flowchart"),n.db.clear();const{securityLevel:i,flowchart:s}=$();let a;i==="sandbox"&&(a=St("#i"+e));const o=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=i==="sandbox"?a.nodes()[0].contentDocument:document;try{n.parser.parse(t)}catch{B.debug("Parsing failed")}let u=n.db.getDirection();u===void 0&&(u="TD");const d=s.nodeSpacing||50,f=s.rankSpacing||50,p=new sr({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:d,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let g;const b=n.db.getSubGraphs();for(let G=b.length-1;G>=0;G--)g=b[G],n.db.addVertex(g.id,g.title,"group",void 0,g.classes);const k=n.db.getVertices();B.warn("Get vertices",k);const T=n.db.getEdges();let L=0;for(L=b.length-1;L>=0;L--){g=b[L],hh("cluster").append("text");for(let G=0;G<g.nodes.length;G++)B.warn("Setting subgraph",g.nodes[G],n.db.lookUpDomId(g.nodes[G]),n.db.lookUpDomId(g.id)),p.setParent(n.db.lookUpDomId(g.nodes[G]),n.db.lookUpDomId(g.id))}_3(k,p,e,o,l,n),x3(T,p,n);const E=new PO;GO.addToRender(E),E.arrows().none=function(Y,W,N,D){const v=Y.append("marker").attr("id",W).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");qn(v,N[D+"Style"])},E.arrows().normal=function(Y,W){Y.append("marker").attr("id",W).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const I=o.select(`[id="${e}"]`),V=o.select("#"+e+" g");for(E(V,p),V.selectAll("g.node").attr("title",function(){return n.db.getTooltip(this.id)}),n.db.indexNodes("subGraph"+L),L=0;L<b.length;L++)if(g=b[L],g.title!=="undefined"){const G=l.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(g.id)+'"] rect'),Y=l.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(g.id)+'"]'),W=G[0].x.baseVal.value,N=G[0].y.baseVal.value,D=G[0].width.baseVal.value,v=St(Y[0]).select(".label");v.attr("transform",`translate(${W+D/2}, ${N+14})`),v.attr("id",e+"Text");for(let M=0;M<g.classes.length;M++)Y[0].classList.add(g.classes[M])}if(!s.htmlLabels){const G=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const Y of G){const W=Y.getBBox(),N=l.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("rx",0),N.setAttribute("ry",0),N.setAttribute("width",W.width),N.setAttribute("height",W.height),Y.insertBefore(N,Y.firstChild)}}Sc(p,I,s.diagramPadding,s.useMaxWidth),Object.keys(k).forEach(function(G){const Y=k[G];if(Y.link){const W=o.select("#"+e+' [id="'+n.db.lookUpDomId(G)+'"]');if(W){const N=l.createElementNS("http://www.w3.org/2000/svg","a");N.setAttributeNS("http://www.w3.org/2000/svg","class",Y.classes.join(" ")),N.setAttributeNS("http://www.w3.org/2000/svg","href",Y.link),N.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?N.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):Y.linkTarget&&N.setAttributeNS("http://www.w3.org/2000/svg","target",Y.linkTarget);const D=W.insert(function(){return N},":first-child"),w=W.select(".label-container");w&&D.append(function(){return w.node()});const v=W.select(".label");v&&D.append(function(){return v.node()})}}})}},v3={},$O=function(t){const e=Object.keys(t);for(const r of e)v3[r]=t[r]},k3=function(t,e,r,n,i,s){const a=n.select(`[id="${r}"]`);Object.keys(t).forEach(function(l){const u=t[l];let d="default";u.classes.length>0&&(d=u.classes.join(" "));const f=Vi(u.styles);let p=u.text!==void 0?u.text:u.id,g;if(pr($().flowchart.htmlLabels)){const T={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,L=>`<i class='${L.replace(":"," ")}'></i>`)};g=M0(a,T).node(),g.parentNode.removeChild(g)}else{const T=i.createElementNS("http://www.w3.org/2000/svg","text");T.setAttribute("style",f.labelStyle.replace("color:","fill:"));const L=p.split(he.lineBreakRegex);for(const E of L){const I=i.createElementNS("http://www.w3.org/2000/svg","tspan");I.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),I.setAttribute("dy","1em"),I.setAttribute("x","1"),I.textContent=E,T.appendChild(I)}g=T}let b=0,k="";switch(u.type){case"round":b=5,k="rect";break;case"square":k="rect";break;case"diamond":k="question";break;case"hexagon":k="hexagon";break;case"odd":k="rect_left_inv_arrow";break;case"lean_right":k="lean_right";break;case"lean_left":k="lean_left";break;case"trapezoid":k="trapezoid";break;case"inv_trapezoid":k="inv_trapezoid";break;case"odd_right":k="rect_left_inv_arrow";break;case"circle":k="circle";break;case"ellipse":k="ellipse";break;case"stadium":k="stadium";break;case"subroutine":k="subroutine";break;case"cylinder":k="cylinder";break;case"group":k="rect";break;case"doublecircle":k="doublecircle";break;default:k="rect"}e.setNode(u.id,{labelStyle:f.labelStyle,shape:k,labelText:p,rx:b,ry:b,class:d,style:f.style,id:u.id,link:u.link,linkTarget:u.linkTarget,tooltip:s.db.getTooltip(u.id)||"",domId:s.db.lookUpDomId(u.id),haveCallback:u.haveCallback,width:u.type==="group"?500:void 0,dir:u.dir,type:u.type,props:u.props,padding:$().flowchart.padding}),B.info("setNode",{labelStyle:f.labelStyle,shape:k,labelText:p,rx:b,ry:b,class:d,style:f.style,id:u.id,domId:s.db.lookUpDomId(u.id),width:u.type==="group"?500:void 0,type:u.type,dir:u.dir,props:u.props,padding:$().flowchart.padding})})},w3=function(t,e,r){B.info("abc78 edges = ",t);let n=0,i={},s,a;if(t.defaultStyle!==void 0){const o=Vi(t.defaultStyle);s=o.style,a=o.labelStyle}t.forEach(function(o){n++;var l="L-"+o.start+"-"+o.end;i[l]===void 0?(i[l]=0,B.info("abc78 new entry",l,i[l])):(i[l]++,B.info("abc78 new entry",l,i[l]));let u=l+"-"+i[l];B.info("abc78 new link id to be used is",l,u,i[l]);var d="LS-"+o.start,f="LE-"+o.end;const p={style:"",labelStyle:""};switch(p.minlen=o.length||1,o.type==="arrow_open"?p.arrowhead="none":p.arrowhead="normal",p.arrowTypeStart="arrow_open",p.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":p.arrowTypeStart="arrow_cross";case"arrow_cross":p.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":p.arrowTypeStart="arrow_point";case"arrow_point":p.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":p.arrowTypeStart="arrow_circle";case"arrow_circle":p.arrowTypeEnd="arrow_circle";break}let g="",b="";switch(o.stroke){case"normal":g="fill:none;",s!==void 0&&(g=s),a!==void 0&&(b=a),p.thickness="normal",p.pattern="solid";break;case"dotted":p.thickness="normal",p.pattern="dotted",p.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":p.thickness="thick",p.pattern="solid",p.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const k=Vi(o.style);g=k.style,b=k.labelStyle}p.style=p.style+=g,p.labelStyle=p.labelStyle+=b,o.interpolate!==void 0?p.curve=bn(o.interpolate,Hr):t.defaultInterpolate!==void 0?p.curve=bn(t.defaultInterpolate,Hr):p.curve=bn(v3.curve,Hr),o.text===void 0?o.style!==void 0&&(p.arrowheadStyle="fill: #333"):(p.arrowheadStyle="fill: #333",p.labelpos="c"),p.labelType="text",p.label=o.text.replace(he.lineBreakRegex,`
`),o.style===void 0&&(p.style=p.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),p.labelStyle=p.labelStyle.replace("color:","fill:"),p.id=u,p.classes="flowchart-link "+d+" "+f,e.setEdge(o.start,o.end,p,n)})},Y0={setConf:$O,addVertices:k3,addEdges:w3,getClasses:function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},draw:function(t,e,r,n){B.info("Drawing flowchart"),n.db.clear(),vi.setGen("gen-2"),n.parser.parse(t);let i=n.db.getDirection();i===void 0&&(i="TD");const{securityLevel:s,flowchart:a}=$(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let u;s==="sandbox"&&(u=St("#i"+e));const d=St(s==="sandbox"?u.nodes()[0].contentDocument.body:"body"),f=s==="sandbox"?u.nodes()[0].contentDocument:document,p=new sr({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let g;const b=n.db.getSubGraphs();B.info("Subgraphs - ",b);for(let H=b.length-1;H>=0;H--)g=b[H],B.info("Subgraph - ",g),n.db.addVertex(g.id,g.title,"group",void 0,g.classes,g.dir);const k=n.db.getVertices(),T=n.db.getEdges();B.info(T);let L=0;for(L=b.length-1;L>=0;L--){g=b[L],hh("cluster").append("text");for(let H=0;H<g.nodes.length;H++)B.info("Setting up subgraphs",g.nodes[H],g.id),p.setParent(g.nodes[H],g.id)}k3(k,p,e,d,f,n),w3(T,p);const E=d.select(`[id="${e}"]`),I=d.select("#"+e+" g");if(v0(I,p,["point","circle","cross"],"flowchart",e),ge.insertTitle(E,"flowchartTitleText",a.titleTopMargin,n.db.getDiagramTitle()),Sc(p,E,a.diagramPadding,a.useMaxWidth),n.db.indexNodes("subGraph"+L),!a.htmlLabels){const H=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const G of H){const Y=G.getBBox(),W=f.createElementNS("http://www.w3.org/2000/svg","rect");W.setAttribute("rx",0),W.setAttribute("ry",0),W.setAttribute("width",Y.width),W.setAttribute("height",Y.height),G.insertBefore(W,G.firstChild)}}Object.keys(k).forEach(function(H){const G=k[H];if(G.link){const Y=St("#"+e+' [id="'+H+'"]');if(Y){const W=f.createElementNS("http://www.w3.org/2000/svg","a");W.setAttributeNS("http://www.w3.org/2000/svg","class",G.classes.join(" ")),W.setAttributeNS("http://www.w3.org/2000/svg","href",G.link),W.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?W.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):G.linkTarget&&W.setAttributeNS("http://www.w3.org/2000/svg","target",G.linkTarget);const N=Y.insert(function(){return W},":first-child"),D=Y.select(".label-container");D&&N.append(function(){return D.node()});const w=Y.select(".label");w&&N.append(function(){return w.node()})}}})}};var V0=function(){var t=function(W,N,D,w){for(D=D||{},w=W.length;w--;D[W[w]]=N);return D},e=[1,3],r=[1,5],n=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],i=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],u=[1,20],d=[1,21],f=[1,22],p=[1,23],g=[1,24],b=[1,25],k=[1,26],T=[1,27],L=[1,29],E=[1,31],I=[1,34],V=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],H={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(N,D,w,v,M,m,Q){var x=m.length-1;switch(M){case 2:return m[x-1];case 3:this.$=[];break;case 4:m[x-1].push(m[x]),this.$=m[x-1];break;case 5:case 6:this.$=m[x];break;case 7:case 8:this.$=[];break;case 9:v.setDateFormat(m[x].substr(11)),this.$=m[x].substr(11);break;case 10:v.enableInclusiveEndDates(),this.$=m[x].substr(18);break;case 11:v.TopAxis(),this.$=m[x].substr(8);break;case 12:v.setAxisFormat(m[x].substr(11)),this.$=m[x].substr(11);break;case 13:v.setTickInterval(m[x].substr(13)),this.$=m[x].substr(13);break;case 14:v.setExcludes(m[x].substr(9)),this.$=m[x].substr(9);break;case 15:v.setIncludes(m[x].substr(9)),this.$=m[x].substr(9);break;case 16:v.setTodayMarker(m[x].substr(12)),this.$=m[x].substr(12);break;case 17:v.setDiagramTitle(m[x].substr(6)),this.$=m[x].substr(6);break;case 18:this.$=m[x].trim(),v.setAccTitle(this.$);break;case 19:case 20:this.$=m[x].trim(),v.setAccDescription(this.$);break;case 21:v.addSection(m[x].substr(8)),this.$=m[x].substr(8);break;case 23:v.addTask(m[x-1],m[x]),this.$="task";break;case 27:this.$=m[x-1],v.setClickEvent(m[x-1],m[x],null);break;case 28:this.$=m[x-2],v.setClickEvent(m[x-2],m[x-1],m[x]);break;case 29:this.$=m[x-2],v.setClickEvent(m[x-2],m[x-1],null),v.setLink(m[x-2],m[x]);break;case 30:this.$=m[x-3],v.setClickEvent(m[x-3],m[x-2],m[x-1]),v.setLink(m[x-3],m[x]);break;case 31:this.$=m[x-2],v.setClickEvent(m[x-2],m[x],null),v.setLink(m[x-2],m[x-1]);break;case 32:this.$=m[x-3],v.setClickEvent(m[x-3],m[x-1],m[x]),v.setLink(m[x-3],m[x-2]);break;case 33:this.$=m[x-1],v.setLink(m[x-1],m[x]);break;case 34:case 40:this.$=m[x-1]+" "+m[x];break;case 35:case 36:case 38:this.$=m[x-2]+" "+m[x-1]+" "+m[x];break;case 37:case 39:this.$=m[x-3]+" "+m[x-2]+" "+m[x-1]+" "+m[x];break;case 41:v.parseDirective("%%{","open_directive");break;case 42:v.parseDirective(m[x],"type_directive");break;case 43:m[x]=m[x].trim().replace(/'/g,'"'),v.parseDirective(m[x],"arg_directive");break;case 44:v.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,30:4,40:r},{1:[3]},{3:6,4:2,5:e,30:4,40:r},t(n,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:s,14:a,15:o,16:l,17:u,18:d,19:f,20:p,21:g,23:b,25:k,26:T,27:28,28:L,30:4,35:E,40:r},{32:32,33:[1,33],43:I},t([33,43],[2,42]),t(n,[2,8],{1:[2,2]}),t(n,[2,4]),{4:30,10:35,12:i,13:s,14:a,15:o,16:l,17:u,18:d,19:f,20:p,21:g,23:b,25:k,26:T,27:28,28:L,30:4,35:E,40:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),{22:[1,36]},{24:[1,37]},t(n,[2,20]),t(n,[2,21]),t(n,[2,22]),{29:[1,38]},t(n,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},t(n,[2,5]),t(n,[2,18]),t(n,[2,19]),t(n,[2,23]),t(n,[2,27],{37:[1,44],38:[1,45]}),t(n,[2,33],{36:[1,46]}),t(V,[2,25]),{32:47,43:I},{43:[2,43]},t(n,[2,28],{38:[1,48]}),t(n,[2,29]),t(n,[2,31],{37:[1,49]}),{11:[1,50]},t(n,[2,30]),t(n,[2,32]),t(V,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(N,D){if(D.recoverable)this.trace(N);else{var w=new Error(N);throw w.hash=D,w}},parse:function(N){var D=this,w=[0],v=[],M=[null],m=[],Q=this.table,x="",ct=0,Dt=0,kt=2,j=1,ot=m.slice.call(arguments,1),rt=Object.create(this.lexer),nt={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(nt.yy[ut]=this.yy[ut]);rt.setInput(N,nt.yy),nt.yy.lexer=rt,nt.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var _t=rt.yylloc;m.push(_t);var K=rt.options&&rt.options.ranges;typeof nt.yy.parseError=="function"?this.parseError=nt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Yt;return Yt=v.pop()||rt.lex()||j,typeof Yt!="number"&&(Yt instanceof Array&&(v=Yt,Yt=v.pop()),Yt=D.symbols_[Yt]||Yt),Yt}for(var P,z,X,F,O={},A,J,C,ht;;){if(z=w[w.length-1],this.defaultActions[z]?X=this.defaultActions[z]:((P===null||typeof P>"u")&&(P=Ot()),X=Q[z]&&Q[z][P]),typeof X>"u"||!X.length||!X[0]){var U="";ht=[];for(A in Q[z])this.terminals_[A]&&A>kt&&ht.push("'"+this.terminals_[A]+"'");rt.showPosition?U="Parse error on line "+(ct+1)+`:
`+rt.showPosition()+`
Expecting `+ht.join(", ")+", got '"+(this.terminals_[P]||P)+"'":U="Parse error on line "+(ct+1)+": Unexpected "+(P==j?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(U,{text:rt.match,token:this.terminals_[P]||P,line:rt.yylineno,loc:_t,expected:ht})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+P);switch(X[0]){case 1:w.push(P),M.push(rt.yytext),m.push(rt.yylloc),w.push(X[1]),P=null,Dt=rt.yyleng,x=rt.yytext,ct=rt.yylineno,_t=rt.yylloc;break;case 2:if(J=this.productions_[X[1]][1],O.$=M[M.length-J],O._$={first_line:m[m.length-(J||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(J||1)].first_column,last_column:m[m.length-1].last_column},K&&(O._$.range=[m[m.length-(J||1)].range[0],m[m.length-1].range[1]]),F=this.performAction.apply(O,[x,Dt,ct,nt.yy,X[1],M,m].concat(ot)),typeof F<"u")return F;J&&(w=w.slice(0,-1*J*2),M=M.slice(0,-1*J),m=m.slice(0,-1*J)),w.push(this.productions_[X[1]][0]),M.push(O.$),m.push(O._$),C=Q[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},G=function(){var W={EOF:1,parseError:function(D,w){if(this.yy.parser)this.yy.parser.parseError(D,w);else throw new Error(D)},setInput:function(N,D){return this.yy=D||this.yy||{},this._input=N,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 N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var D=N.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},unput:function(N){var D=N.length,w=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var v=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),w.length-1&&(this.yylineno-=w.length-1);var M=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:w?(w.length===v.length?this.yylloc.first_column:0)+v[v.length-w.length].length-w[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),D=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
`+D+"^"},test_match:function(N,D){var w,v,M;if(this.options.backtrack_lexer&&(M={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&&(M.yylloc.range=this.yylloc.range.slice(0))),v=N[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,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(N[0].length),this.matched+=N[0],w=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var m in M)this[m]=M[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,D,w,v;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),m=0;m<M.length;m++)if(w=this._input.match(this.rules[M[m]]),w&&(!D||w[0].length>D[0].length)){if(D=w,v=m,this.options.backtrack_lexer){if(N=this.test_match(w,M[m]),N!==!1)return N;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(N=this.test_match(D,M[v]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var D=this.next();return D||this.lex()},begin:function(D){this.conditionStack.push(D)},popState:function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},pushState:function(D){this.begin(D)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(D,w,v,M){switch(v){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:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();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}}};return W}();H.lexer=G;function Y(){this.yy={}}return Y.prototype=H,H.Parser=Y,new Y}();V0.parser=V0;const XO=V0,KO=t=>t.match(/^\s*gantt/)!==null;let $n="",U0="",z0,W0="",Ho=[],Go=[],H0={},G0=[],wu=[],Aa="";const T3=["active","done","crit","milestone"];let q0=[],qo=!1,j0=!1,$0=0;const ZO=function(t,e,r){ze.parseDirective(this,t,e,r)},QO=function(){G0=[],wu=[],Aa="",q0=[],Tu=0,K0=void 0,Eu=void 0,hr=[],$n="",U0="",z0=void 0,W0="",Ho=[],Go=[],qo=!1,j0=!1,$0=0,H0={},vn()},JO=function(t){U0=t},tR=function(){return U0},eR=function(t){z0=t},rR=function(){return z0},nR=function(t){W0=t},iR=function(){return W0},sR=function(t){$n=t},aR=function(){qo=!0},oR=function(){return qo},lR=function(){j0=!0},cR=function(){return j0},uR=function(){return $n},hR=function(t){Ho=t.toLowerCase().split(/[\s,]+/)},dR=function(){return Ho},fR=function(t){Go=t.toLowerCase().split(/[\s,]+/)},pR=function(){return Go},gR=function(){return H0},yR=function(t){Aa=t,G0.push(t)},mR=function(){return G0},bR=function(){let t=D3();const e=10;let r=0;for(;!t&&r<e;)t=D3(),r++;return wu=hr,wu},E3=function(t,e,r,n){return n.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&r.includes("weekends")||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},C3=function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i=cn(t.startTime,e,!0);i.add(1,"d");let s=cn(t.endTime,e,!0),a=_R(i,s,e,r,n);t.endTime=s.toDate(),t.renderEndTime=a},_R=function(t,e,r,n,i){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=E3(t,r,n,i),s&&e.add(1,"d"),t.add(1,"d");return a},X0=function(t,e,r){r=r.trim();const i=/^after\s+([\d\w- ]+)/.exec(r.trim());if(i!==null){let a=null;if(i[1].split(" ").forEach(function(o){let l=Da(o);l!==void 0&&(a?l.endTime>a.endTime&&(a=l):a=l)}),a)return a.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let s=cn(r,e.trim(),!0);if(s.isValid())return s.toDate();{B.debug("Invalid date:"+r),B.debug("With date format:"+e.trim());const a=new Date(r);if(a===void 0||isNaN(a.getTime()))throw new Error("Invalid date:"+r);return a}},S3=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?cn.duration(Number.parseFloat(e[1]),e[2]):cn.duration.invalid()},A3=function(t,e,r,n=!1){r=r.trim();let i=cn(r,e.trim(),!0);if(i.isValid())return n&&i.add(1,"d"),i.toDate();const s=cn(t),a=S3(r);return a.isValid()&&s.add(a),s.toDate()};let Tu=0;const La=function(t){return t===void 0?(Tu=Tu+1,"task"+Tu):t},xR=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),i={};B3(n,i,T3);for(let a=0;a<n.length;a++)n[a]=n[a].trim();let s="";switch(n.length){case 1:i.id=La(),i.startTime=t.endTime,s=n[0];break;case 2:i.id=La(),i.startTime=X0(void 0,$n,n[0]),s=n[1];break;case 3:i.id=La(n[0]),i.startTime=X0(void 0,$n,n[1]),s=n[2];break}return s&&(i.endTime=A3(i.startTime,$n,s,qo),i.manualEndTime=cn(s,"YYYY-MM-DD",!0).isValid(),C3(i,$n,Go,Ho)),i},vR=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),i={};B3(n,i,T3);for(let s=0;s<n.length;s++)n[s]=n[s].trim();switch(n.length){case 1:i.id=La(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=La(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=La(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]};break}return i};let K0,Eu,hr=[];const L3={},kR=function(t,e){const r={section:Aa,type:Aa,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=vR(Eu,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=Eu,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.order=$0,$0++;const i=hr.push(r);Eu=r.id,L3[r.id]=i-1},Da=function(t){const e=L3[t];return hr[e]},wR=function(t,e){const r={section:Aa,type:Aa,description:t,task:t,classes:[]},n=xR(K0,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,K0=r,wu.push(r)},D3=function(){const t=function(r){const n=hr[r];let i="";switch(hr[r].raw.startTime.type){case"prevTaskEnd":{const s=Da(n.prevTaskId);n.startTime=s.endTime;break}case"getStartDate":i=X0(void 0,$n,hr[r].raw.startTime.startData),i&&(hr[r].startTime=i);break}return hr[r].startTime&&(hr[r].endTime=A3(hr[r].startTime,$n,hr[r].raw.endTime.data,qo),hr[r].endTime&&(hr[r].processed=!0,hr[r].manualEndTime=cn(hr[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),C3(hr[r],$n,Go,Ho))),hr[r].processed};let e=!0;for(const[r,n]of hr.entries())t(r),e=e&&n.processed;return e},TR=function(t,e){let r=e;$().securityLevel!=="loose"&&(r=ti(e)),t.split(",").forEach(function(n){Da(n)!==void 0&&(N3(n,()=>{window.open(r,"_self")}),H0[n]=r)}),M3(t,"clickable")},M3=function(t,e){t.split(",").forEach(function(r){let n=Da(r);n!==void 0&&n.classes.push(e)})},ER=function(t,e,r){if($().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<n.length;s++){let a=n[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),n[s]=a}}n.length===0&&n.push(t),Da(t)!==void 0&&N3(t,()=>{ge.runFunc(e,...n)})},N3=function(t,e){q0.push(function(){const r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},Z0={parseDirective:ZO,getConfig:()=>$().gantt,clear:QO,setDateFormat:sR,getDateFormat:uR,enableInclusiveEndDates:aR,endDatesAreInclusive:oR,enableTopAxis:lR,topAxisEnabled:cR,setAxisFormat:JO,getAxisFormat:tR,setTickInterval:eR,getTickInterval:rR,setTodayMarker:nR,getTodayMarker:iR,setAccTitle:nn,getAccTitle:kn,setDiagramTitle:hi,getDiagramTitle:di,setAccDescription:wn,getAccDescription:Tn,addSection:yR,getSections:mR,getTasks:bR,addTask:kR,findTaskById:Da,addTaskOrg:wR,setIncludes:hR,getIncludes:dR,setExcludes:fR,getExcludes:pR,setClickEvent:function(t,e,r){t.split(",").forEach(function(n){ER(n,e,r)}),M3(t,"clickable")},setLink:TR,getLinks:gR,bindFunctions:function(t){q0.forEach(function(e){e(t)})},parseDuration:S3,isInvalidDate:E3};function B3(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){const s="^\\s*"+i+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[i]=!0,t.shift(1),n=!0)})}const CR=function(){B.debug("Something is calling, setConf, remove the call")};let wi;const SR={setConf:CR,draw:function(t,e,r,n){const i=$().gantt,s=$().securityLevel;let a;s==="sandbox"&&(a=St("#i"+e));const o=St(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document,u=l.getElementById(e);wi=u.parentElement.offsetWidth,wi===void 0&&(wi=1200),i.useWidth!==void 0&&(wi=i.useWidth);const d=n.db.getTasks(),f=d.length*(i.barHeight+i.barGap)+2*i.topPadding;u.setAttribute("viewBox","0 0 "+wi+" "+f);const p=o.select(`[id="${e}"]`),g=hk().domain([Wb(d,function(D){return D.startTime}),zb(d,function(D){return D.endTime})]).rangeRound([0,wi-i.leftPadding-i.rightPadding]);let b=[];for(const D of d)b.push(D.type);const k=b;b=Y(b);function T(D,w){const v=D.startTime,M=w.startTime;let m=0;return v>M?m=1:v<M&&(m=-1),m}d.sort(T),L(d,wi,f),xn(p,f,wi,i.useMaxWidth),p.append("text").text(n.db.getDiagramTitle()).attr("x",wi/2).attr("y",i.titleTopMargin).attr("class","titleText");function L(D,w,v){const M=i.barHeight,m=M+i.barGap,Q=i.topPadding,x=i.leftPadding,ct=n2().domain([0,b.length]).range(["#00B9FA","#F95002"]).interpolate(ux);I(m,Q,x,w,v,D,n.db.getExcludes(),n.db.getIncludes()),V(x,Q,w,v),E(D,m,Q,x,M,ct,w),H(m,Q),G(x,Q,w,v)}function E(D,w,v,M,m,Q,x){p.append("g").selectAll("rect").data(D).enter().append("rect").attr("x",0).attr("y",function(j,ot){return ot=j.order,ot*w+v-2}).attr("width",function(){return x-i.rightPadding/2}).attr("height",w).attr("class",function(j){for(const[ot,rt]of b.entries())if(j.type===rt)return"section section"+ot%i.numberSectionStyles;return"section section0"});const ct=p.append("g").selectAll("rect").data(D).enter(),Dt=n.db.getLinks();if(ct.append("rect").attr("id",function(j){return j.id}).attr("rx",3).attr("ry",3).attr("x",function(j){return j.milestone?g(j.startTime)+M+.5*(g(j.endTime)-g(j.startTime))-.5*m:g(j.startTime)+M}).attr("y",function(j,ot){return ot=j.order,ot*w+v}).attr("width",function(j){return j.milestone?m:g(j.renderEndTime||j.endTime)-g(j.startTime)}).attr("height",m).attr("transform-origin",function(j,ot){return ot=j.order,(g(j.startTime)+M+.5*(g(j.endTime)-g(j.startTime))).toString()+"px "+(ot*w+v+.5*m).toString()+"px"}).attr("class",function(j){const ot="task";let rt="";j.classes.length>0&&(rt=j.classes.join(" "));let nt=0;for(const[_t,K]of b.entries())j.type===K&&(nt=_t%i.numberSectionStyles);let ut="";return j.active?j.crit?ut+=" activeCrit":ut=" active":j.done?j.crit?ut=" doneCrit":ut=" done":j.crit&&(ut+=" crit"),ut.length===0&&(ut=" task"),j.milestone&&(ut=" milestone "+ut),ut+=nt,ut+=" "+rt,ot+ut}),ct.append("text").attr("id",function(j){return j.id+"-text"}).text(function(j){return j.task}).attr("font-size",i.fontSize).attr("x",function(j){let ot=g(j.startTime),rt=g(j.renderEndTime||j.endTime);j.milestone&&(ot+=.5*(g(j.endTime)-g(j.startTime))-.5*m),j.milestone&&(rt=ot+m);const nt=this.getBBox().width;return nt>rt-ot?rt+nt+1.5*i.leftPadding>x?ot+M-5:rt+M+5:(rt-ot)/2+ot+M}).attr("y",function(j,ot){return ot=j.order,ot*w+i.barHeight/2+(i.fontSize/2-2)+v}).attr("text-height",m).attr("class",function(j){const ot=g(j.startTime);let rt=g(j.endTime);j.milestone&&(rt=ot+m);const nt=this.getBBox().width;let ut="";j.classes.length>0&&(ut=j.classes.join(" "));let _t=0;for(const[Ot,P]of b.entries())j.type===P&&(_t=Ot%i.numberSectionStyles);let K="";return j.active&&(j.crit?K="activeCritText"+_t:K="activeText"+_t),j.done?j.crit?K=K+" doneCritText"+_t:K=K+" doneText"+_t:j.crit&&(K=K+" critText"+_t),j.milestone&&(K+=" milestoneText"),nt>rt-ot?rt+nt+1.5*i.leftPadding>x?ut+" taskTextOutsideLeft taskTextOutside"+_t+" "+K:ut+" taskTextOutsideRight taskTextOutside"+_t+" "+K+" width-"+nt:ut+" taskText taskText"+_t+" "+K+" width-"+nt}),$().securityLevel==="sandbox"){let j;j=St("#i"+e);const ot=j.nodes()[0].contentDocument;ct.filter(function(rt){return Dt[rt.id]!==void 0}).each(function(rt){var nt=ot.querySelector("#"+rt.id),ut=ot.querySelector("#"+rt.id+"-text");const _t=nt.parentNode;var K=ot.createElement("a");K.setAttribute("xlink:href",Dt[rt.id]),K.setAttribute("target","_top"),_t.appendChild(K),K.appendChild(nt),K.appendChild(ut)})}}function I(D,w,v,M,m,Q,x,ct){const Dt=Q.reduce((_t,{startTime:K})=>_t?Math.min(_t,K):K,0),kt=Q.reduce((_t,{endTime:K})=>_t?Math.max(_t,K):K,0),j=n.db.getDateFormat();if(!Dt||!kt)return;const ot=[];let rt=null,nt=cn(Dt);for(;nt.valueOf()<=kt;)n.db.isInvalidDate(nt,j,x,ct)?rt?rt.end=nt.clone():rt={start:nt.clone(),end:nt.clone()}:rt&&(ot.push(rt),rt=null),nt.add(1,"d");p.append("g").selectAll("rect").data(ot).enter().append("rect").attr("id",function(_t){return"exclude-"+_t.start.format("YYYY-MM-DD")}).attr("x",function(_t){return g(_t.start)+v}).attr("y",i.gridLineStartPadding).attr("width",function(_t){const K=_t.end.clone().add(1,"day");return g(K)-g(_t.start)}).attr("height",m-w-i.gridLineStartPadding).attr("transform-origin",function(_t,K){return(g(_t.start)+v+.5*(g(_t.end)-g(_t.start))).toString()+"px "+(K*D+.5*m).toString()+"px"}).attr("class","exclude-range")}function V(D,w,v,M){let m=Zb(g).tickSize(-M+w+i.gridLineStartPadding).tickFormat(Ul(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const x=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(x!==null){const ct=x[1];switch(x[2]){case"minute":m.ticks(Rl.every(ct));break;case"hour":m.ticks(Fl.every(ct));break;case"day":m.ticks(qs.every(ct));break;case"week":m.ticks(js.every(ct));break;case"month":m.ticks(Yl.every(ct));break}}if(p.append("g").attr("class","grid").attr("transform","translate("+D+", "+(M-50)+")").call(m).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let ct=Kb(g).tickSize(-M+w+i.gridLineStartPadding).tickFormat(Ul(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(x!==null){const Dt=x[1];switch(x[2]){case"minute":ct.ticks(Rl.every(Dt));break;case"hour":ct.ticks(Fl.every(Dt));break;case"day":ct.ticks(qs.every(Dt));break;case"week":ct.ticks(js.every(Dt));break;case"month":ct.ticks(Yl.every(Dt));break}}p.append("g").attr("class","grid").attr("transform","translate("+D+", "+w+")").call(ct).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function H(D,w){const v=[];let M=0;for(const[m,Q]of b.entries())v[m]=[Q,N(Q,k)];p.append("g").selectAll("text").data(v).enter().append(function(m){const Q=m[0].split(he.lineBreakRegex),x=-(Q.length-1)/2,ct=l.createElementNS("http://www.w3.org/2000/svg","text");ct.setAttribute("dy",x+"em");for(const[Dt,kt]of Q.entries()){const j=l.createElementNS("http://www.w3.org/2000/svg","tspan");j.setAttribute("alignment-baseline","central"),j.setAttribute("x","10"),Dt>0&&j.setAttribute("dy","1em"),j.textContent=kt,ct.appendChild(j)}return ct}).attr("x",10).attr("y",function(m,Q){if(Q>0)for(let x=0;x<Q;x++)return M+=v[Q-1][1],m[1]*D/2+M*D+w;else return m[1]*D/2+w}).attr("font-size",i.sectionFontSize).attr("font-size",i.sectionFontSize).attr("class",function(m){for(const[Q,x]of b.entries())if(m[0]===x)return"sectionTitle sectionTitle"+Q%i.numberSectionStyles;return"sectionTitle"})}function G(D,w,v,M){const m=n.db.getTodayMarker();if(m==="off")return;const Q=p.append("g").attr("class","today"),x=new Date,ct=Q.append("line");ct.attr("x1",g(x)+D).attr("x2",g(x)+D).attr("y1",i.titleTopMargin).attr("y2",M-i.titleTopMargin).attr("class","today"),m!==""&&ct.attr("style",m.replace(/,/g,";"))}function Y(D){const w={},v=[];for(let M=0,m=D.length;M<m;++M)Object.prototype.hasOwnProperty.call(w,D[M])||(w[D[M]]=!0,v.push(D[M]));return v}function W(D){let w=D.length;const v={};for(;w;)v[D[--w]]=(v[D[w]]||0)+1;return v}function N(D,w){return W(w)[D]||0}}};var Q0=function(){var t=function(s,a,o,l){for(o=o||{},l=s.length;l--;o[s[l]]=a);return o},e=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,o,l,u,d,f,p){switch(f.length-1,d){case 1:return u;case 4:break;case 6:u.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=o,l}},parse:function(a){var o=this,l=[0],u=[],d=[null],f=[],p=this.table,g="",b=0,k=0,T=2,L=1,E=f.slice.call(arguments,1),I=Object.create(this.lexer),V={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(V.yy[H]=this.yy[H]);I.setInput(a,V.yy),V.yy.lexer=I,V.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var G=I.yylloc;f.push(G);var Y=I.options&&I.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(){var kt;return kt=u.pop()||I.lex()||L,typeof kt!="number"&&(kt instanceof Array&&(u=kt,kt=u.pop()),kt=o.symbols_[kt]||kt),kt}for(var N,D,w,v,M={},m,Q,x,ct;;){if(D=l[l.length-1],this.defaultActions[D]?w=this.defaultActions[D]:((N===null||typeof N>"u")&&(N=W()),w=p[D]&&p[D][N]),typeof w>"u"||!w.length||!w[0]){var Dt="";ct=[];for(m in p[D])this.terminals_[m]&&m>T&&ct.push("'"+this.terminals_[m]+"'");I.showPosition?Dt="Parse error on line "+(b+1)+`:
`+I.showPosition()+`
Expecting `+ct.join(", ")+", got '"+(this.terminals_[N]||N)+"'":Dt="Parse error on line "+(b+1)+": Unexpected "+(N==L?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Dt,{text:I.match,token:this.terminals_[N]||N,line:I.yylineno,loc:G,expected:ct})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+N);switch(w[0]){case 1:l.push(N),d.push(I.yytext),f.push(I.yylloc),l.push(w[1]),N=null,k=I.yyleng,g=I.yytext,b=I.yylineno,G=I.yylloc;break;case 2:if(Q=this.productions_[w[1]][1],M.$=d[d.length-Q],M._$={first_line:f[f.length-(Q||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(Q||1)].first_column,last_column:f[f.length-1].last_column},Y&&(M._$.range=[f[f.length-(Q||1)].range[0],f[f.length-1].range[1]]),v=this.performAction.apply(M,[g,k,b,V.yy,w[1],d,f].concat(E)),typeof v<"u")return v;Q&&(l=l.slice(0,-1*Q*2),d=d.slice(0,-1*Q),f=f.slice(0,-1*Q)),l.push(this.productions_[w[1]][0]),d.push(M.$),f.push(M._$),x=p[l[l.length-2]][l[l.length-1]],l.push(x);break;case 3:return!0}}return!0}},n=function(){var s={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
`+o+"^"},test_match:function(a,o){var l,u,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),u=a[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var f in d)this[f]=d[f];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,l,u;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length;f++)if(l=this._input.match(this.rules[d[f]]),l&&(!o||l[0].length>o[0].length)){if(o=l,u=f,this.options.backtrack_lexer){if(a=this.test_match(l,d[f]),a!==!1)return a;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(a=this.test_match(o,d[u]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,u,d){switch(u){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}}};return s}();r.lexer=n;function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i}();Q0.parser=Q0;const AR=Q0;var I3="",O3=!1;const LR={setMessage:t=>{B.debug("Setting message to: "+t),I3=t},getMessage:()=>I3,setInfo:t=>{O3=t},getInfo:()=>O3,clear:vn},DR={draw:(t,e,r)=>{try{B.debug(`Rendering info diagram
`+t);const n=$().securityLevel;let i;n==="sandbox"&&(i=St("#i"+e));const a=St(n==="sandbox"?i.nodes()[0].contentDocument.body:"body").select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),a.attr("height",100),a.attr("width",400)}catch(n){B.error("Error while rendering info diagram"),B.error(n.message)}}},MR=t=>t.match(/^\s*info/)!==null;var J0=function(){var t=function(G,Y,W,N){for(W=W||{},N=G.length;N--;W[G[N]]=Y);return W},e=[1,4],r=[1,5],n=[1,6],i=[1,7],s=[1,9],a=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],d=[2,8],f=[1,18],p=[1,19],g=[1,20],b=[1,21],k=[1,22],T=[1,23],L=[1,28],E=[6,26,27,28,29],I={trace:function(){},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(Y,W,N,D,w,v,M){var m=v.length-1;switch(w){case 4:D.setShowData(!0);break;case 7:this.$=v[m-1];break;case 9:D.addSection(v[m-1],D.cleanupValue(v[m]));break;case 10:this.$=v[m].trim(),D.setDiagramTitle(this.$);break;case 11:this.$=v[m].trim(),D.setAccTitle(this.$);break;case 12:case 13:this.$=v[m].trim(),D.setAccDescription(this.$);break;case 14:D.addSection(v[m].substr(8)),this.$=v[m].substr(8);break;case 21:D.parseDirective("%%{","open_directive");break;case 22:D.parseDirective(v[m],"type_directive");break;case 23:v[m]=v[m].trim().replace(/'/g,'"'),D.parseDirective(v[m],"arg_directive");break;case 24:D.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:s},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:s},{3:11,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:s},t(a,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(u,d,{21:8,9:16,10:17,5:24,1:[2,3],11:f,13:p,15:g,17:b,19:k,20:T,29:s}),t(a,o,{7:25}),{23:26,24:[1,27],32:L},t([24,32],[2,22]),t(a,[2,6]),{4:29,26:r,27:n,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,d,{21:8,9:16,10:17,5:24,1:[2,4],11:f,13:p,15:g,17:b,19:k,20:T,29:s}),t(E,[2,16]),{25:34,31:[1,35]},t(E,[2,24]),t(a,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:L},{32:[2,23]},t(E,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(Y,W){if(W.recoverable)this.trace(Y);else{var N=new Error(Y);throw N.hash=W,N}},parse:function(Y){var W=this,N=[0],D=[],w=[null],v=[],M=this.table,m="",Q=0,x=0,ct=2,Dt=1,kt=v.slice.call(arguments,1),j=Object.create(this.lexer),ot={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(ot.yy[rt]=this.yy[rt]);j.setInput(Y,ot.yy),ot.yy.lexer=j,ot.yy.parser=this,typeof j.yylloc>"u"&&(j.yylloc={});var nt=j.yylloc;v.push(nt);var ut=j.options&&j.options.ranges;typeof ot.yy.parseError=="function"?this.parseError=ot.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(){var ht;return ht=D.pop()||j.lex()||Dt,typeof ht!="number"&&(ht instanceof Array&&(D=ht,ht=D.pop()),ht=W.symbols_[ht]||ht),ht}for(var K,Ot,P,z,X={},F,O,A,J;;){if(Ot=N[N.length-1],this.defaultActions[Ot]?P=this.defaultActions[Ot]:((K===null||typeof K>"u")&&(K=_t()),P=M[Ot]&&M[Ot][K]),typeof P>"u"||!P.length||!P[0]){var C="";J=[];for(F in M[Ot])this.terminals_[F]&&F>ct&&J.push("'"+this.terminals_[F]+"'");j.showPosition?C="Parse error on line "+(Q+1)+`:
`+j.showPosition()+`
Expecting `+J.join(", ")+", got '"+(this.terminals_[K]||K)+"'":C="Parse error on line "+(Q+1)+": Unexpected "+(K==Dt?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(C,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:nt,expected:J})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ot+", token: "+K);switch(P[0]){case 1:N.push(K),w.push(j.yytext),v.push(j.yylloc),N.push(P[1]),K=null,x=j.yyleng,m=j.yytext,Q=j.yylineno,nt=j.yylloc;break;case 2:if(O=this.productions_[P[1]][1],X.$=w[w.length-O],X._$={first_line:v[v.length-(O||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(O||1)].first_column,last_column:v[v.length-1].last_column},ut&&(X._$.range=[v[v.length-(O||1)].range[0],v[v.length-1].range[1]]),z=this.performAction.apply(X,[m,x,Q,ot.yy,P[1],w,v].concat(kt)),typeof z<"u")return z;O&&(N=N.slice(0,-1*O*2),w=w.slice(0,-1*O),v=v.slice(0,-1*O)),N.push(this.productions_[P[1]][0]),w.push(X.$),v.push(X._$),A=M[N[N.length-2]][N[N.length-1]],N.push(A);break;case 3:return!0}}return!0}},V=function(){var G={EOF:1,parseError:function(W,N){if(this.yy.parser)this.yy.parser.parseError(W,N);else throw new Error(W)},setInput:function(Y,W){return this.yy=W||this.yy||{},this._input=Y,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 Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var W=Y.match(/(?:\r\n?|\n).*/g);return W?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},unput:function(Y){var W=Y.length,N=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-W),this.offset-=W;var D=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===D.length?this.yylloc.first_column:0)+D[D.length-N.length].length-N[0].length:this.yylloc.first_column-W},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-W]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Y){this.unput(this.match.slice(Y))},pastInput:function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Y=this.pastInput(),W=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+`
`+W+"^"},test_match:function(Y,W){var N,D,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),D=Y[0].match(/(?:\r\n?|\n).*/g),D&&(this.yylineno+=D.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,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(Y[0].length),this.matched+=Y[0],N=this.performAction.call(this,this.yy,this,W,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var v in w)this[v]=w[v];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,W,N,D;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),v=0;v<w.length;v++)if(N=this._input.match(this.rules[w[v]]),N&&(!W||N[0].length>W[0].length)){if(W=N,D=v,this.options.backtrack_lexer){if(Y=this.test_match(N,w[v]),Y!==!1)return Y;if(this._backtrack){W=!1;continue}else return!1}else if(!this.options.flex)break}return W?(Y=this.test_match(W,w[D]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var W=this.next();return W||this.lex()},begin:function(W){this.conditionStack.push(W)},popState:function(){var W=this.conditionStack.length-1;return W>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(W){return W=this.conditionStack.length-1-Math.abs(W||0),W>=0?this.conditionStack[W]:"INITIAL"},pushState:function(W){this.begin(W)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(W,N,D,w){switch(D){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:break;case 6:break;case 7:return 26;case 8:break;case 9:break;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:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();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}}};return G}();I.lexer=V;function H(){this.yy={}}return H.prototype=I,I.Parser=H,new H}();J0.parser=J0;const NR=J0,BR=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let Cu={},td=!1;const IR={parseDirective:function(t,e,r){ze.parseDirective(this,t,e,r)},getConfig:()=>$().pie,addSection:function(t,e){t=he.sanitizeText(t,$()),Cu[t]===void 0&&(Cu[t]=e,B.debug("Added new section :",t))},getSections:()=>Cu,cleanupValue:function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},clear:function(){Cu={},td=!1,vn()},setAccTitle:nn,getAccTitle:kn,setDiagramTitle:hi,getDiagramTitle:di,setShowData:function(t){td=t},getShowData:function(){return td},getAccDescription:Tn,setAccDescription:wn};let Ti=$(),Ei;const jo=450,OR={draw:(t,e,r,n)=>{try{Ti=$(),B.debug(`Rendering info diagram
`+t);const E=$().securityLevel;let I;E==="sandbox"&&(I=St("#i"+e));const V=St(E==="sandbox"?I.nodes()[0].contentDocument.body:"body"),H=E==="sandbox"?I.nodes()[0].contentDocument:document;n.db.clear(),n.parser.parse(t),B.debug("Parsed info diagram");const G=H.getElementById(e);Ei=G.parentElement.offsetWidth,Ei===void 0&&(Ei=1200),Ti.useWidth!==void 0&&(Ei=Ti.useWidth),Ti.pie.useWidth!==void 0&&(Ei=Ti.pie.useWidth);const Y=V.select("#"+e);xn(Y,jo,Ei,Ti.pie.useMaxWidth),G.setAttribute("viewBox","0 0 "+Ei+" "+jo);var i=40,s=18,a=4,o=Math.min(Ei,jo)/2-i,l=Y.append("g").attr("transform","translate("+Ei/2+","+jo/2+")"),u=n.db.getSections(),d=0;Object.keys(u).forEach(function(N){d+=u[N]});const W=Ti.themeVariables;var f=[W.pie1,W.pie2,W.pie3,W.pie4,W.pie5,W.pie6,W.pie7,W.pie8,W.pie9,W.pie10,W.pie11,W.pie12],p=Jf().range(f),g=Object.entries(u).map(function(N,D){return{order:D,name:N[0],value:N[1]}}),b=Tk().value(function(N){return N.value}).sort(function(N,D){return N.order-D.order}),k=b(g),T=jh().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(k).enter().append("path").attr("d",T).attr("fill",function(N){return p(N.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(k).enter().append("text").text(function(N){return(N.data.value/d*100).toFixed(0)+"%"}).attr("transform",function(N){return"translate("+T.centroid(N)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.db.getDiagramTitle()).attr("x",0).attr("y",-(jo-50)/2).attr("class","pieTitleText");var L=l.selectAll(".legend").data(p.domain()).enter().append("g").attr("class","legend").attr("transform",function(N,D){const w=s+a,v=w*p.domain().length/2,M=12*s,m=D*w-v;return"translate("+M+","+m+")"});L.append("rect").attr("width",s).attr("height",s).style("fill",p).style("stroke",p),L.data(k).append("text").attr("x",s+a).attr("y",s-a).text(function(N){return n.db.getShowData()||Ti.showData||Ti.pie.showData?N.data.name+" ["+N.data.value+"]":N.data.name})}catch(E){B.error("Error while rendering info diagram"),B.error(E)}}};var ed=function(){var t=function(Ot,P,z,X){for(z=z||{},X=Ot.length;X--;z[Ot[X]]=P);return z},e=[1,3],r=[1,5],n=[1,6],i=[1,7],s=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],u=[1,26],d=[1,27],f=[1,28],p=[1,29],g=[1,30],b=[1,31],k=[1,24],T=[1,32],L=[1,33],E=[1,36],I=[71,72],V=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],H=[1,56],G=[1,57],Y=[1,58],W=[1,59],N=[1,60],D=[1,61],w=[1,62],v=[62,63],M=[1,74],m=[1,70],Q=[1,71],x=[1,72],ct=[1,73],Dt=[1,75],kt=[1,79],j=[1,80],ot=[1,77],rt=[1,78],nt=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ut={trace:function(){},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(P,z,X,F,O,A,J){var C=A.length-1;switch(O){case 6:this.$=A[C].trim(),F.setAccTitle(this.$);break;case 7:case 8:this.$=A[C].trim(),F.setAccDescription(this.$);break;case 9:F.parseDirective("%%{","open_directive");break;case 10:F.parseDirective(A[C],"type_directive");break;case 11:A[C]=A[C].trim().replace(/'/g,'"'),F.parseDirective(A[C],"arg_directive");break;case 12:F.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:F.addRequirement(A[C-3],A[C-4]);break;case 20:F.setNewReqId(A[C-2]);break;case 21:F.setNewReqText(A[C-2]);break;case 22:F.setNewReqRisk(A[C-2]);break;case 23:F.setNewReqVerifyMethod(A[C-2]);break;case 26:this.$=F.RequirementType.REQUIREMENT;break;case 27:this.$=F.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=F.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=F.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=F.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=F.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=F.RiskLevel.LOW_RISK;break;case 33:this.$=F.RiskLevel.MED_RISK;break;case 34:this.$=F.RiskLevel.HIGH_RISK;break;case 35:this.$=F.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=F.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=F.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=F.VerifyType.VERIFY_TEST;break;case 39:F.addElement(A[C-3]);break;case 40:F.setNewElementType(A[C-2]);break;case 41:F.setNewElementDocRef(A[C-2]);break;case 44:F.addRelationship(A[C-2],A[C],A[C-4]);break;case 45:F.addRelationship(A[C-2],A[C-4],A[C]);break;case 46:this.$=F.Relationships.CONTAINS;break;case 47:this.$=F.Relationships.COPIES;break;case 48:this.$=F.Relationships.DERIVES;break;case 49:this.$=F.Relationships.SATISFIES;break;case 50:this.$=F.Relationships.VERIFIES;break;case 51:this.$=F.Relationships.REFINES;break;case 52:this.$=F.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:r,16:n,18:i,19:s},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:r,16:n,18:i,19:s},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:r,16:n,18:i,19:s},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:r,16:n,18:i,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:b,53:k,71:T,72:L},{11:34,12:[1,35],22:E},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:r,16:n,18:i,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:b,53:k,71:T,72:L},{4:21,5:o,7:39,8:l,9:4,14:r,16:n,18:i,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:b,53:k,71:T,72:L},{4:21,5:o,7:40,8:l,9:4,14:r,16:n,18:i,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:b,53:k,71:T,72:L},{4:21,5:o,7:41,8:l,9:4,14:r,16:n,18:i,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:b,53:k,71:T,72:L},{4:21,5:o,7:42,8:l,9:4,14:r,16:n,18:i,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:b,53:k,71:T,72:L},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,30]),t(I,[2,31]),t(V,[2,55]),t(V,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[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:H,65:G,66:Y,67:W,68:N,69:D,70:w},{61:63,64:H,65:G,66:Y,67:W,68:N,69:D,70:w},{11:64,22:E},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(v,[2,46]),t(v,[2,47]),t(v,[2,48]),t(v,[2,49]),t(v,[2,50]),t(v,[2,51]),t(v,[2,52]),{63:[1,68]},t(a,[2,5]),{5:M,29:69,30:m,33:Q,35:x,37:ct,39:Dt},{5:kt,39:j,55:76,56:ot,58:rt},{32:81,71:T,72:L},{32:82,71:T,72:L},t(nt,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:M,29:87,30:m,33:Q,35:x,37:ct,39:Dt},t(nt,[2,25]),t(nt,[2,39]),{31:[1,88]},{31:[1,89]},{5:kt,39:j,55:90,56:ot,58:rt},t(nt,[2,43]),t(nt,[2,44]),t(nt,[2,45]),{32:91,71:T,72:L},{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]},t(nt,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(nt,[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:M,29:116,30:m,33:Q,35:x,37:ct,39:Dt},{5:M,29:117,30:m,33:Q,35:x,37:ct,39:Dt},{5:M,29:118,30:m,33:Q,35:x,37:ct,39:Dt},{5:M,29:119,30:m,33:Q,35:x,37:ct,39:Dt},{5:kt,39:j,55:120,56:ot,58:rt},{5:kt,39:j,55:121,56:ot,58:rt},t(nt,[2,20]),t(nt,[2,21]),t(nt,[2,22]),t(nt,[2,23]),t(nt,[2,40]),t(nt,[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(P,z){if(z.recoverable)this.trace(P);else{var X=new Error(P);throw X.hash=z,X}},parse:function(P){var z=this,X=[0],F=[],O=[null],A=[],J=this.table,C="",ht=0,U=0,Yt=2,et=1,Mt=A.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(P,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;A.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=z.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
`+Tt.showPosition()+`
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[le]||le)+"'":xt="Parse error on line "+(ht+1)+": Unexpected "+(le==et?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(xt,{text:Tt.match,token:this.terminals_[le]||le,line:Tt.yylineno,loc:wt,expected:Ft})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+le);switch(jt[0]){case 1:X.push(le),O.push(Tt.yytext),A.push(Tt.yylloc),X.push(jt[1]),le=null,U=Tt.yyleng,C=Tt.yytext,ht=Tt.yylineno,wt=Tt.yylloc;break;case 2:if(Ht=this.productions_[jt[1]][1],Gt.$=O[O.length-Ht],Gt._$={first_line:A[A.length-(Ht||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(Ht||1)].first_column,last_column:A[A.length-1].last_column},pt&&(Gt._$.range=[A[A.length-(Ht||1)].range[0],A[A.length-1].range[1]]),Kt=this.performAction.apply(Gt,[C,U,ht,gt.yy,jt[1],O,A].concat(Mt)),typeof Kt<"u")return Kt;Ht&&(X=X.slice(0,-1*Ht*2),O=O.slice(0,-1*Ht),A=A.slice(0,-1*Ht)),X.push(this.productions_[jt[1]][0]),O.push(Gt.$),A.push(Gt._$),Vt=J[X[X.length-2]][X[X.length-1]],X.push(Vt);break;case 3:return!0}}return!0}},_t=function(){var Ot={EOF:1,parseError:function(z,X){if(this.yy.parser)this.yy.parser.parseError(z,X);else throw new Error(z)},setInput:function(P,z){return this.yy=z||this.yy||{},this._input=P,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var z=P.match(/(?:\r\n?|\n).*/g);return z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),P},unput:function(P){var z=P.length,X=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z),this.offset-=z;var F=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),X.length-1&&(this.yylineno-=X.length-1);var O=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:X?(X.length===F.length?this.yylloc.first_column:0)+F[F.length-X.length].length-X[0].length:this.yylloc.first_column-z},this.options.ranges&&(this.yylloc.range=[O[0],O[0]+this.yyleng-z]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(P){this.unput(this.match.slice(P))},pastInput:function(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var P=this.match;return P.length<20&&(P+=this._input.substr(0,20-P.length)),(P.substr(0,20)+(P.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var P=this.pastInput(),z=new Array(P.length+1).join("-");return P+this.upcomingInput()+`
`+z+"^"},test_match:function(P,z){var X,F,O;if(this.options.backtrack_lexer&&(O={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&&(O.yylloc.range=this.yylloc.range.slice(0))),F=P[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+P[0].length},this.yytext+=P[0],this.match+=P[0],this.matches=P,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(P[0].length),this.matched+=P[0],X=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var A in O)this[A]=O[A];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var P,z,X,F;this._more||(this.yytext="",this.match="");for(var O=this._currentRules(),A=0;A<O.length;A++)if(X=this._input.match(this.rules[O[A]]),X&&(!z||X[0].length>z[0].length)){if(z=X,F=A,this.options.backtrack_lexer){if(P=this.test_match(X,O[A]),P!==!1)return P;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(P=this.test_match(z,O[F]),P!==!1?P:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var z=this.next();return z||this.lex()},begin:function(z){this.conditionStack.push(z)},popState:function(){var z=this.conditionStack.length-1;return z>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(z){return z=this.conditionStack.length-1-Math.abs(z||0),z>=0?this.conditionStack[z]:"INITIAL"},pushState:function(z){this.begin(z)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(z,X,F,O){switch(F){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:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;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 53:this.popState();break;case 54:return"qString";case 55:return X.yytext=X.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}}};return Ot}();ut.lexer=_t;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();ed.parser=ed;const RR=ed,FR=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let rd=[],Ur={},$o={},qi={},Xo={};const PR={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(t,e,r){ze.parseDirective(this,t,e,r)},getConfig:()=>$().req,addRequirement:(t,e)=>($o[t]===void 0&&($o[t]={name:t,type:e,id:Ur.id,text:Ur.text,risk:Ur.risk,verifyMethod:Ur.verifyMethod}),Ur={},$o[t]),getRequirements:()=>$o,setNewReqId:t=>{Ur!==void 0&&(Ur.id=t)},setNewReqText:t=>{Ur!==void 0&&(Ur.text=t)},setNewReqRisk:t=>{Ur!==void 0&&(Ur.risk=t)},setNewReqVerifyMethod:t=>{Ur!==void 0&&(Ur.verifyMethod=t)},setAccTitle:nn,getAccTitle:kn,setAccDescription:wn,getAccDescription:Tn,addElement:t=>(Xo[t]===void 0&&(Xo[t]={name:t,type:qi.type,docRef:qi.docRef},B.info("Added new requirement: ",t)),qi={},Xo[t]),getElements:()=>Xo,setNewElementType:t=>{qi!==void 0&&(qi.type=t)},setNewElementDocRef:t=>{qi!==void 0&&(qi.docRef=t)},addRelationship:(t,e,r)=>{rd.push({type:t,src:e,dst:r})},getRelationships:()=>rd,clear:()=>{rd=[],Ur={},$o={},qi={},Xo={},vn()}},nd={CONTAINS:"contains",ARROW:"arrow"},R3={ReqMarkers:nd,insertLineEndings:(t,e)=>{let r=t.append("defs").append("marker").attr("id",nd.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",nd.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
L${e.line_height},${e.line_height/2}
M${e.line_height},${e.line_height/2}
L0,${e.line_height}`).attr("stroke-width",1)}};let qe={},F3=0;const P3=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",qe.rect_min_width+"px").attr("height",qe.rect_min_height+"px"),Y3=(t,e,r)=>{let n=qe.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",qe.rect_padding).attr("dominant-baseline","hanging"),s=0;r.forEach(u=>{s==0?i.append("tspan").attr("text-anchor","middle").attr("x",qe.rect_min_width/2).attr("dy",0).text(u):i.append("tspan").attr("text-anchor","middle").attr("x",qe.rect_min_width/2).attr("dy",qe.line_height*.75).text(u),s++});let a=1.5*qe.rect_padding,o=s*qe.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",qe.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:i,y:l}},V3=(t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",qe.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0;const a=30;let o=[];return r.forEach(l=>{let u=l.length;for(;u>a&&s<3;){let d=l.substring(0,a);l=l.substring(a,l.length),u=l.length,o[o.length]=d,s++}if(s==3){let d=o[o.length-1];o[o.length-1]=d.substring(0,d.length-4)+"..."}else o[o.length]=l;s=0}),o.forEach(l=>{i.append("tspan").attr("x",qe.rect_padding).attr("dy",qe.line_height).text(l)}),i},YR=(t,e,r,n)=>{const i=e.node().getTotalLength(),s=e.node().getPointAtLength(i*.5),a="rel"+F3;F3++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},VR=function(t,e,r,n,i){const s=r.edge(Ma(e.src),Ma(e.dst)),a=Js().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?o.attr("marker-start","url("+he.getUrl(qe.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+he.getUrl(qe.arrowMarkerAbsolute)+"#"+R3.ReqMarkers.ARROW+"_line_ending)")),YR(t,o,qe,`<<${e.type}>>`)},UR=(t,e,r)=>{Object.keys(t).forEach(n=>{let i=t[n];n=Ma(n),B.info("Added new requirement: ",n);const s=r.append("g").attr("id",n),a="req-"+n,o=P3(s,a);let l=Y3(s,n+"_title",[`<<${i.type}>>`,`${i.name}`]);V3(s,n+"_body",[`Id: ${i.id}`,`Text: ${i.text}`,`Risk: ${i.risk}`,`Verification: ${i.verifyMethod}`],l.y);const u=o.node().getBBox();e.setNode(n,{width:u.width,height:u.height,shape:"rect",id:n})})},zR=(t,e,r)=>{Object.keys(t).forEach(n=>{let i=t[n];const s=Ma(n),a=r.append("g").attr("id",s),o="element-"+s,l=P3(a,o);let u=Y3(a,o+"_title",["<<Element>>",`${n}`]);V3(a,o+"_body",[`Type: ${i.type||"Not Specified"}`,`Doc Ref: ${i.docRef||"None"}`],u.y);const d=l.node().getBBox();e.setNode(s,{width:d.width,height:d.height,shape:"rect",id:s})})},WR=(t,e)=>(t.forEach(function(r){let n=Ma(r.src),i=Ma(r.dst);e.setEdge(n,i,{relationship:r})}),t),HR=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},Ma=t=>t.replace(/\s/g,"").replace(/\./g,"_"),GR={draw:(t,e,r,n)=>{qe=$().requirement,n.db.clear(),n.parser.parse(t);const i=qe.securityLevel;let s;i==="sandbox"&&(s=St("#i"+e));const o=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);R3.insertLineEndings(o,qe);const l=new sr({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:qe.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=n.db.getRequirements(),d=n.db.getElements(),f=n.db.getRelationships();UR(u,l,o),zR(d,l,o),WR(f,l),Ea(l),HR(o,l),f.forEach(function(T){VR(o,T,l,e,n)});const p=qe.rect_padding,g=o.node().getBBox(),b=g.width+p*2,k=g.height+p*2;xn(o,k,b,qe.useMaxWidth),o.attr("viewBox",`${g.x-p} ${g.y-p} ${b} ${k}`)}};var id=function(){var t=function(Ot,P,z,X){for(z=z||{},X=Ot.length;X--;z[Ot[X]]=P);return z},e=[1,2],r=[1,3],n=[1,5],i=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,18],u=[1,19],d=[1,21],f=[1,22],p=[1,23],g=[1,29],b=[1,30],k=[1,31],T=[1,32],L=[1,33],E=[1,34],I=[1,35],V=[1,36],H=[1,37],G=[1,38],Y=[1,39],W=[1,40],N=[1,43],D=[1,44],w=[1,45],v=[1,46],M=[1,47],m=[1,48],Q=[1,51],x=[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],ct=[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],Dt=[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],kt=[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],j=[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],ot=[67,68,69],rt=[1,121],nt=[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],ut={trace:function(){},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(P,z,X,F,O,A,J){var C=A.length-1;switch(O){case 4:return F.apply(A[C]),A[C];case 5:this.$=[];break;case 6:A[C-1].push(A[C]),this.$=A[C-1];break;case 7:case 8:this.$=A[C];break;case 9:this.$=[];break;case 12:A[C-3].type="addParticipant",A[C-3].description=F.parseMessage(A[C-1]),this.$=A[C-3];break;case 13:A[C-1].type="addParticipant",this.$=A[C-1];break;case 14:A[C-3].type="addActor",A[C-3].description=F.parseMessage(A[C-1]),this.$=A[C-3];break;case 15:A[C-1].type="addActor",this.$=A[C-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(A[C-2]),sequenceIndexStep:Number(A[C-1]),sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(A[C-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:F.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:F.LINETYPE.ACTIVE_START,actor:A[C-1]};break;case 22:this.$={type:"activeEnd",signalType:F.LINETYPE.ACTIVE_END,actor:A[C-1]};break;case 28:F.setDiagramTitle(A[C].substring(6)),this.$=A[C].substring(6);break;case 29:F.setDiagramTitle(A[C].substring(7)),this.$=A[C].substring(7);break;case 30:this.$=A[C].trim(),F.setAccTitle(this.$);break;case 31:case 32:this.$=A[C].trim(),F.setAccDescription(this.$);break;case 33:A[C-1].unshift({type:"loopStart",loopText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.LOOP_START}),A[C-1].push({type:"loopEnd",loopText:A[C-2],signalType:F.LINETYPE.LOOP_END}),this.$=A[C-1];break;case 34:A[C-1].unshift({type:"rectStart",color:F.parseMessage(A[C-2]),signalType:F.LINETYPE.RECT_START}),A[C-1].push({type:"rectEnd",color:F.parseMessage(A[C-2]),signalType:F.LINETYPE.RECT_END}),this.$=A[C-1];break;case 35:A[C-1].unshift({type:"optStart",optText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.OPT_START}),A[C-1].push({type:"optEnd",optText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.OPT_END}),this.$=A[C-1];break;case 36:A[C-1].unshift({type:"altStart",altText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.ALT_START}),A[C-1].push({type:"altEnd",signalType:F.LINETYPE.ALT_END}),this.$=A[C-1];break;case 37:A[C-1].unshift({type:"parStart",parText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.PAR_START}),A[C-1].push({type:"parEnd",signalType:F.LINETYPE.PAR_END}),this.$=A[C-1];break;case 38:A[C-1].unshift({type:"criticalStart",criticalText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.CRITICAL_START}),A[C-1].push({type:"criticalEnd",signalType:F.LINETYPE.CRITICAL_END}),this.$=A[C-1];break;case 39:A[C-1].unshift({type:"breakStart",breakText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.BREAK_START}),A[C-1].push({type:"breakEnd",optText:F.parseMessage(A[C-2]),signalType:F.LINETYPE.BREAK_END}),this.$=A[C-1];break;case 42:this.$=A[C-3].concat([{type:"option",optionText:F.parseMessage(A[C-1]),signalType:F.LINETYPE.CRITICAL_OPTION},A[C]]);break;case 44:this.$=A[C-3].concat([{type:"and",parText:F.parseMessage(A[C-1]),signalType:F.LINETYPE.PAR_AND},A[C]]);break;case 46:this.$=A[C-3].concat([{type:"else",altText:F.parseMessage(A[C-1]),signalType:F.LINETYPE.ALT_ELSE},A[C]]);break;case 47:this.$=[A[C-1],{type:"addNote",placement:A[C-2],actor:A[C-1].actor,text:A[C]}];break;case 48:A[C-2]=[].concat(A[C-1],A[C-1]).slice(0,2),A[C-2][0]=A[C-2][0].actor,A[C-2][1]=A[C-2][1].actor,this.$=[A[C-1],{type:"addNote",placement:F.PLACEMENT.OVER,actor:A[C-2].slice(0,2),text:A[C]}];break;case 49:this.$=[A[C-1],{type:"addLinks",actor:A[C-1].actor,text:A[C]}];break;case 50:this.$=[A[C-1],{type:"addALink",actor:A[C-1].actor,text:A[C]}];break;case 51:this.$=[A[C-1],{type:"addProperties",actor:A[C-1].actor,text:A[C]}];break;case 52:this.$=[A[C-1],{type:"addDetails",actor:A[C-1].actor,text:A[C]}];break;case 55:this.$=[A[C-2],A[C]];break;case 56:this.$=A[C];break;case 57:this.$=F.PLACEMENT.LEFTOF;break;case 58:this.$=F.PLACEMENT.RIGHTOF;break;case 59:this.$=[A[C-4],A[C-1],{type:"addMessage",from:A[C-4].actor,to:A[C-1].actor,signalType:A[C-3],msg:A[C]},{type:"activeStart",signalType:F.LINETYPE.ACTIVE_START,actor:A[C-1]}];break;case 60:this.$=[A[C-4],A[C-1],{type:"addMessage",from:A[C-4].actor,to:A[C-1].actor,signalType:A[C-3],msg:A[C]},{type:"activeEnd",signalType:F.LINETYPE.ACTIVE_END,actor:A[C-4]}];break;case 61:this.$=[A[C-3],A[C-1],{type:"addMessage",from:A[C-3].actor,to:A[C-1].actor,signalType:A[C-2],msg:A[C]}];break;case 62:this.$={type:"addParticipant",actor:A[C]};break;case 63:this.$=F.LINETYPE.SOLID_OPEN;break;case 64:this.$=F.LINETYPE.DOTTED_OPEN;break;case 65:this.$=F.LINETYPE.SOLID;break;case 66:this.$=F.LINETYPE.DOTTED;break;case 67:this.$=F.LINETYPE.SOLID_CROSS;break;case 68:this.$=F.LINETYPE.DOTTED_CROSS;break;case 69:this.$=F.LINETYPE.SOLID_POINT;break;case 70:this.$=F.LINETYPE.DOTTED_POINT;break;case 71:this.$=F.parseMessage(A[C].trim().substring(1));break;case 72:F.parseDirective("%%{","open_directive");break;case 73:F.parseDirective(A[C],"type_directive");break;case 74:A[C]=A[C].trim().replace(/'/g,'"'),F.parseDirective(A[C],"arg_directive");break;case 75:F.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:r,6:4,7:n,11:6,79:i},{1:[3]},{3:8,4:e,5:r,6:4,7:n,11:6,79:i},{3:9,4:e,5:r,6:4,7:n,11:6,79:i},{3:10,4:e,5:r,6:4,7:n,11:6,79:i},t([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],s,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,41:I,42:V,43:H,45:G,47:Y,49:W,53:N,58:D,59:w,60:v,61:M,69:m,79:i},{13:49,14:[1,50],82:Q},t([14,82],[2,73]),t(x,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,41:I,42:V,43:H,45:G,47:Y,49:W,53:N,58:D,59:w,60:v,61:M,69:m,79:i},t(x,[2,8]),t(x,[2,9]),{17:53,69:m},{17:54,69:m},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:m},{17:60,69:m},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},t(x,[2,28]),t(x,[2,29]),{35:[1,66]},{37:[1,67]},t(x,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},t(x,[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:m},{17:89,69:m},{17:90,69:m},{17:91,69:m},t([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]},t(x,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},t(x,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},t(x,[2,20]),{5:[1,102]},{5:[1,103]},t(x,[2,23]),t(x,[2,24]),t(x,[2,25]),t(x,[2,26]),t(x,[2,27]),t(x,[2,30]),t(x,[2,31]),t(ct,s,{8:104}),t(ct,s,{8:105}),t(ct,s,{8:106}),t(Dt,s,{44:107,8:108}),t(kt,s,{46:109,8:110}),t(j,s,{48:111,8:112}),t(ct,s,{8:113}),{17:116,67:[1,114],68:[1,115],69:m},t(ot,[2,63]),t(ot,[2,64]),t(ot,[2,65]),t(ot,[2,66]),t(ot,[2,67]),t(ot,[2,68]),t(ot,[2,69]),t(ot,[2,70]),{17:117,69:m},{17:119,57:118,69:m},{69:[2,57]},{69:[2,58]},{55:120,78:rt},{55:122,78:rt},{55:123,78:rt},{55:124,78:rt},t(nt,[2,10]),{13:125,82:Q},{82:[2,74]},{19:[1,126]},t(x,[2,13]),{19:[1,127]},t(x,[2,15]),{5:[1,128]},t(x,[2,18]),t(x,[2,19]),t(x,[2,21]),t(x,[2,22]),{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,40:[1,129],41:I,42:V,43:H,45:G,47:Y,49:W,53:N,58:D,59:w,60:v,61:M,69:m,79:i},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,40:[1,130],41:I,42:V,43:H,45:G,47:Y,49:W,53:N,58:D,59:w,60:v,61:M,69:m,79:i},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,40:[1,131],41:I,42:V,43:H,45:G,47:Y,49:W,53:N,58:D,59:w,60:v,61:M,69:m,79:i},{40:[1,132]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,40:[2,45],41:I,42:V,43:H,45:G,47:Y,49:W,52:[1,133],53:N,58:D,59:w,60:v,61:M,69:m,79:i},{40:[1,134]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,40:[2,43],41:I,42:V,43:H,45:G,47:Y,49:W,51:[1,135],53:N,58:D,59:w,60:v,61:M,69:m,79:i},{40:[1,136]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,40:[2,41],41:I,42:V,43:H,45:G,47:Y,49:W,50:[1,137],53:N,58:D,59:w,60:v,61:M,69:m,79:i},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:b,34:k,36:T,38:L,39:E,40:[1,138],41:I,42:V,43:H,45:G,47:Y,49:W,53:N,58:D,59:w,60:v,61:M,69:m,79:i},{17:139,69:m},{17:140,69:m},{55:141,78:rt},{55:142,78:rt},{55:143,78:rt},{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]},t(x,[2,17]),t(x,[2,33]),t(x,[2,34]),t(x,[2,35]),t(x,[2,36]),{19:[1,148]},t(x,[2,37]),{19:[1,149]},t(x,[2,38]),{19:[1,150]},t(x,[2,39]),{55:151,78:rt},{55:152,78:rt},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:m},t(nt,[2,11]),t(x,[2,12]),t(x,[2,14]),t(Dt,s,{8:108,44:154}),t(kt,s,{8:110,46:155}),t(j,s,{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(P,z){if(z.recoverable)this.trace(P);else{var X=new Error(P);throw X.hash=z,X}},parse:function(P){var z=this,X=[0],F=[],O=[null],A=[],J=this.table,C="",ht=0,U=0,Yt=2,et=1,Mt=A.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(P,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;A.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=z.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
`+Tt.showPosition()+`
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[le]||le)+"'":xt="Parse error on line "+(ht+1)+": Unexpected "+(le==et?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(xt,{text:Tt.match,token:this.terminals_[le]||le,line:Tt.yylineno,loc:wt,expected:Ft})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+le);switch(jt[0]){case 1:X.push(le),O.push(Tt.yytext),A.push(Tt.yylloc),X.push(jt[1]),le=null,U=Tt.yyleng,C=Tt.yytext,ht=Tt.yylineno,wt=Tt.yylloc;break;case 2:if(Ht=this.productions_[jt[1]][1],Gt.$=O[O.length-Ht],Gt._$={first_line:A[A.length-(Ht||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(Ht||1)].first_column,last_column:A[A.length-1].last_column},pt&&(Gt._$.range=[A[A.length-(Ht||1)].range[0],A[A.length-1].range[1]]),Kt=this.performAction.apply(Gt,[C,U,ht,gt.yy,jt[1],O,A].concat(Mt)),typeof Kt<"u")return Kt;Ht&&(X=X.slice(0,-1*Ht*2),O=O.slice(0,-1*Ht),A=A.slice(0,-1*Ht)),X.push(this.productions_[jt[1]][0]),O.push(Gt.$),A.push(Gt._$),Vt=J[X[X.length-2]][X[X.length-1]],X.push(Vt);break;case 3:return!0}}return!0}},_t=function(){var Ot={EOF:1,parseError:function(z,X){if(this.yy.parser)this.yy.parser.parseError(z,X);else throw new Error(z)},setInput:function(P,z){return this.yy=z||this.yy||{},this._input=P,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var z=P.match(/(?:\r\n?|\n).*/g);return z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),P},unput:function(P){var z=P.length,X=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z),this.offset-=z;var F=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),X.length-1&&(this.yylineno-=X.length-1);var O=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:X?(X.length===F.length?this.yylloc.first_column:0)+F[F.length-X.length].length-X[0].length:this.yylloc.first_column-z},this.options.ranges&&(this.yylloc.range=[O[0],O[0]+this.yyleng-z]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(P){this.unput(this.match.slice(P))},pastInput:function(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var P=this.match;return P.length<20&&(P+=this._input.substr(0,20-P.length)),(P.substr(0,20)+(P.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var P=this.pastInput(),z=new Array(P.length+1).join("-");return P+this.upcomingInput()+`
`+z+"^"},test_match:function(P,z){var X,F,O;if(this.options.backtrack_lexer&&(O={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&&(O.yylloc.range=this.yylloc.range.slice(0))),F=P[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+P[0].length},this.yytext+=P[0],this.match+=P[0],this.matches=P,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(P[0].length),this.matched+=P[0],X=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var A in O)this[A]=O[A];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var P,z,X,F;this._more||(this.yytext="",this.match="");for(var O=this._currentRules(),A=0;A<O.length;A++)if(X=this._input.match(this.rules[O[A]]),X&&(!z||X[0].length>z[0].length)){if(z=X,F=A,this.options.backtrack_lexer){if(P=this.test_match(X,O[A]),P!==!1)return P;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(P=this.test_match(z,O[F]),P!==!1?P:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var z=this.next();return z||this.lex()},begin:function(z){this.conditionStack.push(z)},popState:function(){var z=this.conditionStack.length-1;return z>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(z){return z=this.conditionStack.length-1-Math.abs(z||0),z>=0?this.conditionStack[z]:"INITIAL"},pushState:function(z){this.begin(z)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(z,X,F,O){switch(F){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:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return X.yytext=X.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 52:return 5;case 53:return X.yytext=X.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 65:return 5;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}}};return Ot}();ut.lexer=_t;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();id.parser=id;const qR=id,jR=t=>t.match(/^\s*sequenceDiagram/)!==null;let Ko,ji={},Mn=[],Su=!1,sd;const $R=function(t,e,r){ze.parseDirective(this,t,e,r)},ad=function(t,e,r,n){const i=ji[t];i&&e===i.name&&r==null||((r==null||r.text==null)&&(r={text:e,wrap:null,type:n}),(n==null||r.text==null)&&(r={text:e,wrap:null,type:n}),ji[t]={name:e,description:r.text,wrap:r.wrap===void 0&&Na()||!!r.wrap,prevActor:Ko,links:{},properties:{},actorCnt:null,rectData:null,type:n||"participant"},Ko&&ji[Ko]&&(ji[Ko].nextActor=t),Ko=t)},XR=t=>{let e,r=0;for(e=0;e<Mn.length;e++)Mn[e].type===Qo.ACTIVE_START&&Mn[e].from.actor===t&&r++,Mn[e].type===Qo.ACTIVE_END&&Mn[e].from.actor===t&&r--;return r},KR=function(t,e,r,n){Mn.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&Na()||!!r.wrap,answer:n})},Je=function(t,e,r={text:void 0,wrap:void 0},n){if(n===Qo.ACTIVE_END&&XR(t.actor)<1){let s=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return Mn.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&Na()||!!r.wrap,type:n}),!0},ZR=function(){return Mn},QR=function(){return ji},Zo=function(t){return ji[t]},JR=function(){return Object.keys(ji)},tF=function(){Su=!0},eF=function(){Su=!1},rF=()=>Su,nF=function(t){sd=t},Na=()=>sd!==void 0?sd:$().sequence.wrap,iF=function(){ji={},Mn=[],Su=!1,vn()},sF=function(t){const e=t.trim(),r={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return B.debug("parseMessage:",r),r},Qo={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},aF={FILLED:0,OPEN:1},oF={LEFTOF:0,RIGHTOF:1,OVER:2},U3=function(t,e,r){r.text,r.wrap===void 0&&Na()||r.wrap;const n=[].concat(t,t);Mn.push({from:n[0],to:n[1],message:r.text,wrap:r.wrap===void 0&&Na()||!!r.wrap,type:Qo.NOTE,placement:e})},z3=function(t,e){const r=Zo(t);try{let n=yn(e.text,$());n=n.replace(/&amp;/g,"&"),n=n.replace(/&equals;/g,"=");const i=JSON.parse(n);od(r,i)}catch(n){B.error("error while parsing actor link text",n)}},lF=function(t,e){const r=Zo(t);try{const a={};let o=yn(e.text,$());var n=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var i=o.slice(0,n-1).trim(),s=o.slice(n+1).trim();a[i]=s,od(r,a)}catch(a){B.error("error while parsing actor link text",a)}};function od(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}const W3=function(t,e){const r=Zo(t);try{let n=yn(e.text,$());const i=JSON.parse(n);H3(r,i)}catch(n){B.error("error while parsing actor properties text",n)}};function H3(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}const G3=function(t,e){const r=Zo(t),n=document.getElementById(e.text);try{const i=n.innerHTML,s=JSON.parse(i);s.properties&&H3(r,s.properties),s.links&&od(r,s.links)}catch(i){B.error("error while parsing actor details text",i)}},cF=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},q3=function(t){if(Array.isArray(t))t.forEach(function(e){q3(e)});else switch(t.type){case"sequenceIndex":Mn.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":ad(t.actor,t.actor,t.description,"participant");break;case"addActor":ad(t.actor,t.actor,t.description,"actor");break;case"activeStart":Je(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":Je(t.actor,void 0,void 0,t.signalType);break;case"addNote":U3(t.actor,t.placement,t.text);break;case"addLinks":z3(t.actor,t.text);break;case"addALink":lF(t.actor,t.text);break;case"addProperties":W3(t.actor,t.text);break;case"addDetails":G3(t.actor,t.text);break;case"addMessage":Je(t.from,t.to,t.msg,t.signalType);break;case"loopStart":Je(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Je(void 0,void 0,void 0,t.signalType);break;case"rectStart":Je(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Je(void 0,void 0,void 0,t.signalType);break;case"optStart":Je(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Je(void 0,void 0,void 0,t.signalType);break;case"altStart":Je(void 0,void 0,t.altText,t.signalType);break;case"else":Je(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Je(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":nn(t.text);break;case"parStart":Je(void 0,void 0,t.parText,t.signalType);break;case"and":Je(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Je(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Je(void 0,void 0,t.criticalText,t.signalType);break;case"option":Je(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Je(void 0,void 0,void 0,t.signalType);break;case"breakStart":Je(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Je(void 0,void 0,void 0,t.signalType);break}},j3={addActor:ad,addMessage:KR,addSignal:Je,addLinks:z3,addDetails:G3,addProperties:W3,autoWrap:Na,setWrap:nF,enableSequenceNumbers:tF,disableSequenceNumbers:eF,showSequenceNumbers:rF,getMessages:ZR,getActors:QR,getActor:Zo,getActorKeys:JR,getActorProperty:cF,getAccTitle:kn,getDiagramTitle:di,setDiagramTitle:hi,parseDirective:$R,getConfig:()=>$().sequence,clear:iF,parseMessage:sF,LINETYPE:Qo,ARROWTYPE:aF,PLACEMENT:oF,addNote:U3,setAccTitle:nn,apply:q3,setAccDescription:wn,getAccDescription:Tn};let ld=[];const uF=t=>{ld.push(t)},$3=()=>{ld.forEach(t=>{t()}),ld=[]},Au=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},X3=(t,e)=>{uF(()=>{const r=document.querySelectorAll(t);r.length!==0&&(r[0].addEventListener("mouseover",function(){pF("actor"+e+"_popup")}),r[0].addEventListener("mouseout",function(){gF("actor"+e+"_popup")}))})},hF=function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const s=e.links,a=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");const u=t.append("g");u.attr("id","actor"+a+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l),X3("#actor"+a+"_popup",a);var d="";o.class!==void 0&&(d=" "+o.class);let f=o.width>r?o.width:r;const p=u.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",o.x),p.attr("y",o.height),p.attr("fill",o.fill),p.attr("stroke",o.stroke),p.attr("width",f),p.attr("height",o.height),p.attr("rx",o.rx),p.attr("ry",o.ry),s!=null){var g=20;for(let T in s){var b=u.append("a"),k=ti(s[T]);b.attr("xlink:href",k),b.attr("target","_blank"),DF(n)(T,b,o.x+10,o.height+g,f,20,{class:"actor"},n),g+=30}}return p.attr("height",g),{height:o.height+g,width:f}},K3=function(t,e,r,n){const i=t.append("image");i.attr("x",e),i.attr("y",r);var s=ti(n);i.attr("xlink:href",s)},Z3=function(t,e,r,n){const i=t.append("use");i.attr("x",e),i.attr("y",r);var s=ti(n);i.attr("xlink:href","#"+s)},dF=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},fF=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},pF=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},gF=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},Ba=function(t,e){let r=0,n=0;const i=e.text.split(he.lineBreakRegex);let s=[],a=0,o=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":o=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":o=()=>Math.round(e.y+(r+n+e.textMargin)/2);break;case"bottom":case"end":o=()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[l,u]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&e.fontSize!==void 0&&(a=l*e.fontSize);const d=t.append("text");if(d.attr("x",e.x),d.attr("y",o()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),e.fontSize!==void 0&&d.style("font-size",e.fontSize),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):a!==0&&d.attr("dy",a),e.tspan){const f=d.append("tspan");f.attr("x",e.x),e.fill!==void 0&&f.attr("fill",e.fill),f.text(u)}else d.text(u);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),s.push(d)}return s},Q3=function(t,e){function r(i,s,a,o,l){return i+","+s+" "+(i+a)+","+s+" "+(i+a)+","+(s+o-l)+" "+(i+a-l*1.2)+","+(s+o)+" "+i+","+(s+o)}const n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,Ba(t,e),n};let Xn=-1;const J3=(t,e)=>{!t.selectAll||t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},yF=function(t,e,r){const n=e.x+e.width/2,i=t.append("g");var s=i;e.y===0&&(Xn++,s.append("line").attr("id","actor"+Xn).attr("x1",n).attr("y1",5).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),s=i.append("g"),e.actorCnt=Xn,e.links!=null&&(s.attr("id","root-"+Xn),X3("#root-"+Xn,Xn)));const a=Lu();var o="actor";e.properties!=null&&e.properties.class?o=e.properties.class:a.fill="#eaeaea",a.x=e.x,a.y=e.y,a.width=e.width,a.height=e.height,a.class=o,a.rx=3,a.ry=3;const l=Au(s,a);if(e.rectData=a,e.properties!=null&&e.properties.icon){const d=e.properties.icon.trim();d.charAt(0)==="@"?Z3(s,a.x+a.width-20,a.y+10,d.substr(1)):K3(s,a.x+a.width-20,a.y+10,d)}t4(r)(e.description,s,a.x,a.y,a.width,a.height,{class:"actor"},r);let u=e.height;if(l.node){const d=l.node().getBBox();e.height=d.height,u=d.height}return u},mF=function(t,e,r){const n=e.x+e.width/2;e.y===0&&(Xn++,t.append("line").attr("id","actor"+Xn).attr("x1",n).attr("y1",80).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const i=t.append("g");i.attr("class","actor-man");const s=Lu();s.x=e.x,s.y=e.y,s.fill="#eaeaea",s.width=e.width,s.height=e.height,s.class="actor",s.rx=3,s.ry=3,i.append("line").attr("id","actor-man-torso"+Xn).attr("x1",n).attr("y1",e.y+25).attr("x2",n).attr("y2",e.y+45),i.append("line").attr("id","actor-man-arms"+Xn).attr("x1",n-18).attr("y1",e.y+33).attr("x2",n+18).attr("y2",e.y+33),i.append("line").attr("x1",n-18).attr("y1",e.y+60).attr("x2",n).attr("y2",e.y+45),i.append("line").attr("x1",n).attr("y1",e.y+45).attr("x2",n+16).attr("y2",e.y+60);const a=i.append("circle");a.attr("cx",e.x+e.width/2),a.attr("cy",e.y+10),a.attr("r",15),a.attr("width",e.width),a.attr("height",e.height);const o=i.node().getBBox();return e.height=o.height,t4(r)(e.description,i,s.x,s.y+35,s.width,s.height,{class:"actor"},r),e.height},bF=function(t,e,r){switch(e.type){case"actor":return mF(t,e,r);case"participant":return yF(t,e,r)}},_F=function(t){return t.append("g")},xF=function(t,e,r,n,i){const s=Lu(),a=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+i%3,s.width=e.stopx-e.startx,s.height=r-e.starty,Au(a,s)},vF=function(t,e,r,n){const{boxMargin:i,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:d}=n,f=t.append("g"),p=function(k,T,L,E){return f.append("line").attr("x1",k).attr("y1",T).attr("x2",L).attr("y2",E).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(k){p(e.startx,k.y,e.stopx,k.y).style("stroke-dasharray","3, 3")});let g=cd();g.text=r,g.x=e.startx,g.y=e.starty,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=o||50,g.height=a||20,g.textMargin=s,g.class="labelText",Q3(f,g),g=cd(),g.text=e.title,g.x=e.startx+o/2+(e.stopx-e.startx)/2,g.y=e.starty+i+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=!0;let b=Ba(f,g);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(k,T){if(k.message){g.text=k.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[T].y+i+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=e.wrap,b=Ba(f,g);let L=Math.round(b.map(E=>(E._groups||E)[0][0].getBBox().height).reduce((E,I)=>E+I));e.sections[T].height+=L-(i+s)}}),e.height=Math.round(e.stopy-e.starty),f},kF=function(t,e){Au(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},wF=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},TF=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},EF=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},CF=function(t){t.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")},SF=function(t){t.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")},AF=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},LF=function(t){t.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")},cd=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}},Lu=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},t4=function(){function t(i,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(f,d)}function e(i,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:b}=f;let k=p&&p.replace?p.replace("px",""):p;const T=i.split(he.lineBreakRegex);for(let L=0;L<T.length;L++){const E=L*k-k*(T.length-1)/2,I=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",p).style("font-weight",b).style("font-family",g);I.append("tspan").attr("x",a+l/2).attr("dy",E).text(T[L]),I.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(I,d)}}function r(i,s,a,o,l,u,d,f){const p=s.append("switch"),b=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,a,o,l,u,d,f),n(b,d)}function n(i,s){for(const a in s)s.hasOwnProperty(a)&&i.attr(a,s[a])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),DF=function(){function t(i,s,a,o,l,u,d){const f=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(i);n(f,d)}function e(i,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:b}=f,k=i.split(he.lineBreakRegex);for(let T=0;T<k.length;T++){const L=T*p-p*(k.length-1)/2,E=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",p).style("font-weight",b).style("font-family",g);E.append("tspan").attr("x",a).attr("dy",L).text(k[T]),E.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(E,d)}}function r(i,s,a,o,l,u,d,f){const p=s.append("switch"),b=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,a,o,l,u,d,f),n(b,d)}function n(i,s){for(const a in s)s.hasOwnProperty(a)&&i.attr(a,s[a])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),je={drawRect:Au,drawText:Ba,drawLabel:Q3,drawActor:bF,drawPopup:hF,drawImage:K3,drawEmbeddedImage:Z3,anchorElement:_F,drawActivation:xF,drawLoop:vF,drawBackgroundRect:kF,insertArrowHead:CF,insertArrowFilledHead:SF,insertSequenceNumber:AF,insertArrowCrossHead:LF,insertDatabaseIcon:wF,insertComputerIcon:TF,insertClockIcon:EF,getTextObj:cd,getNoteRect:Lu,popupMenu:dF,popdownMenu:fF,fixLifeLineHeights:J3,sanitizeUrl:ti};let lt={};const Bt={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,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},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,r4($())},updateVal:function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,e,r,n){const i=this;let s=0;function a(o){return function(u){s++;const d=i.sequenceItems.length-s+1;i.updateVal(u,"starty",e-d*lt.boxMargin,Math.min),i.updateVal(u,"stopy",n+d*lt.boxMargin,Math.max),i.updateVal(Bt.data,"startx",t-d*lt.boxMargin,Math.min),i.updateVal(Bt.data,"stopx",r+d*lt.boxMargin,Math.max),o!=="activation"&&(i.updateVal(u,"startx",t-d*lt.boxMargin,Math.min),i.updateVal(u,"stopx",r+d*lt.boxMargin,Math.max),i.updateVal(Bt.data,"starty",e-d*lt.boxMargin,Math.min),i.updateVal(Bt.data,"stopy",n+d*lt.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,r,n){const i=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,n),o=Math.max(e,n);this.updateVal(Bt.data,"startx",i,Math.min),this.updateVal(Bt.data,"starty",a,Math.min),this.updateVal(Bt.data,"stopx",s,Math.max),this.updateVal(Bt.data,"stopy",o,Math.max),this.updateBounds(i,a,s,o)},newActivation:function(t,e,r){const n=r[t.from.actor],i=Du(t.from.actor).length||0,s=n.x+n.width/2+(i-1)*lt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+lt.activationWidth,stopy:void 0,actor:t.from.actor,anchored:je.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Bt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},MF=function(t,e){Bt.bumpVerticalPos(lt.boxMargin),e.height=lt.boxMargin,e.starty=Bt.getVerticalPos();const r=je.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||lt.width,r.class="note";const n=t.append("g"),i=je.drawRect(n,r),s=je.getTextObj();s.x=e.startx,s.y=e.starty,s.width=r.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=lt.noteFontFamily,s.fontSize=lt.noteFontSize,s.fontWeight=lt.noteFontWeight,s.anchor=lt.noteAlign,s.textMargin=lt.noteMargin,s.valign="center";const a=Ba(n,s),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));i.attr("height",o+2*lt.noteMargin),e.height+=o+2*lt.noteMargin,Bt.bumpVerticalPos(o+2*lt.noteMargin),e.stopy=e.starty+o+2*lt.noteMargin,e.stopx=e.startx+r.width,Bt.insert(e.startx,e.starty,e.stopx,e.stopy),Bt.models.addNote(e)},Ia=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Oa=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),ud=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function NF(t,e){Bt.bumpVerticalPos(10);const{startx:r,stopx:n,message:i}=e,s=he.splitBreaks(i).length,a=ge.calculateTextDimensions(i,Ia(lt)),o=a.height/s;e.height+=o,Bt.bumpVerticalPos(o);let l,u=a.height-10;const d=a.width;if(r===n){l=Bt.getVerticalPos()+u,lt.rightAngles||(u+=lt.boxMargin,l=Bt.getVerticalPos()+u),u+=30;const f=Math.max(d/2,lt.width/2);Bt.insert(r-f,Bt.getVerticalPos()-10+u,n+f,Bt.getVerticalPos()+30+u)}else u+=lt.boxMargin,l=Bt.getVerticalPos()+u,Bt.insert(r,l-10,n,l);return Bt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,Bt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const BF=function(t,e,r,n){const{startx:i,stopx:s,starty:a,message:o,type:l,sequenceIndex:u,sequenceVisible:d}=e,f=ge.calculateTextDimensions(o,Ia(lt)),p=je.getTextObj();p.x=i,p.y=a+10,p.width=s-i,p.class="messageText",p.dy="1em",p.text=o,p.fontFamily=lt.messageFontFamily,p.fontSize=lt.messageFontSize,p.fontWeight=lt.messageFontWeight,p.anchor=lt.messageAlign,p.valign="center",p.textMargin=lt.wrapPadding,p.tspan=!1,Ba(t,p);const g=f.width;let b;i===s?lt.rightAngles?b=t.append("path").attr("d",`M ${i},${r} H ${i+Math.max(lt.width/2,g/2)} V ${r+25} H ${i}`):b=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(b=t.append("line"),b.attr("x1",i),b.attr("y1",r),b.attr("x2",s),b.attr("y2",r)),l===n.db.LINETYPE.DOTTED||l===n.db.LINETYPE.DOTTED_CROSS||l===n.db.LINETYPE.DOTTED_POINT||l===n.db.LINETYPE.DOTTED_OPEN?(b.style("stroke-dasharray","3, 3"),b.attr("class","messageLine1")):b.attr("class","messageLine0");let k="";lt.arrowMarkerAbsolute&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),b.attr("stroke-width",2),b.attr("stroke","none"),b.style("fill","none"),(l===n.db.LINETYPE.SOLID||l===n.db.LINETYPE.DOTTED)&&b.attr("marker-end","url("+k+"#arrowhead)"),(l===n.db.LINETYPE.SOLID_POINT||l===n.db.LINETYPE.DOTTED_POINT)&&b.attr("marker-end","url("+k+"#filled-head)"),(l===n.db.LINETYPE.SOLID_CROSS||l===n.db.LINETYPE.DOTTED_CROSS)&&b.attr("marker-end","url("+k+"#crosshead)"),(d||lt.showSequenceNumbers)&&(b.attr("marker-start","url("+k+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},hd=function(t,e,r,n,i,s){if(i.hideUnusedParticipants===!0){const u=new Set;s.forEach(d=>{u.add(d.from),u.add(d.to)}),r=r.filter(d=>u.has(d))}let a=0,o=0,l=0;for(const u of r){const d=e[u];d.width=d.width||lt.width,d.height=Math.max(d.height||lt.height,lt.height),d.margin=d.margin||lt.actorMargin,d.x=a+o,d.y=n;const f=je.drawActor(t,d,lt);l=Math.max(l,f),Bt.insert(d.x,n,d.x+d.width,d.height),a+=d.width,o+=d.margin,Bt.models.addActor(d)}Bt.bumpVerticalPos(l)},e4=function(t,e,r,n){let i=0,s=0;for(const a of r){const o=e[a],l=RF(o),u=je.drawPopup(t,o,l,lt,lt.forceMenus,n);u.height>i&&(i=u.height),u.width+o.x>s&&(s=u.width+o.x)}return{maxHeight:i,maxWidth:s}},r4=function(t){gr(lt,t),t.fontFamily&&(lt.actorFontFamily=lt.noteFontFamily=lt.messageFontFamily=t.fontFamily),t.fontSize&&(lt.actorFontSize=lt.noteFontSize=lt.messageFontSize=t.fontSize),t.fontWeight&&(lt.actorFontWeight=lt.noteFontWeight=lt.messageFontWeight=t.fontWeight)},Du=function(t){return Bt.activations.filter(function(e){return e.actor===t})},n4=function(t,e){const r=e[t],n=Du(t),i=n.reduce(function(a,o){return Math.min(a,o.startx)},r.x+r.width/2),s=n.reduce(function(a,o){return Math.max(a,o.stopx)},r.x+r.width/2);return[i,s]};function Kn(t,e,r,n,i){Bt.bumpVerticalPos(r);let s=n;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=Ia(lt);e.message=ge.wrapLabel(`[${e.message}]`,a-2*lt.wrapPadding,o),e.width=a,e.wrap=!0;const l=ge.calculateTextDimensions(e.message,o),u=Math.max(l.height,lt.labelBoxHeight);s=n+u,B.debug(`${u} - ${e.message}`)}i(e),Bt.bumpVerticalPos(s)}const IF=function(t,e,r,n){const{securityLevel:i,sequence:s}=$();lt=s;let a;i==="sandbox"&&(a=St("#i"+e));const o=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=i==="sandbox"?a.nodes()[0].contentDocument:document;Bt.init(),B.debug(n.db);const u=i==="sandbox"?o.select(`[id="${e}"]`):St(`[id="${e}"]`),d=n.db.getActors(),f=n.db.getActorKeys(),p=n.db.getMessages(),g=n.db.getDiagramTitle(),b=OF(d,p,n);lt.height=FF(d,b),je.insertComputerIcon(u),je.insertDatabaseIcon(u),je.insertClockIcon(u),hd(u,d,f,0,lt,p);const k=VF(p,d,b,n);je.insertArrowHead(u),je.insertArrowCrossHead(u),je.insertArrowFilledHead(u),je.insertSequenceNumber(u);function T(v,M){const m=Bt.endActivation(v);m.starty+18>M&&(m.starty=M-6,M+=12),je.drawActivation(u,m,M,lt,Du(v.from.actor).length),Bt.insert(m.startx,M-10,m.stopx,M)}let L=1,E=1;const I=[];p.forEach(function(v){let M,m,Q;switch(v.type){case n.db.LINETYPE.NOTE:m=v.noteModel,MF(u,m);break;case n.db.LINETYPE.ACTIVE_START:Bt.newActivation(v,u,d);break;case n.db.LINETYPE.ACTIVE_END:T(v,Bt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Kn(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,x=>Bt.newLoop(x));break;case n.db.LINETYPE.LOOP_END:M=Bt.endLoop(),je.drawLoop(u,M,"loop",lt),Bt.bumpVerticalPos(M.stopy-Bt.getVerticalPos()),Bt.models.addLoop(M);break;case n.db.LINETYPE.RECT_START:Kn(k,v,lt.boxMargin,lt.boxMargin,x=>Bt.newLoop(void 0,x.message));break;case n.db.LINETYPE.RECT_END:M=Bt.endLoop(),je.drawBackgroundRect(u,M),Bt.models.addLoop(M),Bt.bumpVerticalPos(M.stopy-Bt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Kn(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,x=>Bt.newLoop(x));break;case n.db.LINETYPE.OPT_END:M=Bt.endLoop(),je.drawLoop(u,M,"opt",lt),Bt.bumpVerticalPos(M.stopy-Bt.getVerticalPos()),Bt.models.addLoop(M);break;case n.db.LINETYPE.ALT_START:Kn(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,x=>Bt.newLoop(x));break;case n.db.LINETYPE.ALT_ELSE:Kn(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,x=>Bt.addSectionToLoop(x));break;case n.db.LINETYPE.ALT_END:M=Bt.endLoop(),je.drawLoop(u,M,"alt",lt),Bt.bumpVerticalPos(M.stopy-Bt.getVerticalPos()),Bt.models.addLoop(M);break;case n.db.LINETYPE.PAR_START:Kn(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,x=>Bt.newLoop(x));break;case n.db.LINETYPE.PAR_AND:Kn(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,x=>Bt.addSectionToLoop(x));break;case n.db.LINETYPE.PAR_END:M=Bt.endLoop(),je.drawLoop(u,M,"par",lt),Bt.bumpVerticalPos(M.stopy-Bt.getVerticalPos()),Bt.models.addLoop(M);break;case n.db.LINETYPE.AUTONUMBER:L=v.message.start||L,E=v.message.step||E,v.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Kn(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,x=>Bt.newLoop(x));break;case n.db.LINETYPE.CRITICAL_OPTION:Kn(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,x=>Bt.addSectionToLoop(x));break;case n.db.LINETYPE.CRITICAL_END:M=Bt.endLoop(),je.drawLoop(u,M,"critical",lt),Bt.bumpVerticalPos(M.stopy-Bt.getVerticalPos()),Bt.models.addLoop(M);break;case n.db.LINETYPE.BREAK_START:Kn(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,x=>Bt.newLoop(x));break;case n.db.LINETYPE.BREAK_END:M=Bt.endLoop(),je.drawLoop(u,M,"break",lt),Bt.bumpVerticalPos(M.stopy-Bt.getVerticalPos()),Bt.models.addLoop(M);break;default:try{Q=v.msgModel,Q.starty=Bt.getVerticalPos(),Q.sequenceIndex=L,Q.sequenceVisible=n.db.showSequenceNumbers();const x=NF(u,Q);I.push({messageModel:Q,lineStartY:x}),Bt.models.addMessage(Q)}catch(x){B.error("error while drawing message",x)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(v.type)&&(L=L+E)}),I.forEach(v=>BF(u,v.messageModel,v.lineStartY,n)),lt.mirrorActors&&(Bt.bumpVerticalPos(lt.boxMargin*2),hd(u,d,f,Bt.getVerticalPos(),lt,p),Bt.bumpVerticalPos(lt.boxMargin),J3(u,Bt.getVerticalPos()));const V=e4(u,d,f,l),{bounds:H}=Bt.getBounds();B.debug("For line height fix Querying: #"+e+" .actor-line"),hh("#"+e+" .actor-line").attr("y2",H.stopy);let Y=H.stopy-H.starty;Y<V.maxHeight&&(Y=V.maxHeight);let W=Y+2*lt.diagramMarginY;lt.mirrorActors&&(W=W-lt.boxMargin+lt.bottomMarginAdj);let N=H.stopx-H.startx;N<V.maxWidth&&(N=V.maxWidth);const D=N+2*lt.diagramMarginX;g&&u.append("text").text(g).attr("x",(H.stopx-H.startx)/2-2*lt.diagramMarginX).attr("y",-25),xn(u,W,D,lt.useMaxWidth);const w=g?40:0;u.attr("viewBox",H.startx-lt.diagramMarginX+" -"+(lt.diagramMarginY+w)+" "+D+" "+(W+w)),B.debug("models:",Bt.models)};function OF(t,e,r){const n={};return e.forEach(function(i){if(t[i.to]&&t[i.from]){const s=t[i.to];if(i.placement===r.db.PLACEMENT.LEFTOF&&!s.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!s.nextActor)return;const a=i.placement!==void 0,o=!a,l=a?Oa(lt):Ia(lt),u=i.wrap?ge.wrapLabel(i.message,lt.width-2*lt.wrapPadding,l):i.message,f=ge.calculateTextDimensions(u,l).width+2*lt.wrapPadding;o&&i.from===s.nextActor?n[i.to]=Math.max(n[i.to]||0,f):o&&i.from===s.prevActor?n[i.from]=Math.max(n[i.from]||0,f):o&&i.from===i.to?(n[i.from]=Math.max(n[i.from]||0,f/2),n[i.to]=Math.max(n[i.to]||0,f/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=Math.max(n[i.from]||0,f):i.placement===r.db.PLACEMENT.LEFTOF?n[s.prevActor]=Math.max(n[s.prevActor]||0,f):i.placement===r.db.PLACEMENT.OVER&&(s.prevActor&&(n[s.prevActor]=Math.max(n[s.prevActor]||0,f/2)),s.nextActor&&(n[i.from]=Math.max(n[i.from]||0,f/2)))}}),B.debug("maxMessageWidthPerActor:",n),n}const RF=function(t){let e=0;const r=ud(lt);for(const n in t.links){const s=ge.calculateTextDimensions(n,r).width+2*lt.wrapPadding+2*lt.boxMargin;e<s&&(e=s)}return e};function FF(t,e){let r=0;Object.keys(t).forEach(n=>{const i=t[n];i.wrap&&(i.description=ge.wrapLabel(i.description,lt.width-2*lt.wrapPadding,ud(lt)));const s=ge.calculateTextDimensions(i.description,ud(lt));i.width=i.wrap?lt.width:Math.max(lt.width,s.width+2*lt.wrapPadding),i.height=i.wrap?Math.max(s.height,lt.height):lt.height,r=Math.max(r,i.height)});for(const n in e){const i=t[n];if(!i)continue;const s=t[i.nextActor];if(!s)continue;const o=e[n]+lt.actorMargin-i.width/2-s.width/2;i.margin=Math.max(o,lt.actorMargin)}return Math.max(r,lt.height)}const PF=function(t,e,r){const n=e[t.from].x,i=e[t.to].x,s=t.wrap&&t.message;let a=ge.calculateTextDimensions(s?ge.wrapLabel(t.message,lt.width,Oa(lt)):t.message,Oa(lt));const o={width:s?lt.width:Math.max(lt.width,a.width+2*lt.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(o.width=s?Math.max(lt.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=n+(e[t.from].width+lt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(o.width=Math.max(s?lt.width:e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=n-o.width+(e[t.from].width-lt.actorMargin)/2):t.to===t.from?(a=ge.calculateTextDimensions(s?ge.wrapLabel(t.message,Math.max(lt.width,e[t.from].width),Oa(lt)):t.message,Oa(lt)),o.width=s?Math.max(lt.width,e[t.from].width):Math.max(e[t.from].width,lt.width,a.width+2*lt.noteMargin),o.startx=n+(e[t.from].width-o.width)/2):(o.width=Math.abs(n+e[t.from].width/2-(i+e[t.to].width/2))+lt.actorMargin,o.startx=n<i?n+e[t.from].width/2-lt.actorMargin/2:i+e[t.to].width/2-lt.actorMargin/2),s&&(o.message=ge.wrapLabel(t.message,o.width-2*lt.wrapPadding,Oa(lt))),B.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},YF=function(t,e,r){let n=!1;if([r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};const i=n4(t.from,e),s=n4(t.to,e),a=i[0]<=s[0]?1:0,o=i[0]<s[0]?0:1,l=[...i,...s],u=Math.abs(s[o]-i[a]);t.wrap&&t.message&&(t.message=ge.wrapLabel(t.message,Math.max(u+2*lt.wrapPadding,lt.width),Ia(lt)));const d=ge.calculateTextDimensions(t.message,Ia(lt));return{width:Math.max(t.wrap?0:d.width+2*lt.wrapPadding,u+2*lt.wrapPadding,lt.width),height:0,startx:i[a],stopx:s[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},VF=function(t,e,r,n){const i={},s=[];let a,o,l;return t.forEach(function(u){switch(u.id=ge.random({length:10}),u.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:u.message&&(a=s.pop(),i[a.id]=a,i[u.id]=a,s.push(a));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:a=s.pop(),i[a.id]=a;break;case n.db.LINETYPE.ACTIVE_START:{const f=e[u.from?u.from.actor:u.to.actor],p=Du(u.from?u.from.actor:u.to.actor).length,g=f.x+f.width/2+(p-1)*lt.activationWidth/2,b={startx:g,stopx:g+lt.activationWidth,actor:u.from.actor,enabled:!0};Bt.activations.push(b)}break;case n.db.LINETYPE.ACTIVE_END:{const f=Bt.activations.map(p=>p.actor).lastIndexOf(u.from.actor);delete Bt.activations.splice(f,1)[0]}break}u.placement!==void 0?(o=PF(u,e,n),u.noteModel=o,s.forEach(f=>{a=f,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-lt.labelBoxWidth})):(l=YF(u,e,n),u.msgModel=l,l.startx&&l.stopx&&s.length>0&&s.forEach(f=>{if(a=f,l.startx===l.stopx){const p=e[u.from],g=e[u.to];a.from=Math.min(p.x-l.width/2,p.x-p.width/2,a.from),a.to=Math.max(g.x+l.width/2,g.x+p.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-lt.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-lt.labelBoxWidth}))}),Bt.activations=[],B.debug("Loop type widths:",i),i},i4={bounds:Bt,drawActors:hd,drawActorsPopup:e4,setConf:r4,draw:IF};var dd=function(){var t=function(j,ot,rt,nt){for(rt=rt||{},nt=j.length;nt--;rt[j[nt]]=ot);return rt},e=[1,2],r=[1,3],n=[1,5],i=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,21],u=[1,22],d=[1,23],f=[1,24],p=[1,37],g=[1,25],b=[1,26],k=[1,27],T=[1,28],L=[1,29],E=[1,32],I=[1,33],V=[1,34],H=[1,35],G=[1,36],Y=[1,39],W=[1,40],N=[1,41],D=[1,42],w=[1,38],v=[1,45],M=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],m=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],Q=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],x=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],ct={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(ot,rt,nt,ut,_t,K,Ot){var P=K.length-1;switch(_t){case 4:return ut.setRootDoc(K[P]),K[P];case 5:this.$=[];break;case 6:K[P]!="nl"&&(K[P-1].push(K[P]),this.$=K[P-1]);break;case 7:case 8:this.$=K[P];break;case 9:this.$="nl";break;case 12:this.$=K[P];break;case 13:const O=K[P-1];O.description=ut.trimColon(K[P]),this.$=O;break;case 14:this.$={stmt:"relation",state1:K[P-2],state2:K[P]};break;case 15:const A=ut.trimColon(K[P]);this.$={stmt:"relation",state1:K[P-3],state2:K[P-1],description:A};break;case 19:this.$={stmt:"state",id:K[P-3],type:"default",description:"",doc:K[P-1]};break;case 20:var z=K[P],X=K[P-2].trim();if(K[P].match(":")){var F=K[P].split(":");z=F[0],X=[X,F[1]]}this.$={stmt:"state",id:z,type:"default",description:X};break;case 21:this.$={stmt:"state",id:K[P-3],type:"default",description:K[P-5],doc:K[P-1]};break;case 22:this.$={stmt:"state",id:K[P],type:"fork"};break;case 23:this.$={stmt:"state",id:K[P],type:"join"};break;case 24:this.$={stmt:"state",id:K[P],type:"choice"};break;case 25:this.$={stmt:"state",id:ut.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:K[P-1].trim(),note:{position:K[P-2].trim(),text:K[P].trim()}};break;case 30:this.$=K[P].trim(),ut.setAccTitle(this.$);break;case 31:case 32:this.$=K[P].trim(),ut.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:K[P-1].trim(),classes:K[P].trim()};break;case 35:this.$={stmt:"applyClass",id:K[P-1].trim(),styleClass:K[P].trim()};break;case 38:ut.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:ut.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:ut.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:ut.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:K[P].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:K[P-2].trim(),classes:[K[P].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:K[P-2].trim(),classes:[K[P].trim()],type:"default",description:""};break;case 50:ut.parseDirective("%%{","open_directive");break;case 51:ut.parseDirective(K[P],"type_directive");break;case 52:K[P]=K[P].trim().replace(/'/g,'"'),ut.parseDirective(K[P],"arg_directive");break;case 53:ut.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:r,6:4,7:n,45:6,60:i},{1:[3]},{3:8,4:e,5:r,6:4,7:n,45:6,60:i},{3:9,4:e,5:r,6:4,7:n,45:6,60:i},{3:10,4:e,5:r,6:4,7:n,45:6,60:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],s,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,22:f,24:p,25:g,26:b,27:k,28:T,29:L,32:31,33:E,35:I,37:V,38:H,42:G,45:6,50:Y,51:W,52:N,53:D,56:w,60:i},{47:43,48:[1,44],63:v},t([48,63],[2,51]),t(M,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:u,19:d,22:f,24:p,25:g,26:b,27:k,28:T,29:L,32:31,33:E,35:I,37:V,38:H,42:G,45:6,50:Y,51:W,52:N,53:D,56:w,60:i},t(M,[2,8]),t(M,[2,9]),t(M,[2,10]),t(M,[2,11]),t(M,[2,12],{14:[1,47],15:[1,48]}),t(M,[2,16]),{18:[1,49]},t(M,[2,18],{20:[1,50]}),{23:[1,51]},t(M,[2,22]),t(M,[2,23]),t(M,[2,24]),t(M,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(M,[2,28]),t(M,[2,29]),{34:[1,56]},{36:[1,57]},t(M,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(m,[2,44],{57:[1,61]}),t(m,[2,45],{57:[1,62]}),t(M,[2,38]),t(M,[2,39]),t(M,[2,40]),t(M,[2,41]),t(Q,[2,36]),{49:63,62:[1,64]},t(Q,[2,53]),t(M,[2,7]),t(M,[2,13]),{13:65,24:p,56:w},t(M,[2,17]),t(x,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(M,[2,30]),t(M,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:v},{63:[2,52]},t(M,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,77],22:f,24:p,25:g,26:b,27:k,28:T,29:L,32:31,33:E,35:I,37:V,38:H,42:G,45:6,50:Y,51:W,52:N,53:D,56:w,60:i},t(M,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(M,[2,33]),t(M,[2,34]),t(M,[2,35]),t(m,[2,46]),t(m,[2,47]),t(Q,[2,37]),t(M,[2,15]),t(M,[2,19]),t(x,s,{8:81}),t(M,[2,26]),t(M,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,82],22:f,24:p,25:g,26:b,27:k,28:T,29:L,32:31,33:E,35:I,37:V,38:H,42:G,45:6,50:Y,51:W,52:N,53:D,56:w,60:i},t(M,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(ot,rt){if(rt.recoverable)this.trace(ot);else{var nt=new Error(ot);throw nt.hash=rt,nt}},parse:function(ot){var rt=this,nt=[0],ut=[],_t=[null],K=[],Ot=this.table,P="",z=0,X=0,F=2,O=1,A=K.slice.call(arguments,1),J=Object.create(this.lexer),C={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(C.yy[ht]=this.yy[ht]);J.setInput(ot,C.yy),C.yy.lexer=J,C.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var U=J.yylloc;K.push(U);var Yt=J.options&&J.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var Kt;return Kt=ut.pop()||J.lex()||O,typeof Kt!="number"&&(Kt instanceof Array&&(ut=Kt,Kt=ut.pop()),Kt=rt.symbols_[Kt]||Kt),Kt}for(var Mt,Tt,gt,Et,wt={},pt,st,le,Xt;;){if(Tt=nt[nt.length-1],this.defaultActions[Tt]?gt=this.defaultActions[Tt]:((Mt===null||typeof Mt>"u")&&(Mt=et()),gt=Ot[Tt]&&Ot[Tt][Mt]),typeof gt>"u"||!gt.length||!gt[0]){var jt="";Xt=[];for(pt in Ot[Tt])this.terminals_[pt]&&pt>F&&Xt.push("'"+this.terminals_[pt]+"'");J.showPosition?jt="Parse error on line "+(z+1)+`:
`+J.showPosition()+`
Expecting `+Xt.join(", ")+", got '"+(this.terminals_[Mt]||Mt)+"'":jt="Parse error on line "+(z+1)+": Unexpected "+(Mt==O?"end of input":"'"+(this.terminals_[Mt]||Mt)+"'"),this.parseError(jt,{text:J.match,token:this.terminals_[Mt]||Mt,line:J.yylineno,loc:U,expected:Xt})}if(gt[0]instanceof Array&&gt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Tt+", token: "+Mt);switch(gt[0]){case 1:nt.push(Mt),_t.push(J.yytext),K.push(J.yylloc),nt.push(gt[1]),Mt=null,X=J.yyleng,P=J.yytext,z=J.yylineno,U=J.yylloc;break;case 2:if(st=this.productions_[gt[1]][1],wt.$=_t[_t.length-st],wt._$={first_line:K[K.length-(st||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(st||1)].first_column,last_column:K[K.length-1].last_column},Yt&&(wt._$.range=[K[K.length-(st||1)].range[0],K[K.length-1].range[1]]),Et=this.performAction.apply(wt,[P,X,z,C.yy,gt[1],_t,K].concat(A)),typeof Et<"u")return Et;st&&(nt=nt.slice(0,-1*st*2),_t=_t.slice(0,-1*st),K=K.slice(0,-1*st)),nt.push(this.productions_[gt[1]][0]),_t.push(wt.$),K.push(wt._$),le=Ot[nt[nt.length-2]][nt[nt.length-1]],nt.push(le);break;case 3:return!0}}return!0}},Dt=function(){var j={EOF:1,parseError:function(rt,nt){if(this.yy.parser)this.yy.parser.parseError(rt,nt);else throw new Error(rt)},setInput:function(ot,rt){return this.yy=rt||this.yy||{},this._input=ot,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 ot=this._input[0];this.yytext+=ot,this.yyleng++,this.offset++,this.match+=ot,this.matched+=ot;var rt=ot.match(/(?:\r\n?|\n).*/g);return rt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ot},unput:function(ot){var rt=ot.length,nt=ot.split(/(?:\r\n?|\n)/g);this._input=ot+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-rt),this.offset-=rt;var ut=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),nt.length-1&&(this.yylineno-=nt.length-1);var _t=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:nt?(nt.length===ut.length?this.yylloc.first_column:0)+ut[ut.length-nt.length].length-nt[0].length:this.yylloc.first_column-rt},this.options.ranges&&(this.yylloc.range=[_t[0],_t[0]+this.yyleng-rt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(ot){this.unput(this.match.slice(ot))},pastInput:function(){var ot=this.matched.substr(0,this.matched.length-this.match.length);return(ot.length>20?"...":"")+ot.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var ot=this.match;return ot.length<20&&(ot+=this._input.substr(0,20-ot.length)),(ot.substr(0,20)+(ot.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var ot=this.pastInput(),rt=new Array(ot.length+1).join("-");return ot+this.upcomingInput()+`
`+rt+"^"},test_match:function(ot,rt){var nt,ut,_t;if(this.options.backtrack_lexer&&(_t={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_t.yylloc.range=this.yylloc.range.slice(0))),ut=ot[0].match(/(?:\r\n?|\n).*/g),ut&&(this.yylineno+=ut.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ut?ut[ut.length-1].length-ut[ut.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ot[0].length},this.yytext+=ot[0],this.match+=ot[0],this.matches=ot,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(ot[0].length),this.matched+=ot[0],nt=this.performAction.call(this,this.yy,this,rt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),nt)return nt;if(this._backtrack){for(var K in _t)this[K]=_t[K];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ot,rt,nt,ut;this._more||(this.yytext="",this.match="");for(var _t=this._currentRules(),K=0;K<_t.length;K++)if(nt=this._input.match(this.rules[_t[K]]),nt&&(!rt||nt[0].length>rt[0].length)){if(rt=nt,ut=K,this.options.backtrack_lexer){if(ot=this.test_match(nt,_t[K]),ot!==!1)return ot;if(this._backtrack){rt=!1;continue}else return!1}else if(!this.options.flex)break}return rt?(ot=this.test_match(rt,_t[ut]),ot!==!1?ot:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var rt=this.next();return rt||this.lex()},begin:function(rt){this.conditionStack.push(rt)},popState:function(){var rt=this.conditionStack.length-1;return rt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(rt){return rt=this.conditionStack.length-1-Math.abs(rt||0),rt>=0?this.conditionStack[rt]:"INITIAL"},pushState:function(rt){this.begin(rt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(rt,nt,ut,_t){switch(ut){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4: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:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19: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 25:this.popState();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 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),nt.yytext=nt.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),nt.yytext=nt.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),nt.yytext=nt.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),nt.yytext=nt.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),nt.yytext=nt.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),nt.yytext=nt.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.begin("STATE_STRING");break;case 49:return this.popState(),this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;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 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),nt.yytext=nt.yytext.substr(2).trim(),31;case 69:return this.popState(),nt.yytext=nt.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return nt.yytext=nt.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;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,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/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}}};return j}();ct.lexer=Dt;function kt(){this.yy={}}return kt.prototype=ct,ct.Parser=kt,new kt}();dd.parser=dd;const s4=dd,UF=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},zF=(t,e)=>{var r;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},a4="LR",WF="TB",Mu="state",fd="relation",HF="classDef",GF="applyClass",Jo="default",o4="divider",pd="[*]",l4="start",c4=pd,u4="end",h4="color",d4="fill",qF="bgFill",jF=",";function f4(){return{}}let p4=a4,Nu=[],tl=f4();const g4=()=>({relations:[],states:{},documents:{}});let Bu={root:g4()},Cr=Bu.root,el=0,y4=0;const $F={LINE:0,DOTTED_LINE:1},XF={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Iu=t=>JSON.parse(JSON.stringify(t)),KF=function(t,e,r){ze.parseDirective(this,t,e,r)},ZF=t=>{B.info("Setting root doc",t),Nu=t},QF=()=>Nu,Ou=(t,e,r)=>{if(e.stmt===fd)Ou(t,e.state1,!0),Ou(t,e.state2,!1);else if(e.stmt===Mu&&e.id==="[*]"&&(e.id=r?t.id+"_start":t.id+"_end",e.start=r),e.doc){const n=[];let i=[],s;for(s=0;s<e.doc.length;s++)if(e.doc[s].type===o4){const a=Iu(e.doc[s]);a.doc=Iu(i),n.push(a),i=[]}else i.push(e.doc[s]);if(n.length>0&&i.length>0){const a={stmt:Mu,id:Rp(),type:"divider",doc:Iu(i)};n.push(Iu(a)),e.doc=n}e.doc.forEach(a=>Ou(e,a,!0))}},JF=()=>(Ou({id:"root"},{id:"root",doc:Nu},!0),{id:"root",doc:Nu}),tP=t=>{let e;t.doc?e=t.doc:e=t,B.info(e),m4(!0),B.info("Extract",e),e.forEach(r=>{switch(r.stmt){case Mu:Ms(r.id,r.type,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles);break;case fd:b4(r.state1,r.state2,r.description);break;case HF:_4(r.id,r.classes);break;case GF:bd(r.id,r.styleClass);break}})},Ms=function(t,e=Jo,r=null,n=null,i=null,s=null,a=null,o=null){Cr.states[t]===void 0?(B.info("Adding state ",t,n),Cr.states[t]={id:t,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]}):(Cr.states[t].doc||(Cr.states[t].doc=r),Cr.states[t].type||(Cr.states[t].type=e)),n&&(B.info("Setting state description",t,n),typeof n=="string"&&md(t,n.trim()),typeof n=="object"&&n.forEach(l=>md(t,l.trim()))),i&&(Cr.states[t].note=i,Cr.states[t].note.text=he.sanitizeText(Cr.states[t].note.text,$())),s&&(B.info("Setting state classes",t,s),(typeof s=="string"?[s]:s).forEach(u=>bd(t,u.trim()))),a&&(B.info("Setting state styles",t,a),(typeof a=="string"?[a]:a).forEach(u=>uP(t,u.trim()))),o&&(B.info("Setting state styles",t,a),(typeof o=="string"?[o]:o).forEach(u=>hP(t,u.trim())))},m4=function(t){Bu={root:g4()},Cr=Bu.root,el=0,tl=f4(),t||vn()},rl=function(t){return Cr.states[t]},eP=function(){return Cr.states},rP=function(){B.info("Documents = ",Bu)},nP=function(){return Cr.relations};function gd(t=""){let e=t;return t===pd&&(el++,e=`${l4}${el}`),e}function yd(t="",e=Jo){return t===pd?l4:e}function iP(t=""){let e=t;return t===c4&&(el++,e=`${u4}${el}`),e}function sP(t="",e=Jo){return t===c4?u4:e}function aP(t,e,r){let n=gd(t.id),i=yd(t.id,t.type),s=gd(e.id),a=yd(e.id,e.type);Ms(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Ms(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Cr.relations.push({id1:n,id2:s,relationTitle:he.sanitizeText(r,$())})}const b4=function(t,e,r){if(typeof t=="object")aP(t,e,r);else{const n=gd(t),i=yd(t),s=iP(e),a=sP(e);Ms(n,i),Ms(s,a),Cr.relations.push({id1:n,id2:s,title:he.sanitizeText(r,$())})}},md=function(t,e){const r=Cr.states[t],n=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(he.sanitizeText(n,$()))},oP=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},lP=()=>(y4++,"divider-id-"+y4),_4=function(t,e=""){tl[t]===void 0&&(tl[t]={id:t,styles:[],textStyles:[]});const r=tl[t];e!=null&&e.split(jF).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(n.match(h4)){const a=i.replace(d4,qF).replace(h4,d4);r.textStyles.push(a)}r.styles.push(i)})},cP=function(){return tl},bd=function(t,e){t.split(",").forEach(function(r){let n=rl(r);if(n===void 0){const i=r.trim();Ms(i),n=rl(i)}n.classes.push(e)})},uP=function(t,e){const r=rl(t);r!==void 0&&r.textStyles.push(e)},hP=function(t,e){const r=rl(t);r!==void 0&&r.textStyles.push(e)},Ci={parseDirective:KF,getConfig:()=>$().state,addState:Ms,clear:m4,getState:rl,getStates:eP,getRelations:nP,getClasses:cP,getDirection:()=>p4,addRelation:b4,getDividerId:lP,setDirection:t=>{p4=t},cleanupLabel:oP,lineType:$F,relationType:XF,logDocuments:rP,getRootDoc:QF,setRootDoc:ZF,getRootDocV2:JF,extract:tP,trimColon:t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),getAccTitle:kn,setAccTitle:nn,getAccDescription:Tn,setAccDescription:wn,addStyleClass:_4,setCssClass:bd,addDescription:md,setDiagramTitle:hi,getDiagramTitle:di},_d={},dP=(t,e)=>{_d[t]=e},fP=t=>_d[t],x4=()=>Object.keys(_d),pP={get:fP,set:dP,keys:x4,size:()=>x4().length},gP=t=>t.append("circle").attr("class","start-state").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit).attr("cy",$().state.padding+$().state.sizeUnit),yP=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",$().state.textHeight).attr("class","divider").attr("x2",$().state.textHeight*2).attr("y1",0).attr("y2",0),mP=(t,e)=>{const r=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+2*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",n.width+2*$().state.padding).attr("height",n.height+2*$().state.padding).attr("rx",$().state.radius),r},bP=(t,e)=>{const r=function(p,g,b){const k=p.append("tspan").attr("x",2*$().state.padding).text(g);b||k.attr("dy",$().state.textHeight)},i=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+1.3*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=i.height,a=t.append("text").attr("x",$().state.padding).attr("y",s+$().state.padding*.4+$().state.dividerMargin+$().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(p){o||(r(a,p,l),l=!1),o=!1});const u=t.append("line").attr("x1",$().state.padding).attr("y1",$().state.padding+s+$().state.dividerMargin/2).attr("y2",$().state.padding+s+$().state.dividerMargin/2).attr("class","descr-divider"),d=a.node().getBBox(),f=Math.max(d.width,i.width);return u.attr("x2",f+3*$().state.padding),t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",f+2*$().state.padding).attr("height",d.height+s+2*$().state.padding).attr("rx",$().state.radius),t},_P=(t,e,r)=>{const n=$().state.padding,i=2*$().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,l=t.append("text").attr("x",0).attr("y",$().state.titleShift).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),d=l.node().getBBox().width+i;let f=Math.max(d,a);f===a&&(f=f+i);let p;const g=t.node().getBBox();e.doc,p=o-n,d>a&&(p=(a-f)/2+n),Math.abs(o-g.x)<n&&d>a&&(p=o-(d-a)/2);const b=1-$().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",b).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",g.height+$().state.textHeight+$().state.titleShift+1).attr("rx","0"),l.attr("x",p+n),d<=a&&l.attr("x",o+(f-i)/2-d/2+n),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",$().state.textHeight*3).attr("rx",$().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",g.height+3+2*$().state.textHeight).attr("rx",$().state.radius),t},xP=t=>(t.append("circle").attr("class","end-state-outer").attr("r",$().state.sizeUnit+$().state.miniPadding).attr("cx",$().state.padding+$().state.sizeUnit+$().state.miniPadding).attr("cy",$().state.padding+$().state.sizeUnit+$().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit+2).attr("cy",$().state.padding+$().state.sizeUnit+2)),vP=(t,e)=>{let r=$().state.forkWidth,n=$().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",$().state.padding).attr("y",$().state.padding)},kP=(t,e,r,n)=>{let i=0;const s=n.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split(he.lineBreakRegex);let l=1.25*$().state.noteMargin;for(const u of o){const d=u.trim();if(d.length>0){const f=s.append("tspan");if(f.text(d),l===0){const p=f.node().getBBox();l+=p.height}i+=l,f.attr("x",e+$().state.noteMargin),f.attr("y",r+i+1.25*$().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},wP=(t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",$().state.padding),n=e.append("g"),{textWidth:i,textHeight:s}=kP(t,0,0,n);return r.attr("height",s+2*$().state.noteMargin),r.attr("width",i+$().state.noteMargin*2),r},v4=function(t,e){const r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&gP(i),e.type==="end"&&xP(i),(e.type==="fork"||e.type==="join")&&vP(i,e),e.type==="note"&&wP(e.note.text,i),e.type==="divider"&&yP(i),e.type==="default"&&e.descriptions.length===0&&mP(i,e),e.type==="default"&&e.descriptions.length>0&&bP(i,e);const s=i.node().getBBox();return n.width=s.width+2*$().state.padding,n.height=s.height+2*$().state.padding,pP.set(r,n),n};let k4=0;const TP=function(t,e,r){const n=function(l){switch(l){case Ci.relationType.AGGREGATION:return"aggregation";case Ci.relationType.EXTENSION:return"extension";case Ci.relationType.COMPOSITION:return"composition";case Ci.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const i=e.points,s=Js().x(function(l){return l.x}).y(function(l){return l.y}).curve(ta),a=t.append("path").attr("d",s(i)).attr("id","edge"+k4).attr("class","transition");let o="";if($().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+n(Ci.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:u,y:d}=ge.calcLabelPosition(e.points),f=he.getRows(r.title);let p=0;const g=[];let b=0,k=0;for(let E=0;E<=f.length;E++){const I=l.append("text").attr("text-anchor","middle").text(f[E]).attr("x",u).attr("y",d+p),V=I.node().getBBox();b=Math.max(b,V.width),k=Math.min(k,V.x),B.info(V.x,u,d+p),p===0&&(p=I.node().getBBox().height,B.info("Title height",p,d)),g.push(I)}let T=p*f.length;if(f.length>1){const E=(f.length-1)*p*.5;g.forEach((I,V)=>I.attr("y",d+V*p-E)),T=p*f.length}const L=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-b/2-$().state.padding/2).attr("y",d-T/2-$().state.padding/2-3.5).attr("width",b+$().state.padding).attr("height",T+$().state.padding),B.info(L)}k4++};let $r;const xd={},EP=function(){},CP=function(t){t.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")},SP=function(t,e,r,n){$r=$().state;const i=$().securityLevel;let s;i==="sandbox"&&(s=St("#i"+e));const a=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body"),o=i==="sandbox"?s.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);CP(l),new sr({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const d=n.db.getRootDoc();w4(d,l,void 0,!1,a,o,n);const f=$r.padding,p=l.node().getBBox(),g=p.width+f*2,b=p.height+f*2,k=g*1.75;xn(l,b,k,$r.useMaxWidth),l.attr("viewBox",`${p.x-$r.padding} ${p.y-$r.padding} `+g+" "+b)},AP=t=>t?t.length*$r.fontSizeFactor:1,w4=(t,e,r,n,i,s,a)=>{const o=new sr({compound:!0,multigraph:!0});let l,u=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){u=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:$r.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:$r.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const d=a.db.getStates(),f=a.db.getRelations(),p=Object.keys(d);for(const L of p){const E=d[L];r&&(E.parentId=r);let I;if(E.doc){let V=e.append("g").attr("id",E.id).attr("class","stateGroup");I=w4(E.doc,V,E.id,!n,i,s,a);{V=_P(V,E,n);let H=V.node().getBBox();I.width=H.width,I.height=H.height+$r.padding/2,xd[E.id]={y:$r.compositTitleSize}}}else I=v4(e,E);if(E.note){const V={descriptions:[],id:E.id+"-note",note:E.note,type:"note"},H=v4(e,V);E.note.position==="left of"?(o.setNode(I.id+"-note",H),o.setNode(I.id,I)):(o.setNode(I.id,I),o.setNode(I.id+"-note",H)),o.setParent(I.id,I.id+"-group"),o.setParent(I.id+"-note",I.id+"-group")}else o.setNode(I.id,I)}B.debug("Count=",o.nodeCount(),o);let g=0;f.forEach(function(L){g++,B.debug("Setting edge",L),o.setEdge(L.id1,L.id2,{relation:L,width:AP(L.title),height:$r.labelHeight*he.getRows(L.title).length,labelpos:"c"},"id"+g)}),Ea(o),B.debug("Graph after layout",o.nodes());const b=e.node();o.nodes().forEach(function(L){L!==void 0&&o.node(L)!==void 0?(B.warn("Node "+L+": "+JSON.stringify(o.node(L))),i.select("#"+b.id+" #"+L).attr("transform","translate("+(o.node(L).x-o.node(L).width/2)+","+(o.node(L).y+(xd[L]?xd[L].y:0)-o.node(L).height/2)+" )"),i.select("#"+b.id+" #"+L).attr("data-x-shift",o.node(L).x-o.node(L).width/2),s.querySelectorAll("#"+b.id+" #"+L+" .divider").forEach(I=>{const V=I.parentElement;let H=0,G=0;V&&(V.parentElement&&(H=V.parentElement.getBBox().width),G=parseInt(V.getAttribute("data-x-shift"),10),Number.isNaN(G)&&(G=0)),I.setAttribute("x1",0-G+8),I.setAttribute("x2",H-G-8)})):B.debug("No Node "+L+": "+JSON.stringify(o.node(L)))});let k=b.getBBox();o.edges().forEach(function(L){L!==void 0&&o.edge(L)!==void 0&&(B.debug("Edge "+L.v+" -> "+L.w+": "+JSON.stringify(o.edge(L))),TP(e,o.edge(L),o.edge(L).relation))}),k=b.getBBox();const T={id:r||"root",label:r||"root",width:0,height:0};return T.width=k.width+2*$r.padding,T.height=k.height+2*$r.padding,B.debug("Doc rendered",T,o),T},LP={setConf:EP,draw:SP},Ru="rect",vd="rectWithTitle",DP="start",MP="end",NP="divider",BP="roundedWithTitle",IP="note",OP="noteGroup",Ra="statediagram",RP=`${Ra}-state`,T4="transition",FP="note",PP=`${T4} note-edge`,YP=`${Ra}-${FP}`,VP=`${Ra}-cluster`,UP=`${Ra}-cluster-alt`,E4="parent",C4="note",zP="state",kd="----",WP=`${kd}${C4}`,S4=`${kd}${E4}`,A4="fill:none",L4="fill: #333",D4="c",M4="text",N4="normal";let Fu={},$i=0;const HP=function(t){const e=Object.keys(t);for(const r of e)t[r]},GP=function(t,e){B.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(r){return r}};function qP(t){return t==null?"":t.classes?t.classes.join(" "):""}function wd(t="",e=0,r="",n=kd){const i=r!==null&&r.length>0?`${n}${r}`:"";return`${zP}-${t}${i}-${e}`}const nl=(t,e,r,n,i,s)=>{const a=r.id,o=qP(n[a]);if(a!=="root"){let l=Ru;r.start===!0&&(l=DP),r.start===!1&&(l=MP),r.type!==Jo&&(l=r.type),Fu[a]||(Fu[a]={id:a,shape:l,description:he.sanitizeText(a,$()),classes:`${o} ${RP}`});const u=Fu[a];r.description&&(Array.isArray(u.description)?(u.shape=vd,u.description.push(r.description)):u.description.length>0?(u.shape=vd,u.description===a?u.description=[r.description]:u.description=[u.description,r.description]):(u.shape=Ru,u.description=r.description),u.description=he.sanitizeTextOrArray(u.description,$())),u.description.length===1&&u.shape===vd&&(u.shape=Ru),!u.type&&r.doc&&(B.info("Setting cluster for ",a,Td(r)),u.type="group",u.dir=Td(r),u.shape=r.type===o4?NP:BP,u.classes=u.classes+" "+VP+" "+(s?UP:""));const d={labelStyle:"",shape:u.shape,labelText:u.description,classes:u.classes,style:"",id:a,dir:u.dir,domId:wd(a,$i),type:u.type,padding:15};if(r.note){const f={labelStyle:"",shape:IP,labelText:r.note.text,classes:YP,style:"",id:a+WP+"-"+$i,domId:wd(a,$i,C4),type:u.type,padding:15},p={labelStyle:"",shape:OP,labelText:r.note.text,classes:u.classes,style:"",id:a+S4,domId:wd(a,$i,E4),type:"group",padding:0};$i++;const g=a+S4;t.setNode(g,p),t.setNode(f.id,f),t.setNode(a,d),t.setParent(a,g),t.setParent(f.id,g);let b=a,k=f.id;r.note.position==="left of"&&(b=f.id,k=a),t.setEdge(b,k,{arrowhead:"none",arrowType:"",style:A4,labelStyle:"",classes:PP,arrowheadStyle:L4,labelpos:D4,labelType:M4,thickness:N4})}else t.setNode(a,d)}e&&e.id!=="root"&&(B.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),r.doc&&(B.trace("Adding nodes children "),jP(t,r,r.doc,n,i,!s))},jP=(t,e,r,n,i,s)=>{B.trace("items",r),r.forEach(a=>{switch(a.stmt){case Mu:nl(t,e,a,n,i,s);break;case Jo:nl(t,e,a,n,i,s);break;case fd:{nl(t,e,a.state1,n,i,s),nl(t,e,a.state2,n,i,s);const o={id:"edge"+$i,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:A4,labelStyle:"",label:he.sanitizeText(a.description,$()),arrowheadStyle:L4,labelpos:D4,labelType:M4,thickness:N4,classes:T4};t.setEdge(a.state1.id,a.state2.id,o,$i),$i++}break}})},Td=(t,e=WF)=>{let r=e;if(t.doc)for(let n=0;n<t.doc.length;n++){const i=t.doc[n];i.stmt==="dir"&&(r=i.value)}return r},$P={setConf:HP,getClasses:GP,draw:function(t,e,r,n){B.info("Drawing state diagram (v2)",e),Fu={};let i=n.db.getDirection();i===void 0&&(i=a4);const{securityLevel:s,state:a}=$(),o=a.nodeSpacing||50,l=a.rankSpacing||50;B.info(n.db.getRootDocV2()),n.db.extract(n.db.getRootDocV2()),B.info(n.db.getRootDocV2());const u=n.db.getStates(),d=new sr({multigraph:!0,compound:!0}).setGraph({rankdir:Td(n.db.getRootDocV2()),nodesep:o,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});nl(d,void 0,n.db.getRootDocV2(),u,n.db,!0);let f;s==="sandbox"&&(f=St("#i"+e));const p=St(s==="sandbox"?f.nodes()[0].contentDocument.body:"body"),g=p.select(`[id="${e}"]`),b=p.select("#"+e+" g");v0(b,d,["barb"],Ra,e);const k=8;ge.insertTitle(g,"statediagramTitleText",a.titleTopMargin,n.db.getDiagramTitle());const T=g.node().getBBox(),L=T.width+k*2,E=T.height+k*2;g.attr("class",Ra);const I=g.node().getBBox();xn(g,E,L,a.useMaxWidth);const V=`${I.x-k} ${I.y-k} ${L} ${E}`;B.debug(`viewBox ${V}`),g.attr("viewBox",V);const H=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const G of H){const Y=G.getBBox(),W=document.createElementNS("http://www.w3.org/2000/svg",Ru);W.setAttribute("rx",0),W.setAttribute("ry",0),W.setAttribute("width",Y.width),W.setAttribute("height",Y.height),G.insertBefore(W,G.firstChild)}}};var Ed=function(){var t=function(k,T,L,E){for(L=L||{},E=k.length;E--;L[k[E]]=T);return L},e=[1,2],r=[1,5],n=[6,9,11,17,18,20,22,23,24,26],i=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],u=[1,20],d=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],p={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"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,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(T,L,E,I,V,H,G){var Y=H.length-1;switch(V){case 1:return H[Y-1];case 3:this.$=[];break;case 4:H[Y-1].push(H[Y]),this.$=H[Y-1];break;case 5:case 6:this.$=H[Y];break;case 7:case 8:this.$=[];break;case 11:I.setDiagramTitle(H[Y].substr(6)),this.$=H[Y].substr(6);break;case 12:this.$=H[Y].trim(),I.setAccTitle(this.$);break;case 13:case 14:this.$=H[Y].trim(),I.setAccDescription(this.$);break;case 15:I.addSection(H[Y].substr(8)),this.$=H[Y].substr(8);break;case 16:I.addTask(H[Y-1],H[Y]),this.$="task";break;case 18:I.parseDirective("%%{","open_directive");break;case 19:I.parseDirective(H[Y],"type_directive");break;case 20:H[Y]=H[Y].trim().replace(/'/g,'"'),I.parseDirective(H[Y],"arg_directive");break;case 21:I.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:r},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:s,20:a,22:o,23:l,24:u,26:r},{1:[2,2]},{14:22,15:[1,23],29:d},t([15,29],[2,19]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:21,10:25,12:4,17:i,18:s,20:a,22:o,23:l,24:u,26:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),{19:[1,26]},{21:[1,27]},t(n,[2,14]),t(n,[2,15]),{25:[1,28]},t(n,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(n,[2,5]),t(n,[2,12]),t(n,[2,13]),t(n,[2,16]),t(f,[2,9]),{14:32,29:d},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(T,L){if(L.recoverable)this.trace(T);else{var E=new Error(T);throw E.hash=L,E}},parse:function(T){var L=this,E=[0],I=[],V=[null],H=[],G=this.table,Y="",W=0,N=0,D=2,w=1,v=H.slice.call(arguments,1),M=Object.create(this.lexer),m={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(m.yy[Q]=this.yy[Q]);M.setInput(T,m.yy),m.yy.lexer=M,m.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var x=M.yylloc;H.push(x);var ct=M.options&&M.options.ranges;typeof m.yy.parseError=="function"?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dt(){var z;return z=I.pop()||M.lex()||w,typeof z!="number"&&(z instanceof Array&&(I=z,z=I.pop()),z=L.symbols_[z]||z),z}for(var kt,j,ot,rt,nt={},ut,_t,K,Ot;;){if(j=E[E.length-1],this.defaultActions[j]?ot=this.defaultActions[j]:((kt===null||typeof kt>"u")&&(kt=Dt()),ot=G[j]&&G[j][kt]),typeof ot>"u"||!ot.length||!ot[0]){var P="";Ot=[];for(ut in G[j])this.terminals_[ut]&&ut>D&&Ot.push("'"+this.terminals_[ut]+"'");M.showPosition?P="Parse error on line "+(W+1)+`:
`+M.showPosition()+`
Expecting `+Ot.join(", ")+", got '"+(this.terminals_[kt]||kt)+"'":P="Parse error on line "+(W+1)+": Unexpected "+(kt==w?"end of input":"'"+(this.terminals_[kt]||kt)+"'"),this.parseError(P,{text:M.match,token:this.terminals_[kt]||kt,line:M.yylineno,loc:x,expected:Ot})}if(ot[0]instanceof Array&&ot.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+kt);switch(ot[0]){case 1:E.push(kt),V.push(M.yytext),H.push(M.yylloc),E.push(ot[1]),kt=null,N=M.yyleng,Y=M.yytext,W=M.yylineno,x=M.yylloc;break;case 2:if(_t=this.productions_[ot[1]][1],nt.$=V[V.length-_t],nt._$={first_line:H[H.length-(_t||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(_t||1)].first_column,last_column:H[H.length-1].last_column},ct&&(nt._$.range=[H[H.length-(_t||1)].range[0],H[H.length-1].range[1]]),rt=this.performAction.apply(nt,[Y,N,W,m.yy,ot[1],V,H].concat(v)),typeof rt<"u")return rt;_t&&(E=E.slice(0,-1*_t*2),V=V.slice(0,-1*_t),H=H.slice(0,-1*_t)),E.push(this.productions_[ot[1]][0]),V.push(nt.$),H.push(nt._$),K=G[E[E.length-2]][E[E.length-1]],E.push(K);break;case 3:return!0}}return!0}},g=function(){var k={EOF:1,parseError:function(L,E){if(this.yy.parser)this.yy.parser.parseError(L,E);else throw new Error(L)},setInput:function(T,L){return this.yy=L||this.yy||{},this._input=T,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 T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var L=T.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},unput:function(T){var L=T.length,E=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var I=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),E.length-1&&(this.yylineno-=E.length-1);var V=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===I.length?this.yylloc.first_column:0)+I[I.length-E.length].length-E[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(T){this.unput(this.match.slice(T))},pastInput:function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var T=this.pastInput(),L=new Array(T.length+1).join("-");return T+this.upcomingInput()+`
`+L+"^"},test_match:function(T,L){var E,I,V;if(this.options.backtrack_lexer&&(V={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(V.yylloc.range=this.yylloc.range.slice(0))),I=T[0].match(/(?:\r\n?|\n).*/g),I&&(this.yylineno+=I.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:I?I[I.length-1].length-I[I.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,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(T[0].length),this.matched+=T[0],E=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var H in V)this[H]=V[H];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,L,E,I;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),H=0;H<V.length;H++)if(E=this._input.match(this.rules[V[H]]),E&&(!L||E[0].length>L[0].length)){if(L=E,I=H,this.options.backtrack_lexer){if(T=this.test_match(E,V[H]),T!==!1)return T;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(T=this.test_match(L,V[I]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){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(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(L,E,I,V){switch(I){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:break;case 6:break;case 7:return 11;case 8:break;case 9:break;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}}};return k}();p.lexer=g;function b(){this.yy={}}return b.prototype=p,p.Parser=b,new b}();Ed.parser=Ed;const XP=Ed,KP=t=>t.match(/^\s*journey/)!==null;let Fa="";const Cd=[],il=[],sl=[],ZP=function(t,e,r){ze.parseDirective(this,t,e,r)},QP=function(){Cd.length=0,il.length=0,Fa="",sl.length=0,vn()},JP=function(t){Fa=t,Cd.push(t)},tY=function(){return Cd},eY=function(){let t=B4();const e=100;let r=0;for(;!t&&r<e;)t=B4(),r++;return il.push(...sl),il},rY=function(){const t=[];return il.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},nY=function(t,e){const r=e.substr(1).split(":");let n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));const s=i.map(o=>o.trim()),a={section:Fa,type:Fa,people:s,task:t,score:n};sl.push(a)},iY=function(t){const e={section:Fa,type:Fa,description:t,task:t,classes:[]};il.push(e)},B4=function(){const t=function(r){return sl[r].processed};let e=!0;for(const[r,n]of sl.entries())t(r),e=e&&n.processed;return e},I4={parseDirective:ZP,getConfig:()=>$().journey,clear:QP,setDiagramTitle:hi,getDiagramTitle:di,setAccTitle:nn,getAccTitle:kn,setAccDescription:wn,getAccDescription:Tn,addSection:JP,getSections:tY,getTasks:eY,addTask:nY,addTaskOrg:iY,getActors:function(){return rY()}},Pu=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},sY=function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(l){const u=jh().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const u=jh().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?s(i):e.score<3?a(i):o(i),n},O4=function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},R4=function(t,e){const r=e.text.replace(/<br\s*\/?>/gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},aY=function(t,e){function r(i,s,a,o,l){return i+","+s+" "+(i+a)+","+s+" "+(i+a)+","+(s+o-l)+" "+(i+a-l*1.2)+","+(s+o)+" "+i+","+(s+o)}const n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,R4(t,e)},oY=function(t,e,r){const n=t.append("g"),i=Sd();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Pu(n,i),P4(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)};let F4=-1;const lY=function(t,e,r){const n=e.x+r.width/2,i=t.append("g");F4++;const s=300+5*30;i.append("line").attr("id","task"+F4).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),sY(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});const a=Sd();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Pu(i,a);let o=e.x+14;e.people.forEach(l=>{const u=e.actors[l].color,d={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};O4(i,d),o+=10}),P4(r)(e.task,i,a.x,a.y,a.width,a.height,{class:"task"},r,e.colour)},cY=function(t,e){Pu(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},uY=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},Sd=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},P4=function(){function t(i,s,a,o,l,u,d,f){const p=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(p,d)}function e(i,s,a,o,l,u,d,f,p){const{taskFontSize:g,taskFontFamily:b}=f,k=i.split(/<br\s*\/?>/gi);for(let T=0;T<k.length;T++){const L=T*g-g*(k.length-1)/2,E=s.append("text").attr("x",a+l/2).attr("y",o).attr("fill",p).style("text-anchor","middle").style("font-size",g).style("font-family",b);E.append("tspan").attr("x",a+l/2).attr("dy",L).text(k[T]),E.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(E,d)}}function r(i,s,a,o,l,u,d,f){const p=s.append("switch"),b=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,a,o,l,u,d,f),n(b,d)}function n(i,s){for(const a in s)a in s&&i.attr(a,s[a])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),al={drawRect:Pu,drawCircle:O4,drawSection:oY,drawText:R4,drawLabel:aY,drawTask:lY,drawBackgroundRect:cY,getTextObj:uY,getNoteRect:Sd,initGraphics:function(t){t.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")}},hY=function(t){Object.keys(t).forEach(function(r){Yu[r]=t[r]})},Si={};function dY(t){const e=$().journey;let r=60;Object.keys(Si).forEach(n=>{const i=Si[n].color,s={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:Si[n].position};al.drawCircle(t,s);const a={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};al.drawText(t,a),r+=20})}const Yu=$().journey,Ns=Yu.leftMargin,fY=function(t,e,r,n){const i=$().journey;n.db.clear(),n.parser.parse(t+`
`);const s=$().securityLevel;let a;s==="sandbox"&&(a=St("#i"+e));const o=St(s==="sandbox"?a.nodes()[0].contentDocument.body:"body");an.init();const l=o.select("#"+e);al.initGraphics(l);const u=n.db.getTasks(),d=n.db.getDiagramTitle(),f=n.db.getActors();for(const L in Si)delete Si[L];let p=0;f.forEach(L=>{Si[L]={color:i.actorColours[p%i.actorColours.length],position:p},p++}),dY(l),an.insert(0,0,Ns,Object.keys(Si).length*50),pY(l,u,0);const g=an.getBounds();d&&l.append("text").text(d).attr("x",Ns).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const b=g.stopy-g.starty+2*i.diagramMarginY,k=Ns+g.stopx+2*i.diagramMarginX;xn(l,b,k,i.useMaxWidth),l.append("line").attr("x1",Ns).attr("y1",i.height*4).attr("x2",k-Ns-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const T=d?70:0;l.attr("viewBox",`${g.startx} -25 ${k} ${b+T}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",b+T+25)},an={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(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,e,r,n){const i=$().journey,s=this;let a=0;function o(l){return function(d){a++;const f=s.sequenceItems.length-a+1;s.updateVal(d,"starty",e-f*i.boxMargin,Math.min),s.updateVal(d,"stopy",n+f*i.boxMargin,Math.max),s.updateVal(an.data,"startx",t-f*i.boxMargin,Math.min),s.updateVal(an.data,"stopx",r+f*i.boxMargin,Math.max),l!=="activation"&&(s.updateVal(d,"startx",t-f*i.boxMargin,Math.min),s.updateVal(d,"stopx",r+f*i.boxMargin,Math.max),s.updateVal(an.data,"starty",e-f*i.boxMargin,Math.min),s.updateVal(an.data,"stopy",n+f*i.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,r,n){const i=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,n),o=Math.max(e,n);this.updateVal(an.data,"startx",i,Math.min),this.updateVal(an.data,"starty",a,Math.min),this.updateVal(an.data,"stopx",s,Math.max),this.updateVal(an.data,"stopy",o,Math.max),this.updateBounds(i,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Ad=Yu.sectionFills,Y4=Yu.sectionColours,pY=function(t,e,r){const n=$().journey;let i="";const s=n.height*2+n.diagramMarginY,a=r+s;let o=0,l="#CCC",u="black",d=0;for(const[f,p]of e.entries()){if(i!==p.section){l=Ad[o%Ad.length],d=o%Ad.length,u=Y4[o%Y4.length];const b={x:f*n.taskMargin+f*n.width+Ns,y:50,text:p.section,fill:l,num:d,colour:u};al.drawSection(t,b,n),i=p.section,o++}const g=p.people.reduce((b,k)=>(Si[k]&&(b[k]=Si[k]),b),{});p.x=f*n.taskMargin+f*n.width+Ns,p.y=a,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=u,p.fill=l,p.num=d,p.actors=g,al.drawTask(t,p,n),an.insert(p.x,p.y,p.x+p.width+n.taskMargin,300+5*30)}},V4={setConf:hY,draw:fY};let U4={};const Ld={setConf:function(t){U4={...U4,...t}},draw:(t,e,r)=>{try{B.debug(`Renering svg for syntax error
`);const n=St("#"+e),i=n.append("g");i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),n.attr("height",100),n.attr("width",500),n.attr("viewBox","768 0 912 512")}catch(n){B.error("Error while rendering info diagram"),B.error(UT(n))}}};let z4=!1;const ol=()=>{z4||(z4=!0,yr("error",{db:{clear:()=>{}},styles:eg,renderer:Ld,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),yr("c4",{parser:HE,db:xg,renderer:Lg,styles:lg,init:t=>{Lg.setConf(t.c4)}},GE),yr("class",{parser:Dg,db:fa,renderer:dB,styles:go,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fa.clear()}},MC),yr("classDiagram",{parser:Dg,db:fa,renderer:uI,styles:go,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,fa.clear()}},NC),yr("er",{parser:hI,db:yI,renderer:DI,styles:tg},dI),yr("gantt",{parser:XO,db:Z0,renderer:SR,styles:rg},KO),yr("info",{parser:AR,db:LR,renderer:DR,styles:ng},MR),yr("pie",{parser:NR,db:IR,renderer:OR,styles:ig},BR),yr("requirement",{parser:RR,db:PR,renderer:GR,styles:sg},FR),yr("sequence",{parser:qR,db:j3,renderer:i4,styles:ag,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");j3.setWrap(t.wrap),i4.setConf(t.sequence)}},jR),yr("state",{parser:s4,db:Ci,renderer:LP,styles:Lc,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ci.clear()}},UF),yr("stateDiagram",{parser:s4,db:Ci,renderer:$P,styles:Lc,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ci.clear()}},zF),yr("journey",{parser:XP,db:I4,renderer:V4,styles:og,init:t=>{V4.setConf(t.journey),I4.clear()}},KP),yr("flowchart",{parser:jm,db:vi,renderer:Y0,styles:Ac,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,jO.setConf(t.flowchart),vi.clear(),vi.setGen("gen-1")}},MI),yr("flowchart-v2",{parser:jm,db:vi,renderer:Y0,styles:Ac,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Xp({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Y0.setConf(t.flowchart),vi.clear(),vi.setGen("gen-2")}},NI),yr("gitGraph",{parser:gE,db:OE,renderer:zE,styles:WE},yE))};class Dd{constructor(e,r){za(this,"type","graph");za(this,"parser");za(this,"renderer");za(this,"db");za(this,"detectTypeFailed",!1);var a,o;this.txt=e;const n=$();this.txt=e;try{this.type=h1(e,n)}catch(l){this.handleError(l,r),this.type="error",this.detectTypeFailed=!0}const i=ug(this.type);B.debug("Type "+this.type),this.db=i.db,(o=(a=this.db).clear)==null||o.call(a),this.renderer=i.renderer,this.parser=i.parser;const s=this.parser.parse.bind(this.parser);this.parser.parse=l=>s(_7(l,this.db)),this.parser.parser.yy=this.db,i.init&&(i.init(n),B.debug("Initialized diagram "+this.type,n)),this.txt+=`
`,this.parse(this.txt,r)}parse(e,r){var n,i;if(this.detectTypeFailed)return!1;try{return e=e+`
`,(i=(n=this.db).clear)==null||i.call(n),this.parser.parse(e),!0}catch(s){this.handleError(s,r)}return!1}handleError(e,r){if(r===void 0)throw e;if(m1(e)){r(e.str,e.hash);return}r(e)}getParser(){return this.parser}getType(){return this.type}}const Md=(t,e)=>{const r=h1(t,$());try{ug(r)}catch{const i=k7(r);if(!i)throw new Error(`Diagram ${r} not found.`);return i().then(({diagram:s})=>(yr(r,s,void 0),new Dd(t,e)))}return new Dd(t,e)},Nd=Dd;function gY(t,e){wa(e)||t.attr("aria-roledescription",e)}function yY(t,e,r,n){if(t.insert!==void 0)if(e||r){if(r){const i="chart-desc-"+n;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i="chart-title-"+n;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}else return}const Bd=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],W4="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",H4="sandbox",G4="loose",mY="http://www.w3.org/2000/svg",q4="http://www.w3.org/1999/xlink",j4="http://www.w3.org/1999/xhtml",bY="100%",_Y="100%",xY="border:0;margin:0;",vY="margin:0",kY="allow-top-navigation-by-user-activation allow-popups",wY='The "iframe" tag is not supported by your browser.',$4=["foreignobject"],X4=["dominant-baseline"];function TY(t,e){return ol(),new Nd(t,e).parse(t,e)}async function EY(t,e){return ol(),(await Md(t,e)).parse(t,e)}const K4=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},Id=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},Z4=(t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,CY=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
${t.themeCSS}`),t.fontFamily!==void 0&&(n+=`
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=`
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!wa(r)&&Bd.includes(e)){const l=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const u in r){const d=r[u];wa(d.styles)||l.forEach(f=>{n+=Z4(d.id,f,d.styles)}),wa(d.textStyles)||(n+=Z4(d.id,"tspan",d.textStyles))}}return n},Q4=(t,e,r,n)=>{const i=CY(t,e,r),s=hE(e,i,t.themeVariables);return T1(tE(`${n}{${s}}`),rE)},J4=(t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),n=Id(n),n=n.replace(/<br>/g,"<br/>"),n},tb=(t="",e)=>{const r=e?e.viewBox.baseVal.height+"px":_Y,n=btoa('<body style="'+vY+'">'+t+"</body>");return`<iframe style="width:${bY};height:${r};${xY}" src="data:text/html;base64,${n}" sandbox="${kY}">
${wY}
</iframe>`},Vu=(t,e,r,n,i)=>{const s=t.append("div");s.attr("id",r),n&&s.attr("style",n);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",mY);return i&&a.attr("xmlns:xlink",i),a.append("g"),t};function Uu(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const eb=(t,e,r,n)=>{var i,s,a;(i=t.getElementById(e))==null||i.remove(),(s=t.getElementById(r))==null||s.remove(),(a=t.getElementById(n))==null||a.remove()},SY=function(t,e,r,n){var m,Q,x,ct,Dt;ol(),po();const i=ge.detectInit(e);i&&(bs(i),E1(i));const s=$();B.debug(s),e.length>((m=s==null?void 0:s.maxTextSize)!=null?m:5e4)&&(e=W4),e=e.replace(/\r\n?/g,`
`);const a="#"+t,o="i"+t,l="#"+o,u="d"+t,d="#"+u;let f=St("body");const p=s.securityLevel===H4,g=s.securityLevel===G4,b=s.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=""),p){const kt=Uu(St(n),o);f=St(kt.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=St(n);Vu(f,t,u,`font-family: ${b}`,q4)}else{if(eb(document,t,u,o),p){const kt=Uu(St("body"),o);f=St(kt.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=St("body");Vu(f,t,u)}e=K4(e);let k,T;try{if(k=Md(e),"then"in k)throw new Error("Diagram is a promise. Use renderAsync.")}catch(kt){k=new Nd("error"),T=kt}const L=f.select(d).node(),E=k.type,I=L.firstChild,V=I.firstChild,H=Bd.includes(E)?k.renderer.getClasses(e,k):{},G=Q4(s,E,H,a),Y=document.createElement("style");Y.innerHTML=G,I.insertBefore(Y,V);try{k.renderer.draw(e,t,Ec.version,k)}catch(kt){throw Ld.draw(e,t,Ec.version),kt}const W=f.select(`${d} svg`),N=(x=(Q=k.db).getAccTitle)==null?void 0:x.call(Q),D=(Dt=(ct=k.db).getAccDescription)==null?void 0:Dt.call(ct);rb(E,W,N,D),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",j4);let w=f.select(d).node().innerHTML;if(B.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),w=J4(w,p,pr(s.arrowMarkerAbsolute)),p){const kt=f.select(d+" svg").node();w=tb(w,kt)}else g||(w=io.sanitize(w,{ADD_TAGS:$4,ADD_ATTR:X4}));if(r!==void 0)switch(E){case"flowchart":case"flowchart-v2":r(w,vi.bindFunctions);break;case"gantt":r(w,Z0.bindFunctions);break;case"class":case"classDiagram":r(w,fa.bindFunctions);break;default:r(w)}else B.debug("CB = undefined!");$3();const M=St(p?l:d).node();if(M&&"remove"in M&&M.remove(),T)throw T;return w},AY=async function(t,e,r,n){var m,Q,x,ct,Dt;ol(),po();const i=ge.detectInit(e);i&&(bs(i),E1(i));const s=$();B.debug(s),e.length>((m=s==null?void 0:s.maxTextSize)!=null?m:5e4)&&(e=W4),e=e.replace(/\r\n?/g,`
`);const a="#"+t,o="i"+t,l="#"+o,u="d"+t,d="#"+u;let f=St("body");const p=s.securityLevel===H4,g=s.securityLevel===G4,b=s.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=""),p){const kt=Uu(St(n),o);f=St(kt.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=St(n);Vu(f,t,u,`font-family: ${b}`,q4)}else{if(eb(document,t,u,o),p){const kt=Uu(St("body"),o);f=St(kt.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=St("body");Vu(f,t,u)}e=K4(e);let k,T;try{k=await Md(e)}catch(kt){k=new Nd("error"),T=kt}const L=f.select(d).node(),E=k.type,I=L.firstChild,V=I.firstChild,H=Bd.includes(E)?k.renderer.getClasses(e,k):{},G=Q4(s,E,H,a),Y=document.createElement("style");Y.innerHTML=G,I.insertBefore(Y,V);try{await k.renderer.draw(e,t,Ec.version,k)}catch(kt){throw Ld.draw(e,t,Ec.version),kt}const W=f.select(`${d} svg`),N=(x=(Q=k.db).getAccTitle)==null?void 0:x.call(Q),D=(Dt=(ct=k.db).getAccDescription)==null?void 0:Dt.call(ct);rb(E,W,N,D),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",j4);let w=f.select(d).node().innerHTML;if(B.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),w=J4(w,p,pr(s.arrowMarkerAbsolute)),p){const kt=f.select(d+" svg").node();w=tb(w,kt)}else g||(w=io.sanitize(w,{ADD_TAGS:$4,ADD_ATTR:X4}));if(r!==void 0)switch(E){case"flowchart":case"flowchart-v2":r(w,vi.bindFunctions);break;case"gantt":r(w,Z0.bindFunctions);break;case"class":case"classDiagram":r(w,fa.bindFunctions);break;default:r(w)}else B.debug("CB = undefined!");$3();const M=St(p?l:d).node();if(M&&"remove"in M&&M.remove(),T)throw T;return w};let Bs={};const LY=function(t,e,r,n){try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":Bs={};break;case"type_directive":if(!Bs)throw new Error("currentDirective is undefined");Bs.type=e.toLowerCase();break;case"arg_directive":if(!Bs)throw new Error("currentDirective is undefined");Bs.args=JSON.parse(e);break;case"close_directive":DY(t,Bs,n),Bs=void 0;break}}catch(i){B.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),B.error(i.message)}},DY=function(t,e,r){switch(B.debug(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(n=>{e.args[n]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[n],delete e.args[n])}),B.debug("sanitize in handleDirective",e.args),bs(e.args),B.debug("sanitize in handleDirective (done)",e.args),E1(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":B.warn("themeCss encountered");break;default:B.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}};function MY(t={}){var r;(t==null?void 0:t.fontFamily)&&!((r=t.themeVariables)!=null&&r.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),iE(t),(t==null?void 0:t.theme)&&t.theme in oi?t.themeVariables=oi[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=oi.default.getThemeVariables(t.themeVariables));const e=typeof t=="object"?nE(t):$p();Qu(e.logLevel),ol()}function rb(t,e,r,n){gY(e,t),yY(e,r,n,e.attr("id"))}const ze=Object.freeze({render:SY,renderAsync:AY,parse:TY,parseAsync:EY,parseDirective:LY,initialize:MY,getConfig:$,setConfig:Xp,getSiteConfig:$p,updateSiteConfig:sE,reset:()=>{po()},globalReset:()=>{po(ha)},defaultConfig:ha});Qu($().logLevel),po($());let nb=!1;const NY=async function(t,e,r){try{nb?await ab(t,e,r):sb(t,e,r)}catch(n){B.warn("Syntax Error rendering"),m1(n)&&B.warn(n.str),on.parseError&&on.parseError(n)}},ib=(t,e,r)=>{B.warn(t),m1(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},sb=function(t,e,r){const n=ze.getConfig();t&&(on.sequenceConfig=t),B.debug(`${r?"":"No "}Callback function found`);let i;if(e===void 0)i=document.querySelectorAll(".mermaid");else if(typeof e=="string")i=document.querySelectorAll(e);else if(e instanceof HTMLElement)i=[e];else if(e instanceof NodeList)i=e;else throw new Error("Invalid argument nodes for mermaid.init");B.debug(`Found ${i.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(B.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ze.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new ge.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const o=[];for(const l of Array.from(i)){B.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=l.innerHTML,a=ge.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=ge.detectInit(a);d&&B.debug("Detected early reinit: ",d);try{ze.render(u,a,(f,p)=>{l.innerHTML=f,r!==void 0&&r(u),p&&p(l)},l)}catch(f){ib(f,o,on.parseError)}}if(o.length>0)throw o[0]},BY=t=>{for(const{id:e,detector:r,loader:n}of t)Lp(e,r,n)},IY=async t=>{B.debug(`Loading ${t.length} external diagrams`);const r=(await Promise.allSettled(t.map(async({id:n,detector:i,loader:s})=>{const{diagram:a}=await s();yr(n,a,i)}))).filter(n=>n.status==="rejected");if(r.length>0){B.error(`Failed to load ${r.length} external diagrams`);for(const n of r)B.error(n);throw new Error(`Failed to load ${r.length} external diagrams`)}},ab=async function(t,e,r){const n=ze.getConfig();t&&(on.sequenceConfig=t),B.debug(`${r?"":"No "}Callback function found`);let i;if(e===void 0)i=document.querySelectorAll(".mermaid");else if(typeof e=="string")i=document.querySelectorAll(e);else if(e instanceof HTMLElement)i=[e];else if(e instanceof NodeList)i=e;else throw new Error("Invalid argument nodes for mermaid.init");B.debug(`Found ${i.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(B.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ze.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new ge.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let a;const o=[];for(const l of Array.from(i)){B.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=l.innerHTML,a=ge.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=ge.detectInit(a);d&&B.debug("Detected early reinit: ",d);try{await ze.renderAsync(u,a,(f,p)=>{l.innerHTML=f,r!==void 0&&r(u),p&&p(l)},l)}catch(f){ib(f,o,on.parseError)}}if(o.length>0)throw o[0]},OY=function(t){ze.initialize(t)},RY=async(t,{lazyLoad:e=!0}={})=>{e?BY(t):await IY(t),nb=!0},ob=function(){if(on.startOnLoad){const{startOnLoad:t}=ze.getConfig();t&&on.init()}};if(typeof document<"u"){/*!
* Wait for document loaded before starting the execution
*/window.addEventListener("load",ob,!1)}const FY=function(t){on.parseError=t},PY=t=>ze.parse(t,on.parseError),zu=[];let Od=!1;const lb=async()=>{if(!Od){for(Od=!0;zu.length>0;){const t=zu.shift();if(t)try{await t()}catch(e){B.error("Error executing queue",e)}}Od=!1}},YY=t=>new Promise((e,r)=>{const n=()=>new Promise((i,s)=>{ze.parseAsync(t,on.parseError).then(a=>{i(a),e(a)},a=>{B.error("Error parsing",a),s(a),r(a)})});zu.push(n),lb()}),VY=(t,e,r,n)=>new Promise((i,s)=>{const a=()=>new Promise((o,l)=>{ze.renderAsync(t,e,r,n).then(u=>{o(u),i(u)},u=>{B.error("Error parsing",u),l(u),s(u)})});zu.push(a),lb()}),on={startOnLoad:!0,diagrams:{},mermaidAPI:ze,parse:PY,parseAsync:YY,render:ze.render,renderAsync:VY,init:NY,initThrowsErrors:sb,initThrowsErrorsAsync:ab,registerExternalDiagrams:RY,initialize:OY,parseError:void 0,contentLoaded:ob,setParseErrorHandler:FY};return on});
//# sourceMappingURL=mermaid.min.js.map