mirror of
https://github.com/pocketpy/pocketpy
synced 2026-06-21 16:07:10 +08:00
3 lines
3.0 MiB
3 lines
3.0 MiB
/*! Retype v4.6.0 | retype.com | Copyright 2026. Retype, Inc. All rights reserved. */
|
||
|
||
(()=>{var t={9119(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750(t,e,r){"use strict";e.J=function(t){if(!t)return n.BLANK_URL;var e,r=a(t.trim());do{e=(r=a(r=i(r).replace(n.htmlCtrlEntityRegex,"").replace(n.ctrlCharactersRegex,"").replace(n.whitespaceEscapeCharsRegex,"").trim())).match(n.ctrlCharactersRegex)||r.match(n.htmlEntitiesRegex)||r.match(n.htmlCtrlEntityRegex)||r.match(n.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=r;if(!o)return n.BLANK_URL;if(function(t){return n.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(n.urlSchemeRegex);if(!l)return o;var c=l[0].toLowerCase().trim();if(n.invalidProtocolRegex.test(c))return n.BLANK_URL;var h=s.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return n.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h};var n=r(9119);function i(t){return t.replace(n.ctrlCharactersRegex,"").replace(n.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},7799(t,e,r){var n;n=function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(0).FDLayoutConstants;function i(){}for(var a in n)i[a]=n[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=i},function(t,e,r){"use strict";var n=r(0).FDLayoutEdge;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},function(t,e,r){"use strict";var n=r(0).LGraph;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},function(t,e,r){"use strict";var n=r(0).LGraphManager;function i(t){n.call(this,t)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},function(t,e,r){"use strict";var n=r(0).FDLayoutNode,i=r(0).IMath;function a(t,e,r,i){n.call(this,t,e,r,i)}for(var o in a.prototype=Object.create(n.prototype),n)a[o]=n[o];a.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.moveBy(t,e),r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},a.prototype.setPred1=function(t){this.pred1=t},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(t){this.next=t},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(t){this.processed=t},a.prototype.isProcessed=function(){return processed},t.exports=a},function(t,e,r){"use strict";var n=r(0).FDLayout,i=r(4),a=r(3),o=r(5),s=r(2),l=r(1),c=r(0).FDLayoutConstants,h=r(0).LayoutConstants,u=r(0).Point,d=r(0).PointD,p=r(0).Layout,f=r(0).Integer,g=r(0).IGeometry,m=r(0).LGraph,y=r(0).Transform;function v(){n.call(this),this.toBeTiled={}}for(var b in v.prototype=Object.create(n.prototype),n)v[b]=n[b];v.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},v.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},v.prototype.newNode=function(t){return new o(this.graphManager,t)},v.prototype.newEdge=function(t){return new s(null,null,t)},v.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=c.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=c.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=c.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return h.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var n=t[r].rect,i=t[r].id;e[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return e},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===c.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,r=[],n=this.graphManager.getGraphs(),i=n.length;for(e=0;e<i;e++)(t=n[e]).updateConnected(),t.isConnected||(r=r.concat(t.getNodes()));return r},v.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,r=new Set;for(e=0;e<t.length;e++){var n=t[e];if(!r.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new d),n.getBendpoints().push(new d),this.createDummyNodesForBendpoints(n),r.add(n);else{var o=[];if(o=(o=o.concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i)),!r.has(o[0])){var s;if(o.length>1)for(s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new d),this.createDummyNodesForBendpoints(l)}o.forEach(function(t){r.add(t)})}}}if(r.size==t.length)break}},v.prototype.positionNodesRadially=function(t){for(var e=new u(0,0),r=Math.ceil(Math.sqrt(t.length)),n=0,i=0,a=0,o=new d(0,0),s=0;s<t.length;s++){s%r==0&&(a=0,i=n,0!=s&&(i+=l.DEFAULT_COMPONENT_SEPERATION),n=0);var c=t[s],f=p.findCenterOfTree(c);e.x=a,e.y=i,(o=v.radialLayout(c,f,e)).y>n&&(n=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(h.WORLD_CENTER_X-o.x/2,h.WORLD_CENTER_Y-o.y/2))},v.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),l.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,n);var i=m.calculateBounds(t),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(r.x),a.setWorldOrgY(r.y);for(var o=0;o<t.length;o++)t[o].transform(a);var s=new d(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},v.branchRadialLayout=function(t,e,r,n,i,a){var o=(n-r+1)/2;o<0&&(o+=180);var s=(o+r)%360*g.TWO_PI/360,l=(Math.cos(s),i*Math.cos(s)),c=i*Math.sin(s);t.setCenter(l,c);var h=[],u=(h=h.concat(t.getEdges())).length;null!=e&&u--;for(var d,p=0,f=h.length,m=t.getEdgesBetween(e);m.length>1;){var y=m[0];m.splice(0,1);var b=h.indexOf(y);b>=0&&h.splice(b,1),f--,u--}d=null!=e?(h.indexOf(m[0])+1)%f:0;for(var x=Math.abs(n-r)/u,T=d;p!=u;T=++T%f){var w=h[T].getOtherEnd(t);if(w!=e){var k=(r+p*x)%360,C=(k+x)%360;v.branchRadialLayout(w,t,k,C,i+a,a),p++}}},v.maxDiagonalInTree=function(t){for(var e=f.MIN_VALUE,r=0;r<t.length;r++){var n=t[r].getDiagonal();n>e&&(e=n)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var r=[],n=this.graphManager.getAllNodes(),i=0;i<n.length;i++){var a=(s=n[i]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=a.id&&this.getToBeTiled(a)||r.push(s)}for(i=0;i<r.length;i++){var s,l=(s=r[i]).getParent().id;void 0===e[l]&&(e[l]=[]),e[l]=e[l].concat(s)}Object.keys(e).forEach(function(r){if(e[r].length>1){var n="DummyCompound_"+r;t.memberGroups[n]=e[r];var i=e[r][0].getParent(),a=new o(t.graphManager);a.id=n,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[n]=a;var s=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;c<e[r].length;c++){var h=e[r][c];l.remove(h),s.add(h)}}})},v.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},v.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(r){var n=t.idToDummyNode[r];e[r]=t.tileNodes(t.memberGroups[r],n.paddingLeft+n.paddingRight),n.rect.width=e[r].width,n.rect.height=e[r].height})},v.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],r=e.id,n=e.paddingLeft,i=e.paddingTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,n,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(r){var n=t.idToDummyNode[r],i=n.paddingLeft,a=n.paddingTop;t.adjustLocations(e[r],n.rect.x,n.rect.y,i,a)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var r=t.getChild();if(null==r)return this.toBeTiled[e]=!1,!1;for(var n=r.getNodes(),i=0;i<n.length;i++){var a=n[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;n<e.length;n++){var i=e[n];i.getSource().id!==i.getTarget().id&&(r+=1)}return r},v.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var r=t.getChild().getNodes(),n=0;n<r.length;n++){var i=r[n];e+=this.getNodeDegreeWithChildren(i)}return e},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},v.prototype.adjustLocations=function(t,e,r,n,i){r+=i;for(var a=e+=n,o=0;o<t.rows.length;o++){var s=t.rows[o];e=a;for(var l=0,c=0;c<s.length;c++){var h=s[c];h.rect.x=e,h.rect.y=r,e+=h.rect.width+t.horizontalPadding,h.rect.height>l&&(l=h.rect.height)}r+=l+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var i=e[n];r.tiledMemberPack[n]=r.tileNodes(t[n],i.paddingLeft+i.paddingRight),i.rect.width=r.tiledMemberPack[n].width,i.rect.height=r.tiledMemberPack[n].height})},v.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0});for(var n=0;n<t.length;n++){var i=t[n];0==r.rows.length?this.insertNodeToRow(r,i,0,e):this.canAddHorizontal(r,i.rect.width,i.rect.height)?this.insertNodeToRow(r,i,this.getShortestRowIndex(r),e):this.insertNodeToRow(r,i,r.rows.length,e),this.shiftToLastRow(r)}return r},v.prototype.insertNodeToRow=function(t,e,r,n){var i=n;r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(i),t.rowHeight.push(0));var a=t.rowWidth[r]+e.rect.width;t.rows[r].length>0&&(a+=t.horizontalPadding),t.rowWidth[r]=a,t.width<a&&(t.width=a);var o=e.rect.height;r>0&&(o+=t.verticalPadding);var s=0;o>t.rowHeight[r]&&(s=t.rowHeight[r],t.rowHeight[r]=o,s=t.rowHeight[r]-s),t.height+=s,t.rows[r].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<r&&(e=n,r=t.rowWidth[n]);return e},v.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>r&&(e=n,r=t.rowWidth[n]);return e},v.prototype.canAddHorizontal=function(t,e,r){var n=this.getShortestRowIndex(t);if(n<0)return!0;var i=t.rowWidth[n];if(i+t.horizontalPadding+e<=t.width)return!0;var a,o,s=0;return t.rowHeight[n]<r&&n>0&&(s=r+t.verticalPadding-t.rowHeight[n]),a=t.width-i>=e+t.horizontalPadding?(t.height+s)/(i+e+t.horizontalPadding):(t.height+s)/t.width,s=r+t.verticalPadding,(o=t.width<e?(t.height+s)/e:(t.height+s)/t.width)<1&&(o=1/o),a<1&&(a=1/a),a<o},v.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,n=t.rows[e],i=n[n.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var o=Number.MIN_VALUE,s=0;s<n.length;s++)n[s].height>o&&(o=n[s].height);e>0&&(o+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[r];t.rowHeight[e]=o,t.rowHeight[r]<i.height+t.verticalPadding&&(t.rowHeight[r]=i.height+t.verticalPadding);var c=t.rowHeight[e]+t.rowHeight[r];t.height+=c-l,this.shiftToLastRow(t)}},v.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var t,e=[],r=!0;r;){var n=this.graphManager.getAllNodes(),i=[];r=!1;for(var a=0;a<n.length;a++)1!=(t=n[a]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(i.push([t,t.getEdges()[0],t.getOwner()]),r=!0);if(1==r){for(var o=[],s=0;s<i.length;s++)1==i[s][0].getEdges().length&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(t){for(var e,r=t[t.length-1],n=0;n<r.length;n++)e=r[n],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(t){var e,r,n=t[0],i=(r=n==t[1].source?t[1].target:t[1].source).startX,a=r.finishX,o=r.startY,s=r.finishY,l=[0,0,0,0];if(o>0)for(var h=i;h<=a;h++)l[0]+=this.grid[h][o-1].length+this.grid[h][o].length-1;if(a<this.grid.length-1)for(h=o;h<=s;h++)l[1]+=this.grid[a+1][h].length+this.grid[a][h].length-1;if(s<this.grid[0].length-1)for(h=i;h<=a;h++)l[2]+=this.grid[h][s+1].length+this.grid[h][s].length-1;if(i>0)for(h=o;h<=s;h++)l[3]+=this.grid[i-1][h].length+this.grid[i][h].length-1;for(var u,d,p=f.MAX_VALUE,g=0;g<l.length;g++)l[g]<p?(p=l[g],u=1,d=g):l[g]==p&&u++;if(3==u&&0==p)0==l[0]&&0==l[1]&&0==l[2]?e=1:0==l[0]&&0==l[1]&&0==l[3]?e=0:0==l[0]&&0==l[2]&&0==l[3]?e=3:0==l[1]&&0==l[2]&&0==l[3]&&(e=2);else if(2==u&&0==p){var m=Math.floor(2*Math.random());e=0==l[0]&&0==l[1]?0==m?0:1:0==l[0]&&0==l[2]?0==m?0:2:0==l[0]&&0==l[3]?0==m?0:3:0==l[1]&&0==l[2]?0==m?1:2:0==l[1]&&0==l[3]?0==m?1:3:0==m?2:3}else e=4==u&&0==p?m=Math.floor(4*Math.random()):d;0==e?n.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-c.DEFAULT_EDGE_LENGTH-n.getHeight()/2):1==e?n.setCenter(r.getCenterX()+r.getWidth()/2+c.DEFAULT_EDGE_LENGTH+n.getWidth()/2,r.getCenterY()):2==e?n.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+c.DEFAULT_EDGE_LENGTH+n.getHeight()/2):n.setCenter(r.getCenterX()-r.getWidth()/2-c.DEFAULT_EDGE_LENGTH-n.getWidth()/2,r.getCenterY())},t.exports=v},function(t,e,r){"use strict";var n={};n.layoutBase=r(0),n.CoSEConstants=r(1),n.CoSEEdge=r(2),n.CoSEGraph=r(3),n.CoSEGraphManager=r(4),n.CoSELayout=r(6),n.CoSENode=r(5),t.exports=n}])},t.exports=n(r(3143))},3457(t,e,r){var n;n=function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(0).layoutBase.LayoutConstants,i=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,o=r(0).CoSELayout,s=r(0).CoSENode,l=r(0).layoutBase.PointD,c=r(0).layoutBase.DimensionD,h={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function u(t){this.options=function(t,e){var r={};for(var n in t)r[n]=t[n];for(var n in e)r[n]=e[n];return r}(h,t),d(this.options)}var d=function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?n.QUALITY=0:"proof"==t.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};u.prototype.run=function(){var t,e,r=this.options,n=(this.idToLNode={},this.layout=new o),i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=n.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),n);for(var c=0;c<l.length;c++){var h=l[c],u=this.idToLNode[h.data("source")],d=this.idToLNode[h.data("target")];u!==d&&0==u.getEdgesBetween(d).length&&(a.add(n.newEdge(),u,d).id=h.id())}var p=function(t,e){"number"==typeof t&&(t=e);var r=t.data("id"),n=i.idToLNode[r];return{x:n.getRect().getCenterX(),y:n.getRect().getCenterY()}},f=function a(){for(var o,s=function(){r.fit&&r.cy.fit(r.eles,r.padding),t||(t=!0,i.cy.one("layoutready",r.ready),i.cy.trigger({type:"layoutready",layout:i}))},l=i.options.refresh,c=0;c<l&&!o;c++)o=i.stopped||i.layout.tick();if(o)return n.checkLayoutSuccess()&&!n.isSubLayout&&n.doPostLayout(),n.tilingPostLayout&&n.tilingPostLayout(),n.isLayoutFinished=!0,i.options.eles.nodes().positions(p),s(),i.cy.one("layoutstop",i.options.stop),i.cy.trigger({type:"layoutstop",layout:i}),e&&cancelAnimationFrame(e),void(t=!1);var h=i.layout.getPositionsData();r.eles.nodes().positions(function(t,e){if("number"==typeof t&&(t=e),!t.isParent()){for(var r=t.id(),n=h[r],i=t;null==n&&(n=h[i.data("parent")]||h["DummyCompound_"+i.data("parent")],h[r]=n,null!=(i=i.parent()[0])););return null!=n?{x:n.x,y:n.y}:{x:t.position("x"),y:t.position("y")}}}),s(),e=requestAnimationFrame(a)};return n.addListener("layoutstarted",function(){"during"===i.options.animate&&(e=requestAnimationFrame(f))}),n.runLayout(),"during"!==this.options.animate&&(i.options.eles.nodes().not(":parent").layoutPositions(i,i.options,p),t=!1),this},u.prototype.getTopMostNodes=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].id()]=!0;var n=t.filter(function(t,r){"number"==typeof t&&(t=r);for(var n=t.parent()[0];null!=n;){if(e[n.id()])return!1;n=n.parent()[0]}return!0});return n},u.prototype.processChildrenList=function(t,e,r){for(var n=e.length,i=0;i<n;i++){var a,o,h=e[i],u=h.children(),d=h.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((a=null!=h.outerWidth()&&null!=h.outerHeight()?t.add(new s(r.graphManager,new l(h.position("x")-d.w/2,h.position("y")-d.h/2),new c(parseFloat(d.w),parseFloat(d.h)))):t.add(new s(this.graphManager))).id=h.data("id"),a.paddingLeft=parseInt(h.css("padding")),a.paddingTop=parseInt(h.css("padding")),a.paddingRight=parseInt(h.css("padding")),a.paddingBottom=parseInt(h.css("padding")),this.options.nodeDimensionsIncludeLabels&&h.isParent()){var p=h.boundingBox({includeLabels:!0,includeNodes:!1}).w,f=h.boundingBox({includeLabels:!0,includeNodes:!1}).h,g=h.css("text-halign");a.labelWidth=p,a.labelHeight=f,a.labelPos=g}this.idToLNode[h.data("id")]=a,isNaN(a.rect.x)&&(a.rect.x=0),isNaN(a.rect.y)&&(a.rect.y=0),null!=u&&u.length>0&&(o=r.getGraphManager().add(r.newGraph(),a),this.processChildrenList(o,u,r))}},u.prototype.stop=function(){return this.stopped=!0,this};var p=function(t){t("layout","cose-bilkent",u)};"undefined"!=typeof cytoscape&&p(cytoscape),t.exports=p}])},t.exports=n(r(7799))},6527(t,e,r){var n;n=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.forEach(function(e){Object.keys(e).forEach(function(r){return t[r]=e[r]})}),t}},548:(t,e,r)=>{var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(l){i=!0,a=l}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=r(140).layoutBase.LinkedList,a={getTopMostNodes:function(t){for(var e={},r=0;r<t.length;r++)e[t[r].id()]=!0;var n=t.filter(function(t,r){"number"==typeof t&&(t=r);for(var n=t.parent()[0];null!=n;){if(e[n.id()])return!1;n=n.parent()[0]}return!0});return n},connectComponents:function(t,e,r,n){var a=new i,o=new Set,s=[],l=void 0,c=void 0,h=void 0,u=!1,d=1,p=[],f=[],g=function(){var n=t.collection();f.push(n);var i=r[0],g=t.collection();g.merge(i).merge(i.descendants().intersection(e)),s.push(i),g.forEach(function(t){a.push(t),o.add(t),n.merge(t)});for(var m=function(){i=a.shift();var c=t.collection();i.neighborhood().nodes().forEach(function(t){e.intersection(i.edgesWith(t)).length>0&&c.merge(t)});for(var h=0;h<c.length;h++){var u=c[h];null==(l=r.intersection(u.union(u.ancestors())))||o.has(l[0])||l.union(l.descendants()).forEach(function(t){a.push(t),o.add(t),n.merge(t),r.has(t)&&s.push(t)})}};0!=a.length;)m();if(n.forEach(function(t){e.intersection(t.connectedEdges()).forEach(function(t){n.has(t.source())&&n.has(t.target())&&n.merge(t)})}),s.length==r.length&&(u=!0),!u||u&&d>1){c=s[0],h=c.connectedEdges().length,s.forEach(function(t){t.connectedEdges().length<h&&(h=t.connectedEdges().length,c=t)}),p.push(c.id());var y=t.collection();y.merge(s[0]),s.forEach(function(t){y.merge(t)}),s=[],r=r.difference(y),d++}};do{g()}while(!u);return n&&p.length>0&&n.set("dummy"+(n.size+1),p),f},relocateComponent:function(t,e,r){if(!r.fixedNodeConstraint){var i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;if("draft"==r.quality){var l=!0,c=!1,h=void 0;try{for(var u,d=e.nodeIndexes[Symbol.iterator]();!(l=(u=d.next()).done);l=!0){var p=u.value,f=n(p,2),g=f[0],m=f[1],y=r.cy.getElementById(g);if(y){var v=y.boundingBox(),b=e.xCoords[m]-v.w/2,x=e.xCoords[m]+v.w/2,T=e.yCoords[m]-v.h/2,w=e.yCoords[m]+v.h/2;b<i&&(i=b),x>a&&(a=x),T<o&&(o=T),w>s&&(s=w)}}}catch(_){c=!0,h=_}finally{try{!l&&d.return&&d.return()}finally{if(c)throw h}}var k=t.x-(a+i)/2,C=t.y-(s+o)/2;e.xCoords=e.xCoords.map(function(t){return t+k}),e.yCoords=e.yCoords.map(function(t){return t+C})}else{Object.keys(e).forEach(function(t){var r=e[t],n=r.getRect().x,l=r.getRect().x+r.getRect().width,c=r.getRect().y,h=r.getRect().y+r.getRect().height;n<i&&(i=n),l>a&&(a=l),c<o&&(o=c),h>s&&(s=h)});var E=t.x-(a+i)/2,S=t.y-(s+o)/2;Object.keys(e).forEach(function(t){var r=e[t];r.setCenter(r.getCenterX()+E,r.getCenterY()+S)})}}},calcBoundingBox:function(t,e,r,n){for(var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=void 0,c=void 0,h=void 0,u=void 0,d=t.descendants().not(":parent"),p=d.length,f=0;f<p;f++){var g=d[f];i>(l=e[n.get(g.id())]-g.width()/2)&&(i=l),a<(c=e[n.get(g.id())]+g.width()/2)&&(a=c),o>(h=r[n.get(g.id())]-g.height()/2)&&(o=h),s<(u=r[n.get(g.id())]+g.height()/2)&&(s=u)}var m={};return m.topLeftX=i,m.topLeftY=o,m.width=a-i,m.height=s-o,m},calcParentsWithoutChildren:function(t,e){var r=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||r.merge(t)}),r}};t.exports=a},816:(t,e,r)=>{var n=r(548),i=r(140).CoSELayout,a=r(140).CoSENode,o=r(140).layoutBase.PointD,s=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,h=r(140).CoSEConstants;t.exports={coseLayout:function(t,e){var r=t.cy,u=t.eles,d=u.nodes(),p=u.edges(),f=void 0,g=void 0,m=void 0,y={};t.randomize&&(f=e.nodeIndexes,g=e.xCoords,m=e.yCoords);var v=function(t){return"function"==typeof t},b=function(t,e){return v(t)?t(e):t},x=n.calcParentsWithoutChildren(r,u);null!=t.nestingFactor&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(h.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?l.QUALITY=2:l.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!t.randomize,h.ANIMATE=c.ANIMATE=l.ANIMATE=t.animate,h.TILE=t.tile,h.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!t.randomize,l.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),"enforced"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),"cose"==t.step&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new i,w=T.newGraphManager();return function t(e,r,i,l){for(var c=r.length,h=0;h<c;h++){var u=r[h],d=null;0==u.intersection(x).length&&(d=u.children());var p=void 0,v=u.layoutDimensions({nodeDimensionsIncludeLabels:l.nodeDimensionsIncludeLabels});if(null!=u.outerWidth()&&null!=u.outerHeight())if(l.randomize)if(u.isParent()){var T=n.calcBoundingBox(u,g,m,f);p=0==u.intersection(x).length?e.add(new a(i.graphManager,new o(T.topLeftX,T.topLeftY),new s(T.width,T.height))):e.add(new a(i.graphManager,new o(T.topLeftX,T.topLeftY),new s(parseFloat(v.w),parseFloat(v.h))))}else p=e.add(new a(i.graphManager,new o(g[f.get(u.id())]-v.w/2,m[f.get(u.id())]-v.h/2),new s(parseFloat(v.w),parseFloat(v.h))));else p=e.add(new a(i.graphManager,new o(u.position("x")-v.w/2,u.position("y")-v.h/2),new s(parseFloat(v.w),parseFloat(v.h))));else p=e.add(new a(this.graphManager));p.id=u.data("id"),p.nodeRepulsion=b(l.nodeRepulsion,u),p.paddingLeft=parseInt(u.css("padding")),p.paddingTop=parseInt(u.css("padding")),p.paddingRight=parseInt(u.css("padding")),p.paddingBottom=parseInt(u.css("padding")),l.nodeDimensionsIncludeLabels&&(p.labelWidth=u.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,p.labelHeight=u.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,p.labelPosVertical=u.css("text-valign"),p.labelPosHorizontal=u.css("text-halign")),y[u.data("id")]=p,isNaN(p.rect.x)&&(p.rect.x=0),isNaN(p.rect.y)&&(p.rect.y=0),null!=d&&d.length>0&&t(i.getGraphManager().add(i.newGraph(),p),d,i,l)}}(w.addRoot(),n.getTopMostNodes(d),T,t),function(e,r,n){for(var i=0,a=0,o=0;o<n.length;o++){var s=n[o],l=y[s.data("source")],u=y[s.data("target")];if(l&&u&&l!==u&&0==l.getEdgesBetween(u).length){var d=r.add(e.newEdge(),l,u);d.id=s.id(),d.idealLength=b(t.idealEdgeLength,s),d.edgeElasticity=b(t.edgeElasticity,s),i+=d.idealLength,a++}}null!=t.idealEdgeLength&&(a>0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=i/a:v(t.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)}(T,w,p),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(T,t),T.runLayout(),y}}},212:(t,e,r)=>{var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(658),a=r(548),o=r(657).spectralLayout,s=r(816).coseLayout,l=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(t){return 4500},idealEdgeLength:function(t){return 50},edgeElasticity:function(t){return.45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=i({},l,e)}return n(t,[{key:"run",value:function(){var t=this.options,e=t.cy,r=t.eles,n=[],i=[],l=void 0,c=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&0!=t.fixedNodeConstraint.length||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&0!=t.alignmentConstraint.vertical.length||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&0!=t.alignmentConstraint.horizontal.length||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&0!=t.relativePlacementConstraint.length||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var h=void 0,u=!1;if(e.layoutUtilities&&t.packComponents&&((h=e.layoutUtilities("get"))||(h=e.layoutUtilities()),u=!0),r.nodes().length>0)if(u){var d=a.getTopMostNodes(t.eles.nodes());if((l=a.connectComponents(e,t.eles,d)).forEach(function(t){var e=t.boundingBox();c.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,n.push(o(t))}),"default"==t.quality||"proof"==t.quality){var p=e.collection();if(t.tile){var f=new Map,g=0,m={nodeIndexes:f,xCoords:[],yCoords:[]},y=[];if(l.forEach(function(t,e){0==t.edges().length&&(t.nodes().forEach(function(e,r){p.merge(t.nodes()[r]),e.isParent()||(m.nodeIndexes.set(t.nodes()[r].id(),g++),m.xCoords.push(t.nodes()[0].position().x),m.yCoords.push(t.nodes()[0].position().y))}),y.push(e))}),p.length>1){var v=p.boundingBox();c.push({x:v.x1+v.w/2,y:v.y1+v.h/2}),l.push(p),n.push(m);for(var b=y.length-1;b>=0;b--)l.splice(y[b],1),n.splice(y[b],1),c.splice(y[b],1)}}l.forEach(function(e,r){t.eles=e,i.push(s(t,n[r])),a.relocateComponent(c[r],i[r],t)})}else l.forEach(function(e,r){a.relocateComponent(c[r],n[r],t)});var x=new Set;if(l.length>1){var T=[],w=r.filter(function(t){return"none"==t.css("display")});l.forEach(function(e,r){var o=void 0;if("draft"==t.quality&&(o=n[r].nodeIndexes),e.nodes().not(w).length>0){var s={edges:[],nodes:[]},l=void 0;e.nodes().not(w).forEach(function(e){if("draft"==t.quality)if(e.isParent()){var c=a.calcBoundingBox(e,n[r].xCoords,n[r].yCoords,o);s.nodes.push({x:c.topLeftX,y:c.topLeftY,width:c.width,height:c.height})}else l=o.get(e.id()),s.nodes.push({x:n[r].xCoords[l]-e.boundingbox().w/2,y:n[r].yCoords[l]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else i[r][e.id()]&&s.nodes.push({x:i[r][e.id()].getLeft(),y:i[r][e.id()].getTop(),width:i[r][e.id()].getWidth(),height:i[r][e.id()].getHeight()})}),e.edges().forEach(function(e){var l=e.source(),c=e.target();if("none"!=l.css("display")&&"none"!=c.css("display"))if("draft"==t.quality){var h=o.get(l.id()),u=o.get(c.id()),d=[],p=[];if(l.isParent()){var f=a.calcBoundingBox(l,n[r].xCoords,n[r].yCoords,o);d.push(f.topLeftX+f.width/2),d.push(f.topLeftY+f.height/2)}else d.push(n[r].xCoords[h]),d.push(n[r].yCoords[h]);if(c.isParent()){var g=a.calcBoundingBox(c,n[r].xCoords,n[r].yCoords,o);p.push(g.topLeftX+g.width/2),p.push(g.topLeftY+g.height/2)}else p.push(n[r].xCoords[u]),p.push(n[r].yCoords[u]);s.edges.push({startX:d[0],startY:d[1],endX:p[0],endY:p[1]})}else i[r][l.id()]&&i[r][c.id()]&&s.edges.push({startX:i[r][l.id()].getCenterX(),startY:i[r][l.id()].getCenterY(),endX:i[r][c.id()].getCenterX(),endY:i[r][c.id()].getCenterY()})}),s.nodes.length>0&&(T.push(s),x.add(r))}});var k=h.packComponents(T,t.randomize).shifts;if("draft"==t.quality)n.forEach(function(t,e){var r=t.xCoords.map(function(t){return t+k[e].dx}),n=t.yCoords.map(function(t){return t+k[e].dy});t.xCoords=r,t.yCoords=n});else{var C=0;x.forEach(function(t){Object.keys(i[t]).forEach(function(e){var r=i[t][e];r.setCenter(r.getCenterX()+k[C].dx,r.getCenterY()+k[C].dy)}),C++})}}}else{var E=t.eles.boundingBox();if(c.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),t.randomize){var S=o(t);n.push(S)}"default"==t.quality||"proof"==t.quality?(i.push(s(t,n[0])),a.relocateComponent(c[0],i[0],t)):a.relocateComponent(c[0],n[0],t)}var _=function(e,r){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=r);var a=void 0,o=void 0,s=e.data("id");return i.forEach(function(t){s in t&&(a={x:t[s].getRect().getCenterX(),y:t[s].getRect().getCenterY()},o=t[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&("left"==o.labelPosHorizontal?a.x+=o.labelWidth/2:"right"==o.labelPosHorizontal&&(a.x-=o.labelWidth/2)),o.labelHeight&&("top"==o.labelPosVertical?a.y+=o.labelHeight/2:"bottom"==o.labelPosVertical&&(a.y-=o.labelHeight/2))),null==a&&(a={x:e.position("x"),y:e.position("y")}),{x:a.x,y:a.y}}var l=void 0;return n.forEach(function(t){var r=t.nodeIndexes.get(e.id());null!=r&&(l={x:t.xCoords[r],y:t.yCoords[r]})}),null==l&&(l={x:e.position("x"),y:e.position("y")}),{x:l.x,y:l.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var A=a.calcParentsWithoutChildren(e,r),R=r.filter(function(t){return"none"==t.css("display")});t.eles=r.not(R),r.nodes().not(":parent").not(R).layoutPositions(this,t,_),A.length>0&&A.forEach(function(t){t.position(_(t))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=c},657:(t,e,r)=>{var n=r(548),i=r(140).layoutBase.Matrix,a=r(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,r=t.eles,o=r.nodes(),s=r.nodes(":parent"),l=new Map,c=new Map,h=new Map,u=[],d=[],p=[],f=[],g=[],m=[],y=[],v=[],b=void 0,x=1e8,T=1e-9,w=t.piTol,k=t.samplingType,C=t.nodeSeparation,E=void 0,S=function(t,e,r){for(var n=[],i=0,a=0,o=0,s=void 0,l=[],h=0,d=1,p=0;p<b;p++)l[p]=x;for(n[a]=t,l[t]=0;a>=i;){o=n[i++];for(var f=u[o],y=0;y<f.length;y++)l[s=c.get(f[y])]==x&&(l[s]=l[o]+1,n[++a]=s);m[o][e]=l[o]*C}if(r){for(var v=0;v<b;v++)m[v][e]<g[v]&&(g[v]=m[v][e]);for(var T=0;T<b;T++)g[T]>h&&(h=g[T],d=T)}return d};n.connectComponents(e,r,n.getTopMostNodes(o),l),s.forEach(function(t){n.connectComponents(e,r,n.getTopMostNodes(t.descendants().intersection(r)),l)});for(var _=0,A=0;A<o.length;A++)o[A].isParent()||c.set(o[A].id(),_++);var R=!0,L=!1,I=void 0;try{for(var D,N=l.keys()[Symbol.iterator]();!(R=(D=N.next()).done);R=!0){var M=D.value;c.set(M,_++)}}catch(X){L=!0,I=X}finally{try{!R&&N.return&&N.return()}finally{if(L)throw I}}for(var O=0;O<c.size;O++)u[O]=[];s.forEach(function(t){for(var e=t.children().intersection(r);0==e.nodes(":childless").length;)e=e.nodes()[0].children().intersection(r);var n=0,i=e.nodes(":childless")[0].connectedEdges().length;e.nodes(":childless").forEach(function(t,e){t.connectedEdges().length<i&&(i=t.connectedEdges().length,n=e)}),h.set(t.id(),e.nodes(":childless")[n].id())}),o.forEach(function(t){var e=void 0;e=t.isParent()?c.get(h.get(t.id())):c.get(t.id()),t.neighborhood().nodes().forEach(function(n){r.intersection(t.edgesWith(n)).length>0&&(n.isParent()?u[e].push(h.get(n.id())):u[e].push(n.id()))})});var $=function(t){var r=c.get(t),n=void 0;l.get(t).forEach(function(i){n=e.getElementById(i).isParent()?h.get(i):i,u[r].push(n),u[c.get(n)].push(t)})},P=!0,B=!1,F=void 0;try{for(var z,K=l.keys()[Symbol.iterator]();!(P=(z=K.next()).done);P=!0)$(z.value)}catch(X){B=!0,F=X}finally{try{!P&&K.return&&K.return()}finally{if(B)throw F}}var j=void 0;if((b=c.size)>2){E=b<t.sampleSize?b:t.sampleSize;for(var q=0;q<b;q++)m[q]=[];for(var W=0;W<E;W++)v[W]=[];return"draft"==t.quality||"all"==t.step?(function(t){var e=void 0;if(t){e=Math.floor(Math.random()*b);for(var r=0;r<b;r++)g[r]=x;for(var n=0;n<E;n++)f[n]=e,e=S(e,n,t)}else{!function(){for(var t=0,e=0,r=!1;e<E;){t=Math.floor(Math.random()*b),r=!1;for(var n=0;n<e;n++)if(f[n]==t){r=!0;break}r||(f[e]=t,e++)}}();for(var i=0;i<E;i++)S(f[i],i,t)}for(var a=0;a<b;a++)for(var o=0;o<E;o++)m[a][o]*=m[a][o];for(var s=0;s<E;s++)y[s]=[];for(var l=0;l<E;l++)for(var c=0;c<E;c++)y[l][c]=m[f[c]][l]}(k),function(){for(var t=a.svd(y),e=t.S,r=t.U,n=t.V,o=e[0]*e[0]*e[0],s=[],l=0;l<E;l++){s[l]=[];for(var c=0;c<E;c++)s[l][c]=0,l==c&&(s[l][c]=e[l]/(e[l]*e[l]+o/(e[l]*e[l])))}v=i.multMat(i.multMat(n,s),i.transpose(r))}(),function(){for(var t=void 0,e=void 0,r=[],n=[],a=[],o=[],s=0;s<b;s++)r[s]=Math.random(),n[s]=Math.random();r=i.normalize(r),n=i.normalize(n);for(var l=T,c=T,h=void 0;;){for(var u=0;u<b;u++)a[u]=r[u];if(r=i.multGamma(i.multL(i.multGamma(a),m,v)),t=i.dotProduct(a,r),r=i.normalize(r),l=i.dotProduct(a,r),(h=Math.abs(l/c))<=1+w&&h>=1)break;c=l}for(var f=0;f<b;f++)a[f]=r[f];for(c=T;;){for(var g=0;g<b;g++)o[g]=n[g];if(o=i.minusOp(o,i.multCons(a,i.dotProduct(a,o))),n=i.multGamma(i.multL(i.multGamma(o),m,v)),e=i.dotProduct(o,n),n=i.normalize(n),l=i.dotProduct(o,n),(h=Math.abs(l/c))<=1+w&&h>=1)break;c=l}for(var y=0;y<b;y++)o[y]=n[y];d=i.multCons(a,Math.sqrt(Math.abs(t))),p=i.multCons(o,Math.sqrt(Math.abs(e)))}(),j={nodeIndexes:c,xCoords:d,yCoords:p}):(c.forEach(function(t,r){d.push(e.getElementById(r).position("x")),p.push(e.getElementById(r).position("y"))}),j={nodeIndexes:c,xCoords:d,yCoords:p}),j}var U=c.keys(),G=e.getElementById(U.next().value),Y=G.position(),V=G.outerWidth();if(d.push(Y.x),p.push(Y.y),2==b){var H=e.getElementById(U.next().value).outerWidth();d.push(Y.x+V/2+H/2+t.idealEdgeLength),p.push(Y.y)}return j={nodeIndexes:c,xCoords:d,yCoords:p}}}},579:(t,e,r)=>{var n=r(212),i=function(t){t&&t("layout","fcose",n)};"undefined"!=typeof cytoscape&&i(cytoscape),t.exports=i},140:e=>{e.exports=t}},r={},n=function t(n){var i=r[n];if(void 0!==i)return i.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}(579);return n})()},t.exports=n(r(1709))},1709(t,e,r){var n;n=function(t){return(()=>{"use strict";var e={45:(t,e,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),t.exports=n},806:(t,e,r)=>{var n=r(551).FDLayoutConstants;function i(){}for(var a in n)i[a]=n[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,t.exports=i},767:(t,e,r)=>{var n=r(551).FDLayoutEdge;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},880:(t,e,r)=>{var n=r(551).LGraph;function i(t,e,r){n.call(this,t,e,r)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},578:(t,e,r)=>{var n=r(551).LGraphManager;function i(t){n.call(this,t)}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];t.exports=i},765:(t,e,r)=>{var n=r(551).FDLayout,i=r(578),a=r(880),o=r(991),s=r(767),l=r(806),c=r(902),h=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,f=r(551).DimensionD,g=r(551).Layout,m=r(551).Integer,y=r(551).IGeometry,v=r(551).LGraph,b=r(551).Transform,x=r(551).LinkedList;function T(){n.call(this),this.toBeTiled={},this.constraints={}}for(var w in T.prototype=Object.create(n.prototype),n)T[w]=n[w];T.prototype.newGraphManager=function(){var t=new i(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},T.prototype.newNode=function(t){return new o(this.graphManager,t)},T.prototype.newEdge=function(t){return new s(null,null,t)},T.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},T.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},T.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),l.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),l.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var r=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(r,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},r=0;r<t.length;r++){var n=t[r].rect,i=t[r].id;e[i]={id:i,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return e},T.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===h.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},T.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),e=0;e<t.length;e++)t[e].move()},T.prototype.initConstraintVariables=function(){var t=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var e=this.graphManager.getAllNodes(),r=0;r<e.length;r++){var n=e[r];this.idToNodeMap.set(n.id,n)}var i=function e(r){for(var n,i=r.getChild().getNodes(),a=0,o=0;o<i.length;o++)null==(n=i[o]).getChild()?t.fixedNodeSet.has(n.id)&&(a+=100):a+=e(n);return a};if(this.constraints.fixedNodeConstraint)for(this.constraints.fixedNodeConstraint.forEach(function(e){t.fixedNodeSet.add(e.nodeId)}),e=this.graphManager.getAllNodes(),r=0;r<e.length;r++)if(null!=(n=e[r]).getChild()){var a=i(n);a>0&&(n.fixedNodeWeight=a)}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var c=this.constraints.alignmentConstraint.vertical;for(r=0;r<c.length;r++)this.dummyToNodeForVerticalAlignment.set("dummy"+r,[]),c[r].forEach(function(e){o.set(e,"dummy"+r),t.dummyToNodeForVerticalAlignment.get("dummy"+r).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnHorizontal.add("dummy"+r)})}if(this.constraints.alignmentConstraint.horizontal){var h=this.constraints.alignmentConstraint.horizontal;for(r=0;r<h.length;r++)this.dummyToNodeForHorizontalAlignment.set("dummy"+r,[]),h[r].forEach(function(e){s.set(e,"dummy"+r),t.dummyToNodeForHorizontalAlignment.get("dummy"+r).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnVertical.add("dummy"+r)})}}if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(t){var e,r,n;for(n=t.length-1;n>=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),r=t[n],t[n]=t[e],t[e]=r;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var r=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(r).push({right:n,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(n).push({left:r,gap:e.gap})}else{var i=s.has(e.top)?s.get(e.top):e.top,a=s.has(e.bottom)?s.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(i)||(t.nodesInRelativeVertical.push(i),t.nodeToRelativeConstraintMapVertical.set(i,[]),t.dummyToNodeForHorizontalAlignment.has(i)?t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(i).getCenterY())),t.nodesInRelativeVertical.includes(a)||(t.nodesInRelativeVertical.push(a),t.nodeToRelativeConstraintMapVertical.set(a,[]),t.dummyToNodeForHorizontalAlignment.has(a)?t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(a,t.idToNodeMap.get(a).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:e.gap})}});else{var u=new Map,d=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var e=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;u.has(e)?u.get(e).push(r):u.set(e,[r]),u.has(r)?u.get(r).push(e):u.set(r,[e])}else{var n=s.has(t.top)?s.get(t.top):t.top,i=s.has(t.bottom)?s.get(t.bottom):t.bottom;d.has(n)?d.get(n).push(i):d.set(n,[i]),d.has(i)?d.get(i).push(n):d.set(i,[n])}});var p=function(t,e){var r=[],n=[],i=new x,a=new Set,o=0;return t.forEach(function(s,l){if(!a.has(l)){r[o]=[],n[o]=!1;var c=l;for(i.push(c),a.add(c),r[o].push(c);0!=i.length;)c=i.shift(),e.has(c)&&(n[o]=!0),t.get(c).forEach(function(t){a.has(t)||(i.push(t),a.add(t),r[o].push(t))});o++}}),{components:r,isFixed:n}},f=p(u,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var g=p(d,t.fixedNodesOnVertical);this.componentsOnVertical=g.components,this.fixedComponentsOnVertical=g.isFixed}}},T.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){var r=t.idToNodeMap.get(e.nodeId);r.displacementX=0,r.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,r=0;r<e.length;r++){for(var n=0,i=0;i<e[r].length;i++){if(this.fixedNodeSet.has(e[r][i])){n=0;break}n+=this.idToNodeMap.get(e[r][i]).displacementX}var a=n/e[r].length;for(i=0;i<e[r].length;i++)this.idToNodeMap.get(e[r][i]).displacementX=a}if(this.constraints.alignmentConstraint.horizontal){var o=this.constraints.alignmentConstraint.horizontal;for(r=0;r<o.length;r++){var s=0;for(i=0;i<o[r].length;i++){if(this.fixedNodeSet.has(o[r][i])){s=0;break}s+=this.idToNodeMap.get(o[r][i]).displacementY}var c=s/o[r].length;for(i=0;i<o[r].length;i++)this.idToNodeMap.get(o[r][i]).displacementY=c}}}if(this.constraints.relativePlacementConstraint)if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(e){if(!t.fixedNodesOnHorizontal.has(e)){var r=0;r=t.dummyToNodeForVerticalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(e)[0]).displacementX:t.idToNodeMap.get(e).displacementX,t.nodeToRelativeConstraintMapHorizontal.get(e).forEach(function(n){var i;n.right?(i=t.nodeToTempPositionMapHorizontal.get(n.right)-t.nodeToTempPositionMapHorizontal.get(e)-r)<n.gap&&(r-=n.gap-i):(i=t.nodeToTempPositionMapHorizontal.get(e)-t.nodeToTempPositionMapHorizontal.get(n.left)+r)<n.gap&&(r+=n.gap-i)}),t.nodeToTempPositionMapHorizontal.set(e,t.nodeToTempPositionMapHorizontal.get(e)+r),t.dummyToNodeForVerticalAlignment.has(e)?t.dummyToNodeForVerticalAlignment.get(e).forEach(function(e){t.idToNodeMap.get(e).displacementX=r}):t.idToNodeMap.get(e).displacementX=r}}),this.nodesInRelativeVertical.forEach(function(e){if(!t.fixedNodesOnHorizontal.has(e)){var r=0;r=t.dummyToNodeForHorizontalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(e)[0]).displacementY:t.idToNodeMap.get(e).displacementY,t.nodeToRelativeConstraintMapVertical.get(e).forEach(function(n){var i;n.bottom?(i=t.nodeToTempPositionMapVertical.get(n.bottom)-t.nodeToTempPositionMapVertical.get(e)-r)<n.gap&&(r-=n.gap-i):(i=t.nodeToTempPositionMapVertical.get(e)-t.nodeToTempPositionMapVertical.get(n.top)+r)<n.gap&&(r+=n.gap-i)}),t.nodeToTempPositionMapVertical.set(e,t.nodeToTempPositionMapVertical.get(e)+r),t.dummyToNodeForHorizontalAlignment.has(e)?t.dummyToNodeForHorizontalAlignment.get(e).forEach(function(e){t.idToNodeMap.get(e).displacementY=r}):t.idToNodeMap.get(e).displacementY=r}});else{for(r=0;r<this.componentsOnHorizontal.length;r++){var h=this.componentsOnHorizontal[r];if(this.fixedComponentsOnHorizontal[r])for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(h[i]).displacementX=0;else{var u=0,d=0;for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?(u+=(f=this.dummyToNodeForVerticalAlignment.get(h[i])).length*this.idToNodeMap.get(f[0]).displacementX,d+=f.length):(u+=this.idToNodeMap.get(h[i]).displacementX,d++);var p=u/d;for(i=0;i<h.length;i++)this.dummyToNodeForVerticalAlignment.has(h[i])?this.dummyToNodeForVerticalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementX=p}):this.idToNodeMap.get(h[i]).displacementX=p}}for(r=0;r<this.componentsOnVertical.length;r++)if(h=this.componentsOnVertical[r],this.fixedComponentsOnVertical[r])for(i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(h[i]).displacementY=0;else{for(u=0,d=0,i=0;i<h.length;i++){var f;this.dummyToNodeForHorizontalAlignment.has(h[i])?(u+=(f=this.dummyToNodeForHorizontalAlignment.get(h[i])).length*this.idToNodeMap.get(f[0]).displacementY,d+=f.length):(u+=this.idToNodeMap.get(h[i]).displacementY,d++)}for(p=u/d,i=0;i<h.length;i++)this.dummyToNodeForHorizontalAlignment.has(h[i])?this.dummyToNodeForHorizontalAlignment.get(h[i]).forEach(function(e){t.idToNodeMap.get(e).displacementY=p}):this.idToNodeMap.get(h[i]).displacementY=p}}},T.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,r=[],n=this.graphManager.getGraphs(),i=n.length;for(e=0;e<i;e++)(t=n[e]).updateConnected(),t.isConnected||(r=r.concat(t.getNodes()));return r},T.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,r=new Set;for(e=0;e<t.length;e++){var n=t[e];if(!r.has(n)){var i=n.getSource(),a=n.getTarget();if(i==a)n.getBendpoints().push(new p),n.getBendpoints().push(new p),this.createDummyNodesForBendpoints(n),r.add(n);else{var o=[];if(o=(o=o.concat(i.getEdgeListToNode(a))).concat(a.getEdgeListToNode(i)),!r.has(o[0])){var s;if(o.length>1)for(s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}o.forEach(function(t){r.add(t)})}}}if(r.size==t.length)break}},T.prototype.positionNodesRadially=function(t){for(var e=new d(0,0),r=Math.ceil(Math.sqrt(t.length)),n=0,i=0,a=0,o=new p(0,0),s=0;s<t.length;s++){s%r==0&&(a=0,i=n,0!=s&&(i+=l.DEFAULT_COMPONENT_SEPERATION),n=0);var c=t[s],h=g.findCenterOfTree(c);e.x=a,e.y=i,(o=T.radialLayout(c,h,e)).y>n&&(n=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},T.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),l.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,n);var i=v.calculateBounds(t),a=new b;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(r.x),a.setWorldOrgY(r.y);for(var o=0;o<t.length;o++)t[o].transform(a);var s=new p(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},T.branchRadialLayout=function(t,e,r,n,i,a){var o=(n-r+1)/2;o<0&&(o+=180);var s=(o+r)%360*y.TWO_PI/360,l=(Math.cos(s),i*Math.cos(s)),c=i*Math.sin(s);t.setCenter(l,c);var h=[],u=(h=h.concat(t.getEdges())).length;null!=e&&u--;for(var d,p=0,f=h.length,g=t.getEdgesBetween(e);g.length>1;){var m=g[0];g.splice(0,1);var v=h.indexOf(m);v>=0&&h.splice(v,1),f--,u--}d=null!=e?(h.indexOf(g[0])+1)%f:0;for(var b=Math.abs(n-r)/u,x=d;p!=u;x=++x%f){var w=h[x].getOtherEnd(t);if(w!=e){var k=(r+p*b)%360,C=(k+b)%360;T.branchRadialLayout(w,t,k,C,i+a,a),p++}}},T.maxDiagonalInTree=function(t){for(var e=m.MIN_VALUE,r=0;r<t.length;r++){var n=t[r].getDiagonal();n>e&&(e=n)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var r=[],n=this.graphManager.getAllNodes(),i=0;i<n.length;i++){var a=(s=n[i]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=a.id&&this.getToBeTiled(a)||r.push(s)}for(i=0;i<r.length;i++){var s,l=(s=r[i]).getParent().id;void 0===e[l]&&(e[l]=[]),e[l]=e[l].concat(s)}Object.keys(e).forEach(function(r){if(e[r].length>1){var n="DummyCompound_"+r;t.memberGroups[n]=e[r];var i=e[r][0].getParent(),a=new o(t.graphManager);a.id=n,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,t.idToDummyNode[n]=a;var s=t.getGraphManager().add(t.newGraph(),a),l=i.getChild();l.add(a);for(var c=0;c<e[r].length;c++){var h=e[r][c];l.remove(h),s.add(h)}}})},T.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var r=0;r<this.compoundOrder.length;r++)e[this.compoundOrder[r].id]=this.compoundOrder[r],t[this.compoundOrder[r].id]=[].concat(this.compoundOrder[r].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[r].getChild()),this.compoundOrder[r].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},T.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(r){var n=t.idToDummyNode[r];if(e[r]=t.tileNodes(t.memberGroups[r],n.paddingLeft+n.paddingRight),n.rect.width=e[r].width,n.rect.height=e[r].height,n.setCenter(e[r].centerX,e[r].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var i=n.rect.width,a=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(i+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>i?(n.rect.x-=(n.labelWidth-i)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-i)/2):"right"==n.labelPosHorizontal&&n.setWidth(i+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(a+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>a?(n.rect.y-=(n.labelHeight-a)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-a)/2):"bottom"==n.labelPosVertical&&n.setHeight(a+n.labelHeight))}})},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],r=e.id,n=e.paddingLeft,i=e.paddingTop,a=e.labelMarginLeft,o=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,n,i,a,o)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(r){var n=t.idToDummyNode[r],i=n.paddingLeft,a=n.paddingTop,o=n.labelMarginLeft,s=n.labelMarginTop;t.adjustLocations(e[r],n.rect.x,n.rect.y,i,a,o,s)})},T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var r=t.getChild();if(null==r)return this.toBeTiled[e]=!1,!1;for(var n=r.getNodes(),i=0;i<n.length;i++){var a=n[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[e]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),r=0,n=0;n<e.length;n++){var i=e[n];i.getSource().id!==i.getTarget().id&&(r+=1)}return r},T.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var r=t.getChild().getNodes(),n=0;n<r.length;n++){var i=r[n];e+=this.getNodeDegreeWithChildren(i)}return e},T.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},T.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var r=t[e];null!=r.getChild()&&this.fillCompexOrderByDFS(r.getChild().getNodes()),this.getToBeTiled(r)&&this.compoundOrder.push(r)}},T.prototype.adjustLocations=function(t,e,r,n,i,a,o){r+=i+o;for(var s=e+=n+a,l=0;l<t.rows.length;l++){var c=t.rows[l];e=s;for(var h=0,u=0;u<c.length;u++){var d=c[u];d.rect.x=e,d.rect.y=r,e+=d.rect.width+t.horizontalPadding,d.rect.height>h&&(h=d.rect.height)}r+=h+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var r=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var i=e[n];if(r.tiledMemberPack[n]=r.tileNodes(t[n],i.paddingLeft+i.paddingRight),i.rect.width=r.tiledMemberPack[n].width,i.rect.height=r.tiledMemberPack[n].height,i.setCenter(r.tiledMemberPack[n].centerX,r.tiledMemberPack[n].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&("left"==i.labelPosHorizontal?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):"center"==i.labelPosHorizontal&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):"right"==i.labelPosHorizontal&&i.setWidth(a+i.labelWidth)),i.labelHeight&&("top"==i.labelPosVertical?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):"center"==i.labelPosVertical&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):"bottom"==i.labelPosVertical&&i.setHeight(o+i.labelHeight))}})},T.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),n=this.tileNodesByFavoringDim(t,e,!1),i=this.getOrgRatio(r);return this.getOrgRatio(n)<i?n:r},T.prototype.getOrgRatio=function(t){var e=t.width/t.height;return e<1&&(e=1/e),e},T.prototype.calcIdealRowWidth=function(t,e){var r=l.TILING_PADDING_VERTICAL,n=l.TILING_PADDING_HORIZONTAL,i=t.length,a=0,o=0,s=0;t.forEach(function(t){a+=t.getWidth(),o+=t.getHeight(),t.getWidth()>s&&(s=t.getWidth())});var c,h=a/i,u=o/i,d=Math.pow(r-n,2)+4*(h+n)*(u+r)*i,p=(n-r+Math.sqrt(d))/(2*(h+n));e?(c=Math.ceil(p))==p&&c++:c=Math.floor(p);var f=c*(h+n)-n;return s>f&&(f=s),f+=2*n},T.prototype.tileNodesByFavoringDim=function(t,e,r){var n=l.TILING_PADDING_VERTICAL,i=l.TILING_PADDING_HORIZONTAL,a=l.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(t,r));var s=function(t){return t.rect.width*t.rect.height},c=function(t,e){return s(e)-s(t)};t.sort(function(t,e){var r=c;return o.idealRowWidth?(r=a)(t.id,e.id):r(t,e)});for(var h=0,u=0,d=0;d<t.length;d++)h+=(p=t[d]).getCenterX(),u+=p.getCenterY();for(o.centerX=h/t.length,o.centerY=u/t.length,d=0;d<t.length;d++){var p=t[d];if(0==o.rows.length)this.insertNodeToRow(o,p,0,e);else if(this.canAddHorizontal(o,p.rect.width,p.rect.height)){var f=o.rows.length-1;o.idealRowWidth||(f=this.getShortestRowIndex(o)),this.insertNodeToRow(o,p,f,e)}else this.insertNodeToRow(o,p,o.rows.length,e);this.shiftToLastRow(o)}return o},T.prototype.insertNodeToRow=function(t,e,r,n){var i=n;r==t.rows.length&&(t.rows.push([]),t.rowWidth.push(i),t.rowHeight.push(0));var a=t.rowWidth[r]+e.rect.width;t.rows[r].length>0&&(a+=t.horizontalPadding),t.rowWidth[r]=a,t.width<a&&(t.width=a);var o=e.rect.height;r>0&&(o+=t.verticalPadding);var s=0;o>t.rowHeight[r]&&(s=t.rowHeight[r],t.rowHeight[r]=o,s=t.rowHeight[r]-s),t.height+=s,t.rows[r].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<r&&(e=n,r=t.rowWidth[n]);return e},T.prototype.getLongestRowIndex=function(t){for(var e=-1,r=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>r&&(e=n,r=t.rowWidth[n]);return e},T.prototype.canAddHorizontal=function(t,e,r){if(t.idealRowWidth){var n=t.rows.length-1;return t.rowWidth[n]+e+t.horizontalPadding<=t.idealRowWidth}var i=this.getShortestRowIndex(t);if(i<0)return!0;var a=t.rowWidth[i];if(a+t.horizontalPadding+e<=t.width)return!0;var o,s,l=0;return t.rowHeight[i]<r&&i>0&&(l=r+t.verticalPadding-t.rowHeight[i]),o=t.width-a>=e+t.horizontalPadding?(t.height+l)/(a+e+t.horizontalPadding):(t.height+l)/t.width,l=r+t.verticalPadding,(s=t.width<e?(t.height+l)/e:(t.height+l)/t.width)<1&&(s=1/s),o<1&&(o=1/o),o<s},T.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),r=t.rowWidth.length-1,n=t.rows[e],i=n[n.length-1],a=i.width+t.horizontalPadding;if(t.width-t.rowWidth[r]>a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var o=Number.MIN_VALUE,s=0;s<n.length;s++)n[s].height>o&&(o=n[s].height);e>0&&(o+=t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[r];t.rowHeight[e]=o,t.rowHeight[r]<i.height+t.verticalPadding&&(t.rowHeight[r]=i.height+t.verticalPadding);var c=t.rowHeight[e]+t.rowHeight[r];t.height+=c-l,this.shiftToLastRow(t)}},T.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},T.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},T.prototype.reduceTrees=function(){for(var t,e=[],r=!0;r;){var n=this.graphManager.getAllNodes(),i=[];r=!1;for(var a=0;a<n.length;a++)if(1==(t=n[a]).getEdges().length&&!t.getEdges()[0].isInterGraph&&null==t.getChild()){if(l.PURE_INCREMENTAL){var o=t.getEdges()[0].getOtherEnd(t),s=new f(t.getCenterX()-o.getCenterX(),t.getCenterY()-o.getCenterY());i.push([t,t.getEdges()[0],t.getOwner(),s])}else i.push([t,t.getEdges()[0],t.getOwner()]);r=!0}if(1==r){for(var c=[],h=0;h<i.length;h++)1==i[h][0].getEdges().length&&(c.push(i[h]),i[h][0].getOwner().remove(i[h][0]));e.push(c),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},T.prototype.growTree=function(t){for(var e,r=t[t.length-1],n=0;n<r.length;n++)e=r[n],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},T.prototype.findPlaceforPrunedNode=function(t){var e,r,n=t[0];if(r=n==t[1].source?t[1].target:t[1].source,l.PURE_INCREMENTAL)n.setCenter(r.getCenterX()+t[3].getWidth(),r.getCenterY()+t[3].getHeight());else{var i=r.startX,a=r.finishX,o=r.startY,s=r.finishY,c=[0,0,0,0];if(o>0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a<this.grid.length-1)for(u=o;u<=s;u++)c[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(s<this.grid[0].length-1)for(u=i;u<=a;u++)c[2]+=this.grid[u][s+1].length+this.grid[u][s].length-1;if(i>0)for(u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d,p,f=m.MAX_VALUE,g=0;g<c.length;g++)c[g]<f?(f=c[g],d=1,p=g):c[g]==f&&d++;if(3==d&&0==f)0==c[0]&&0==c[1]&&0==c[2]?e=1:0==c[0]&&0==c[1]&&0==c[3]?e=0:0==c[0]&&0==c[2]&&0==c[3]?e=3:0==c[1]&&0==c[2]&&0==c[3]&&(e=2);else if(2==d&&0==f){var y=Math.floor(2*Math.random());e=0==c[0]&&0==c[1]?0==y?0:1:0==c[0]&&0==c[2]?0==y?0:2:0==c[0]&&0==c[3]?0==y?0:3:0==c[1]&&0==c[2]?0==y?1:2:0==c[1]&&0==c[3]?0==y?1:3:0==y?2:3}else e=4==d&&0==f?y=Math.floor(4*Math.random()):p;0==e?n.setCenter(r.getCenterX(),r.getCenterY()-r.getHeight()/2-h.DEFAULT_EDGE_LENGTH-n.getHeight()/2):1==e?n.setCenter(r.getCenterX()+r.getWidth()/2+h.DEFAULT_EDGE_LENGTH+n.getWidth()/2,r.getCenterY()):2==e?n.setCenter(r.getCenterX(),r.getCenterY()+r.getHeight()/2+h.DEFAULT_EDGE_LENGTH+n.getHeight()/2):n.setCenter(r.getCenterX()-r.getWidth()/2-h.DEFAULT_EDGE_LENGTH-n.getWidth()/2,r.getCenterY())}},t.exports=T},991:(t,e,r)=>{var n=r(551).FDLayoutNode,i=r(551).IMath;function a(t,e,r,i){n.call(this,t,e,r,i)}for(var o in a.prototype=Object.create(n.prototype),n)a[o]=n[o];a.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;i<n.length;i++)null==(r=n[i]).getChild()?(r.displacementX+=t,r.displacementY+=e):r.propogateDisplacementToChildren(t,e)},a.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.setPred1=function(t){this.pred1=t},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(t){this.next=t},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(t){this.processed=t},a.prototype.isProcessed=function(){return processed},t.exports=a},902:(t,e,r)=>{function n(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=r(806),a=r(551).LinkedList,o=r(551).Matrix,s=r(551).SVD;function l(){}l.handleConstraints=function(t){var e={};e.fixedNodeConstraint=t.constraints.fixedNodeConstraint,e.alignmentConstraint=t.constraints.alignmentConstraint,e.relativePlacementConstraint=t.constraints.relativePlacementConstraint;for(var r=new Map,l=new Map,c=[],h=[],u=t.getAllNodes(),d=0,p=0;p<u.length;p++){var f=u[p];null==f.getChild()&&(l.set(f.id,d++),c.push(f.getCenterX()),h.push(f.getCenterY()),r.set(f.id,f))}e.relativePlacementConstraint&&e.relativePlacementConstraint.forEach(function(t){t.gap||0==t.gap||(t.left?t.gap=i.DEFAULT_EDGE_LENGTH+r.get(t.left).getWidth()/2+r.get(t.right).getWidth()/2:t.gap=i.DEFAULT_EDGE_LENGTH+r.get(t.top).getHeight()/2+r.get(t.bottom).getHeight()/2)});var g=function(t){var e=0,r=0;return t.forEach(function(t){e+=c[l.get(t)],r+=h[l.get(t)]}),{x:e/t.size,y:r/t.size}},m=function(t,e,r,i,o){var s=new Map;t.forEach(function(t,e){s.set(e,0)}),t.forEach(function(t,e){t.forEach(function(t){s.set(t.id,s.get(t.id)+1)})});var u=new Map,d=new Map,p=new a;s.forEach(function(t,n){0==t?(p.push(n),r||("horizontal"==e?u.set(n,l.has(n)?c[l.get(n)]:i.get(n)):u.set(n,l.has(n)?h[l.get(n)]:i.get(n)))):u.set(n,Number.NEGATIVE_INFINITY),r&&d.set(n,new Set([n]))}),r&&o.forEach(function(t){var n=[];if(t.forEach(function(t){r.has(t)&&n.push(t)}),n.length>0){var a=0;n.forEach(function(t){"horizontal"==e?(u.set(t,l.has(t)?c[l.get(t)]:i.get(t)),a+=u.get(t)):(u.set(t,l.has(t)?h[l.get(t)]:i.get(t)),a+=u.get(t))}),a/=n.length,t.forEach(function(t){r.has(t)||u.set(t,a)})}else{var o=0;t.forEach(function(t){o+="horizontal"==e?l.has(t)?c[l.get(t)]:i.get(t):l.has(t)?h[l.get(t)]:i.get(t)}),o/=t.length,t.forEach(function(t){u.set(t,o)})}});for(var f=function(){var n=p.shift();t.get(n).forEach(function(t){if(u.get(t.id)<u.get(n)+t.gap)if(r&&r.has(t.id)){var a=void 0;if(a="horizontal"==e?l.has(t.id)?c[l.get(t.id)]:i.get(t.id):l.has(t.id)?h[l.get(t.id)]:i.get(t.id),u.set(t.id,a),a<u.get(n)+t.gap){var o=u.get(n)+t.gap-a;d.get(n).forEach(function(t){u.set(t,u.get(t)-o)})}}else u.set(t.id,u.get(n)+t.gap);s.set(t.id,s.get(t.id)-1),0==s.get(t.id)&&p.push(t.id),r&&d.set(t.id,function(t,e){var r=new Set(t),n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value;r.add(l)}}catch(c){i=!0,a=c}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(d.get(n),d.get(t.id)))})};0!=p.length;)f();if(r){var g=new Set;t.forEach(function(t,e){0==t.length&&g.add(e)});var m=[];d.forEach(function(t,e){if(g.has(e)){var i=!1,a=!0,o=!1,s=void 0;try{for(var l,c=t[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var h=l.value;r.has(h)&&(i=!0)}}catch(p){o=!0,s=p}finally{try{!a&&c.return&&c.return()}finally{if(o)throw s}}if(!i){var u=!1,d=void 0;m.forEach(function(e,r){e.has([].concat(n(t))[0])&&(u=!0,d=r)}),u?t.forEach(function(t){m[d].add(t)}):m.push(new Set(t))}}}),m.forEach(function(t,r){var n=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,d=!0,p=!1,f=void 0;try{for(var g,m=t[Symbol.iterator]();!(d=(g=m.next()).done);d=!0){var y=g.value,v=void 0;v="horizontal"==e?l.has(y)?c[l.get(y)]:i.get(y):l.has(y)?h[l.get(y)]:i.get(y);var b=u.get(y);v<n&&(n=v),v>o&&(o=v),b<a&&(a=b),b>s&&(s=b)}}catch(_){p=!0,f=_}finally{try{!d&&m.return&&m.return()}finally{if(p)throw f}}var x=(n+o)/2-(a+s)/2,T=!0,w=!1,k=void 0;try{for(var C,E=t[Symbol.iterator]();!(T=(C=E.next()).done);T=!0){var S=C.value;u.set(S,u.get(S)+x)}}catch(_){w=!0,k=_}finally{try{!T&&E.return&&E.return()}finally{if(w)throw k}}})}return u},y=function(t){var e=0,r=0,n=0,i=0;if(t.forEach(function(t){t.left?c[l.get(t.left)]-c[l.get(t.right)]>=0?e++:r++:h[l.get(t.top)]-h[l.get(t.bottom)]>=0?n++:i++}),e>r&&n>i)for(var a=0;a<l.size;a++)c[a]=-1*c[a],h[a]=-1*h[a];else if(e>r)for(var o=0;o<l.size;o++)c[o]=-1*c[o];else if(n>i)for(var s=0;s<l.size;s++)h[s]=-1*h[s]},v=function(t){var e=[],r=new a,n=new Set,i=0;return t.forEach(function(a,o){if(!n.has(o)){e[i]=[];var s=o;for(r.push(s),n.add(s),e[i].push(s);0!=r.length;)s=r.shift(),t.get(s).forEach(function(t){n.has(t.id)||(r.push(t.id),n.add(t.id),e[i].push(t.id))});i++}}),e},b=function(t){var e=new Map;return t.forEach(function(t,r){e.set(r,[])}),t.forEach(function(t,r){t.forEach(function(t){e.get(r).push(t),e.get(t.id).push({id:r,gap:t.gap,direction:t.direction})})}),e},x=function(t){var e=new Map;return t.forEach(function(t,r){e.set(r,[])}),t.forEach(function(t,r){t.forEach(function(t){e.get(t.id).push({id:r,gap:t.gap,direction:t.direction})})}),e},T=[],w=[],k=!1,C=!1,E=new Set,S=new Map,_=new Map,A=[];if(e.fixedNodeConstraint&&e.fixedNodeConstraint.forEach(function(t){E.add(t.nodeId)}),e.relativePlacementConstraint&&(e.relativePlacementConstraint.forEach(function(t){t.left?(S.has(t.left)?S.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):S.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),S.has(t.right)||S.set(t.right,[])):(S.has(t.top)?S.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):S.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),S.has(t.bottom)||S.set(t.bottom,[]))}),_=b(S),A=v(_)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>1)e.fixedNodeConstraint.forEach(function(t,e){T[e]=[t.position.x,t.position.y],w[e]=[c[l.get(t.nodeId)],h[l.get(t.nodeId)]]}),k=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var r=e.alignmentConstraint.vertical,i=function(e){var i=new Set;r[e].forEach(function(t){i.add(t)});var a=new Set([].concat(n(i)).filter(function(t){return E.has(t)})),o=void 0;o=a.size>0?c[l.get(a.values().next().value)]:g(i).x,r[e].forEach(function(e){T[t]=[o,h[l.get(e)]],w[t]=[c[l.get(e)],h[l.get(e)]],t++})},a=0;a<r.length;a++)i(a);k=!0}if(e.alignmentConstraint.horizontal){for(var o=e.alignmentConstraint.horizontal,s=function(e){var r=new Set;o[e].forEach(function(t){r.add(t)});var i=new Set([].concat(n(r)).filter(function(t){return E.has(t)})),a=void 0;a=i.size>0?c[l.get(i.values().next().value)]:g(r).y,o[e].forEach(function(e){T[t]=[c[l.get(e)],a],w[t]=[c[l.get(e)],h[l.get(e)]],t++})},u=0;u<o.length;u++)s(u);k=!0}e.relativePlacementConstraint&&(C=!0)}();else if(e.relativePlacementConstraint){for(var R=0,L=0,I=0;I<A.length;I++)A[I].length>R&&(R=A[I].length,L=I);if(R<_.size/2)y(e.relativePlacementConstraint),k=!1,C=!1;else{var D=new Map,N=new Map,M=[];A[L].forEach(function(t){S.get(t).forEach(function(e){"horizontal"==e.direction?(D.has(t)?D.get(t).push(e):D.set(t,[e]),D.has(e.id)||D.set(e.id,[]),M.push({left:t,right:e.id})):(N.has(t)?N.get(t).push(e):N.set(t,[e]),N.has(e.id)||N.set(e.id,[]),M.push({top:t,bottom:e.id}))})}),y(M),C=!1;var O=m(D,"horizontal"),$=m(N,"vertical");A[L].forEach(function(t,e){w[e]=[c[l.get(t)],h[l.get(t)]],T[e]=[],O.has(t)?T[e][0]=O.get(t):T[e][0]=c[l.get(t)],$.has(t)?T[e][1]=$.get(t):T[e][1]=h[l.get(t)]}),k=!0}}if(k){for(var P,B=o.transpose(T),F=o.transpose(w),z=0;z<B.length;z++)B[z]=o.multGamma(B[z]),F[z]=o.multGamma(F[z]);var K=o.multMat(B,o.transpose(F)),j=s.svd(K);P=o.multMat(j.V,o.transpose(j.U));for(var q=0;q<l.size;q++){var W=[c[q],h[q]],U=[P[0][0],P[1][0]],G=[P[0][1],P[1][1]];c[q]=o.dotProduct(W,U),h[q]=o.dotProduct(W,G)}C&&y(e.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(e.fixedNodeConstraint&&e.fixedNodeConstraint.length>0){var Y={x:0,y:0};e.fixedNodeConstraint.forEach(function(t,e){var r,n,i={x:c[l.get(t.nodeId)],y:h[l.get(t.nodeId)]},a=t.position,o=(n=i,{x:(r=a).x-n.x,y:r.y-n.y});Y.x+=o.x,Y.y+=o.y}),Y.x/=e.fixedNodeConstraint.length,Y.y/=e.fixedNodeConstraint.length,c.forEach(function(t,e){c[e]+=Y.x}),h.forEach(function(t,e){h[e]+=Y.y}),e.fixedNodeConstraint.forEach(function(t){c[l.get(t.nodeId)]=t.position.x,h[l.get(t.nodeId)]=t.position.y})}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var V=e.alignmentConstraint.vertical,H=function(t){var e=new Set;V[t].forEach(function(t){e.add(t)});var r=new Set([].concat(n(e)).filter(function(t){return E.has(t)})),i=void 0;i=r.size>0?c[l.get(r.values().next().value)]:g(e).x,e.forEach(function(t){E.has(t)||(c[l.get(t)]=i)})},X=0;X<V.length;X++)H(X);if(e.alignmentConstraint.horizontal)for(var Z=e.alignmentConstraint.horizontal,Q=function(t){var e=new Set;Z[t].forEach(function(t){e.add(t)});var r=new Set([].concat(n(e)).filter(function(t){return E.has(t)})),i=void 0;i=r.size>0?h[l.get(r.values().next().value)]:g(e).y,e.forEach(function(t){E.has(t)||(h[l.get(t)]=i)})},J=0;J<Z.length;J++)Q(J)}e.relativePlacementConstraint&&function(){var t=new Map,r=new Map,n=new Map,i=new Map,a=new Map,o=new Map,s=new Set,u=new Set;if(E.forEach(function(t){s.add(t),u.add(t)}),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var d=e.alignmentConstraint.vertical,p=function(e){n.set("dummy"+e,[]),d[e].forEach(function(r){t.set(r,"dummy"+e),n.get("dummy"+e).push(r),E.has(r)&&s.add("dummy"+e)}),a.set("dummy"+e,c[l.get(d[e][0])])},f=0;f<d.length;f++)p(f);if(e.alignmentConstraint.horizontal)for(var g=e.alignmentConstraint.horizontal,y=function(t){i.set("dummy"+t,[]),g[t].forEach(function(e){r.set(e,"dummy"+t),i.get("dummy"+t).push(e),E.has(e)&&u.add("dummy"+t)}),o.set("dummy"+t,h[l.get(g[t][0])])},T=0;T<g.length;T++)y(T)}var w=new Map,k=new Map,C=function(e){S.get(e).forEach(function(n){var i=void 0,a=void 0;"horizontal"==n.direction?(i=t.get(e)?t.get(e):e,a=t.get(n.id)?{id:t.get(n.id),gap:n.gap,direction:n.direction}:n,w.has(i)?w.get(i).push(a):w.set(i,[a]),w.has(a.id)||w.set(a.id,[])):(i=r.get(e)?r.get(e):e,a=r.get(n.id)?{id:r.get(n.id),gap:n.gap,direction:n.direction}:n,k.has(i)?k.get(i).push(a):k.set(i,[a]),k.has(a.id)||k.set(a.id,[]))})},_=!0,A=!1,R=void 0;try{for(var L,I=S.keys()[Symbol.iterator]();!(_=(L=I.next()).done);_=!0)C(L.value)}catch(tt){A=!0,R=tt}finally{try{!_&&I.return&&I.return()}finally{if(A)throw R}}var D=b(w),N=b(k),M=v(D),O=v(N),$=x(w),P=x(k),B=[],F=[];M.forEach(function(t,e){B[e]=[],t.forEach(function(t){0==$.get(t).length&&B[e].push(t)})}),O.forEach(function(t,e){F[e]=[],t.forEach(function(t){0==P.get(t).length&&F[e].push(t)})});var z=m(w,"horizontal",s,a,B),K=m(k,"vertical",u,o,F),j=function(t){n.get(t)?n.get(t).forEach(function(e){c[l.get(e)]=z.get(t)}):c[l.get(t)]=z.get(t)},q=!0,W=!1,U=void 0;try{for(var G,Y=z.keys()[Symbol.iterator]();!(q=(G=Y.next()).done);q=!0)j(G.value)}catch(tt){W=!0,U=tt}finally{try{!q&&Y.return&&Y.return()}finally{if(W)throw U}}var V=function(t){i.get(t)?i.get(t).forEach(function(e){h[l.get(e)]=K.get(t)}):h[l.get(t)]=K.get(t)},H=!0,X=!1,Z=void 0;try{for(var Q,J=K.keys()[Symbol.iterator]();!(H=(Q=J.next()).done);H=!0)V(Q.value)}catch(tt){X=!0,Z=tt}finally{try{!H&&J.return&&J.return()}finally{if(X)throw Z}}}()}for(var tt=0;tt<u.length;tt++){var et=u[tt];null==et.getChild()&&et.setCenter(c[l.get(et.id)],h[l.get(et.id)])}},t.exports=l},551:e=>{e.exports=t}},r={},n=function t(n){var i=r[n];if(void 0!==i)return i.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}(45);return n})()},t.exports=n(r(4298))},4298(t){var e;e=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=28)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function o(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),o=r(0),s=r(16),l=r(5);function c(t,e,r,o){null==r&&null==o&&(o=e),n.call(this,o),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new a(e.x,e.y,r.width,r.height):new a}for(var h in c.prototype=Object.create(n.prototype),n)c[h]=n[h];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(t){this.rect.width=t},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(t){this.rect.height=t},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},c.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},c.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},c.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},c.prototype.getEdgeListToNode=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.target==t){if(n.source!=r)throw"Incorrect edge source!";e.push(n)}}),e},c.prototype.getEdgesBetween=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.source!=r&&n.target!=r)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},c.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(r){if(r.source==e)t.add(r.target);else{if(r.target!=e)throw"Incorrect incidency!";t.add(r.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},c.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),r=0;r<e.length;r++)t+=e[r].getNoOfChildren();return 0==t&&(t=1),t},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},c.prototype.scatter=function(){var t,e,r=-o.INITIAL_WORLD_BOUNDARY,n=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_X+s.nextDouble()*(n-r)+r;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=t,this.rect.y=e},c.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),r=t.getBottom()-t.getTop();this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>e?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(r+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>r?(this.rect.y-=(this.labelHeight-r)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(r+this.labelHeight))}}},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(t){var e=this.rect.x;e>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY);var r=this.rect.y;r>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var n=new l(e,r),i=t.inverseTransformPoint(n);this.setLocation(i.x,i.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=c},function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),o=r(7),s=r(3),l=r(1),c=r(13),h=r(12),u=r(11);function d(t,e,r){n.call(this,r),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof o?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in d.prototype=Object.create(n.prototype),n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(r)>-1))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(i.source=e,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),r!=e&&r.edges.push(i),i)},d.prototype.remove=function(t){var e=t;if(t instanceof s){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r=e.edges.slice(),n=r.length,i=0;i<n;i++)(a=r[i]).isInterGraph?this.graphManager.remove(a):a.source.owner.remove(a);if(-1==(o=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(o,1)}else if(t instanceof l){var a;if(null==(a=t))throw"Edge is null!";if(null==a.source||null==a.target)throw"Source and/or target is null!";if(null==a.source.owner||null==a.target.owner||a.source.owner!=this||a.target.owner!=this)throw"Source and/or target owner is invalid!";var o,c=a.source.edges.indexOf(a),h=a.target.edges.indexOf(a);if(!(c>-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(c,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(o=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(o,1)}},d.prototype.updateLeftTop=function(){for(var t,e,r,n=i.MAX_VALUE,a=i.MAX_VALUE,o=this.getNodes(),s=o.length,l=0;l<s;l++){var c=o[l];n>(t=c.getTop())&&(n=t),a>(e=c.getLeft())&&(a=e)}return n==i.MAX_VALUE?null:(r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=a-r,this.top=n-r,new h(this.left,this.top))},d.prototype.updateBounds=function(t){for(var e,r,n,a,o,s=i.MAX_VALUE,l=-i.MAX_VALUE,h=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,f=0;f<p;f++){var g=d[f];t&&null!=g.child&&g.updateBounds(),s>(e=g.getLeft())&&(s=e),l<(r=g.getRight())&&(l=r),h>(n=g.getTop())&&(h=n),u<(a=g.getBottom())&&(u=a)}var m=new c(s,h,l-s,u-h);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),o=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-o,this.right=m.x+m.width+o,this.top=m.y-o,this.bottom=m.y+m.height+o},d.calculateBounds=function(t){for(var e,r,n,a,o=i.MAX_VALUE,s=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,u=t.length,d=0;d<u;d++){var p=t[d];o>(e=p.getLeft())&&(o=e),s<(r=p.getRight())&&(s=r),l>(n=p.getTop())&&(l=n),h<(a=p.getBottom())&&(h=a)}return new c(o,l,s-o,h-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,r=e.length,n=0;n<r;n++)t+=e[n].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var e,r,n=new u,i=new Set,a=this.nodes[0];for(a.withChildren().forEach(function(t){n.push(t),i.add(t)});0!==n.length;)for(var o=(e=(a=n.shift()).getEdges()).length,s=0;s<o;s++)null==(r=e[s].getOtherEndInGraph(a,this))||i.has(r)||r.withChildren().forEach(function(t){n.push(t),i.add(t)});if(this.isConnected=!1,i.size>=this.nodes.length){var l=0;i.forEach(function(e){e.owner==t&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(t){n=r(6),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),r=this.add(t,e);return this.setRootGraph(r),this.rootGraph},a.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=r,r=t;var a=(n=e).getOwner(),o=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==o)return r.isInterGraph=!1,a.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,this.edges.indexOf(r)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},a.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,a=[],o=(a=a.concat(e.getEdges())).length,s=0;s<o;s++)r=a[s],e.remove(r);var l,c=[];for(o=(c=c.concat(e.getNodes())).length,s=0;s<o;s++)l=c[s],e.remove(l);e==this.rootGraph&&this.setRootGraph(null);var h=this.graphs.indexOf(e);this.graphs.splice(h,1),e.parent=null}else if(t instanceof i){if(null==(r=t))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(h=r.source.edges.indexOf(r),r.source.edges.splice(h,1),h=r.target.edges.indexOf(r),r.target.edges.splice(h,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";h=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(h,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),r=e.length,n=0;n<r;n++)t=t.concat(e[n].getNodes());this.allNodes=t}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),r=(e.length,0);r<e.length;r++)t=t.concat(e[r].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}for(n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,n,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++)if(e=(t=a[s]).source,r=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=r,e!=r){for(n=e.getOwner();null==t.lca;){for(t.targetInLca=r,i=r.getOwner();null==t.lca;){if(i==n){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=e.getOwner()},a.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var n=e.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},a.prototype.calcInclusionTreeDepths=function(t,e){var r;null==t&&null==e&&(t=this.rootGraph,e=1);for(var n=t.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},a.prototype.includesInvalidEdge=function(){for(var t,e=[],r=this.edges.length,n=0;n<r;n++)t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(n=0;n<e.length;n++)this.remove(e[n]);return!1},t.exports=a},function(t,e,r){"use strict";var n=r(12);function i(){}i.calcSeparationAmount=function(t,e,r,n){if(!t.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(t,e,i),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var o=a*r[0],s=r[1]/a;r[0]<s?s=r[0]:o=r[1],r[0]=-1*i[0]*(s/2+n),r[1]=-1*i[1]*(o/2+n)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var n=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),o=e.getCenterY();if(t.intersects(e))return r[0]=n,r[1]=i,r[2]=a,r[3]=o,!0;var s=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),f=t.getHeightHalf(),g=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),b=e.getBottom(),x=e.getRight(),T=e.getWidthHalf(),w=e.getHeightHalf(),k=!1,C=!1;if(n===a){if(i>o)return r[0]=n,r[1]=l,r[2]=a,r[3]=b,!1;if(i<o)return r[0]=n,r[1]=u,r[2]=a,r[3]=m,!1}else if(i===o){if(n>a)return r[0]=s,r[1]=i,r[2]=y,r[3]=o,!1;if(n<a)return r[0]=c,r[1]=i,r[2]=g,r[3]=o,!1}else{var E=t.height/t.width,S=e.height/e.width,_=(o-i)/(a-n),A=void 0,R=void 0,L=void 0,I=void 0,D=void 0,N=void 0;if(-E===_?n>a?(r[0]=h,r[1]=u,k=!0):(r[0]=c,r[1]=l,k=!0):E===_&&(n>a?(r[0]=s,r[1]=l,k=!0):(r[0]=d,r[1]=u,k=!0)),-S===_?a>n?(r[2]=v,r[3]=b,C=!0):(r[2]=y,r[3]=m,C=!0):S===_&&(a>n?(r[2]=g,r[3]=m,C=!0):(r[2]=x,r[3]=b,C=!0)),k&&C)return!1;if(n>a?i>o?(A=this.getCardinalDirection(E,_,4),R=this.getCardinalDirection(S,_,2)):(A=this.getCardinalDirection(-E,_,3),R=this.getCardinalDirection(-S,_,1)):i>o?(A=this.getCardinalDirection(-E,_,1),R=this.getCardinalDirection(-S,_,3)):(A=this.getCardinalDirection(E,_,2),R=this.getCardinalDirection(S,_,4)),!k)switch(A){case 1:I=l,L=n+-f/_,r[0]=L,r[1]=I;break;case 2:L=d,I=i+p*_,r[0]=L,r[1]=I;break;case 3:I=u,L=n+f/_,r[0]=L,r[1]=I;break;case 4:L=h,I=i+-p*_,r[0]=L,r[1]=I}if(!C)switch(R){case 1:N=m,D=a+-w/_,r[2]=D,r[3]=N;break;case 2:D=x,N=o+T*_,r[2]=D,r[3]=N;break;case 3:N=b,D=a+w/_,r[2]=D,r[3]=N;break;case 4:D=v,N=o+-T*_,r[2]=D,r[3]=N}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,i){if(null==i)return this.getIntersection2(t,e,r);var a,o,s,l,c,h,u,d=t.x,p=t.y,f=e.x,g=e.y,m=r.x,y=r.y,v=i.x,b=i.y;return 0===(u=(a=g-p)*(l=m-v)-(o=b-y)*(s=d-f))?null:new n((s*(h=v*y-m*b)-l*(c=f*p-d*g))/u,(o*c-a*h)/u)},i.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r<t?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},i.doIntersect=function(t,e,r,n){var i=t.x,a=t.y,o=e.x,s=e.y,l=r.x,c=r.y,h=n.x,u=n.y,d=(o-i)*(u-c)-(h-l)*(s-a);if(0===d)return!1;var p=((u-c)*(h-i)+(l-h)*(u-a))/d,f=((a-s)*(h-i)+(o-i)*(u-a))/d;return 0<p&&p<1&&0<f&&f<1},i.findCircleLineIntersections=function(t,e,r,n,i,a,o){var s=(r-t)*(r-t)+(n-e)*(n-e),l=2*((t-i)*(r-t)+(e-a)*(n-e)),c=(t-i)*(t-i)+(e-a)*(e-a)-o*o;if(l*l-4*s*c>=0){var h=(-l+Math.sqrt(l*l-4*s*c))/(2*s),u=(-l-Math.sqrt(l*l-4*s*c))/(2*s);return h>=0&&h<=1?[h]:u>=0&&u<=1?[u]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}n.sign=function(t){return t>0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){return{value:t,next:null,prev:null}},a=function(t,e,r,n){return null!==t?t.next=e:n.head=e,null!==r?r.prev=e:n.tail=e,e.prev=t,e.next=r,n.length++,e},o=function(t,e){var r=t.prev,n=t.next;return null!==r?r.next=n:e.head=n,null!==n?n.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},s=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return r.push(t)})}return n(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return a(e.prev,i(t),e,this)}},{key:"insertAfter",value:function(t,e){return a(e,i(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return a(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return a(e,t,e.next,this)}},{key:"push",value:function(t){return a(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return a(null,i(t),this.head,this)}},{key:"remove",value:function(t){return o(t,this)}},{key:"pop",value:function(){return o(this.tail,this).value}},{key:"popNode",value:function(){return o(this.tail,this)}},{key:"shift",value:function(){return o(this.head,this).value}},{key:"shiftNode",value:function(){return o(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,r=this.head;e<t;)r=r.next,e++;return r.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;n.value=e}}}]),t}();t.exports=s},function(t,e,r){"use strict";function n(t,e,r){this.x=null,this.y=null,null==t&&null==e&&null==r?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==r?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==r&&(r=t,this.x=r.x,this.y=r.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(t,e,r){"Point"==t.constructor.name&&null==e&&null==r?(r=t,this.setLocation(r.x,r.y)):"number"==typeof t&&"number"==typeof e&&null==r&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},n.prototype.move=function(t,e){this.x=t,this.y=e},n.prototype.translate=function(t,e){this.x+=t,this.y+=e},n.prototype.equals=function(t){if("Point"==t.constructor.name){var e=t;return this.x==e.x&&this.y==e.y}return this==t},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=n&&(this.x=t,this.y=e,this.width=r,this.height=n)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(t){this.x=t},n.prototype.getY=function(){return this.y},n.prototype.setY=function(t){this.y=t},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return null==t&&(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=void 0===t?"undefined":n(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},function(t,e,r){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=r(0),a=r(7),o=r(3),s=r(1),l=r(6),c=r(5),h=r(17),u=r(29);function d(t){u.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}d.RANDOM_SEED=1,d.prototype=Object.create(u.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t,t},d.prototype.newGraph=function(t){return new l(null,this.graphManager,t)},d.prototype.newNode=function(t){return new o(this.graphManager,t)},d.prototype.newEdge=function(t){return new s(null,null,t)},d.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var r=this.graphManager.getRoot().getNodes();for(e=0;e<r.length;e++)r[e];this.update(this.graphManager.getRoot())}},d.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof o){var e=t;if(null!=e.getChild())for(var r=e.getChild().getNodes(),n=0;n<r.length;n++)update(r[n]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else if(t instanceof s){var i=t;null!=i.vGraphObject&&i.vGraphObject.update(i)}else if(t instanceof l){var a=t;null!=a.vGraphObject&&a.vGraphObject.update(a)}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(t){if(null==t)this.transform(new c(0,0));else{var e=new h,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(r.x),e.setDeviceOrgY(r.y);for(var n=this.getAllNodes(),i=0;i<n.length;i++)n[i].transform(e)}}},d.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,r,n=t.getNodes(),i=0;i<n.length;i++)null==(r=(e=n[i]).getChild())||0==r.getNodes().length?e.scatter():(this.positionNodesRandomly(r),e.updateBounds())},d.prototype.getFlatForest=function(){for(var t=[],e=!0,r=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<r.length;a++)null!=r[a].getChild()&&(i=!1);if(!i)return t;var o=new Set,s=[],l=new Map,c=[];for(c=c.concat(r);c.length>0&&e;){for(s.push(c[0]);s.length>0&&e;){var h=s[0];s.splice(0,1),o.add(h);var u=h.getEdges();for(a=0;a<u.length;a++){var d=u[a].getOtherEnd(h);if(l.get(h)!=d){if(o.has(d)){e=!1;break}s.push(d),l.set(d,h)}}}if(e){var p=[].concat(n(o));for(t.push(p),a=0;a<p.length;a++){var f=p[a],g=c.indexOf(f);g>-1&&c.splice(g,1)}o=new Set,l=new Map}else t=[]}return t},d.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a);var o=this.newEdge(null);this.graphManager.add(o,r,a),e.add(a),r=a}return o=this.newEdge(null),this.graphManager.add(o,r,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):n.remove(t),e},d.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(n(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var r=t[e];if(r.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(r),a=0;a<i.length;a++){var o=i[a],s=new c(o.getCenterX(),o.getCenterY()),l=r.bendpoints.get(a);l.x=s.x,l.y=s.y,o.getOwner().remove(o)}this.graphManager.add(r,r.source,r.target)}}},d.transform=function(t,e,r,n){if(null!=r&&null!=n){var i=e;return t<=50?i-=(e-e/r)/50*(50-t):i+=(e*n-e)/50*(t-50),i}var a,o;return t<=50?(a=9*e/500,o=e/10):(a=9*e/50,o=-8*e),a*t+o},d.findCenterOfTree=function(t){var e=[];e=e.concat(t);var r=[],n=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var o=0;o<e.length;o++){var s=(h=e[o]).getNeighborsList().size;n.set(h,h.getNeighborsList().size),1==s&&r.push(h)}var l=[];for(l=l.concat(r);!i;){var c=[];for(c=c.concat(l),l=[],o=0;o<e.length;o++){var h=e[o],u=e.indexOf(h);u>=0&&e.splice(u,1),h.getNeighborsList().forEach(function(t){if(r.indexOf(t)<0){var e=n.get(t)-1;1==e&&l.push(t),n.set(t,e)}})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},d.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(5);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return 0!=r&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return 0!=r&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return 0!=r&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return 0!=r&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,r){"use strict";var n=r(15),i=r(4),a=r(0),o=r(8),s=r(9);function l(){n.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var c in l.prototype=Object.create(n.prototype),n)l[c]=n[c];l.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var t,e,r,n,o,s,l,c=this.getGraphManager().getAllEdges(),h=0;h<c.length;h++)e=(t=c[h]).idealLength,t.isInterGraph&&(n=t.getSource(),o=t.getTarget(),s=t.getSourceInLca().getEstimatedSize(),l=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=s+l-2*a.SIMPLE_NODE_SIZE),r=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+o.getInclusionTreeDepth()-2*r))},l.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),r=0;r<e.length;r++)t=e[r],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var t,e,r,n,a,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),a=new Set,t=0;t<l.length;t++)r=l[t],this.calculateRepulsionForceOfANode(r,a,o,s),a.add(r);else for(t=0;t<l.length;t++)for(r=l[t],e=t+1;e<l.length;e++)n=l[e],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},l.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),r=0;r<e.length;r++)t=e[r],this.calcGravitationalForce(t)},l.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},l.prototype.calcSpringForce=function(t,e){var r,n,i,a,o=t.getSource(),s=t.getTarget();if(this.uniformLeafNodeSizes&&null==o.getChild()&&null==s.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(i=(n=t.edgeElasticity*(r-e))*(t.lengthX/r),a=n*(t.lengthY/r),o.springForceX+=i,o.springForceY+=a,s.springForceX-=i,s.springForceY-=a)},l.prototype.calcRepulsionForce=function(t,e){var r,n,a,l,c,h,u,d=t.getRect(),p=e.getRect(),f=new Array(2),g=new Array(4);if(d.intersects(p)){o.calcSeparationAmount(d,p,f,i.DEFAULT_EDGE_LENGTH/2),h=2*f[0],u=2*f[1];var m=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=m*h,t.repulsionForceY-=m*u,e.repulsionForceX+=m*h,e.repulsionForceY+=m*u}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(r=p.getCenterX()-d.getCenterX(),n=p.getCenterY()-d.getCenterY()):(o.getIntersection(d,p,g),r=g[2]-g[0],n=g[3]-g[1]),Math.abs(r)<i.MIN_REPULSION_DIST&&(r=s.sign(r)*i.MIN_REPULSION_DIST),Math.abs(n)<i.MIN_REPULSION_DIST&&(n=s.sign(n)*i.MIN_REPULSION_DIST),a=r*r+n*n,l=Math.sqrt(a),h=(c=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/a)*r/l,u=c*n/l,t.repulsionForceX-=h,t.repulsionForceY-=u,e.repulsionForceX+=h,e.repulsionForceY+=u},l.prototype.calcGravitationalForce=function(t){var e,r,n,i,a,o,s,l;r=((e=t.getOwner()).getRight()+e.getLeft())/2,n=(e.getTop()+e.getBottom())/2,i=t.getCenterX()-r,a=t.getCenterY()-n,o=Math.abs(i)+t.getWidth()/2,s=Math.abs(a)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(o>(l=e.getEstimatedSize()*this.gravityRangeFactor)||s>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(o>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||s>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),r=0;r<e.length;r++)(t=e[r]).noOfChildren=t.getNoOfChildren()},l.prototype.calcGrid=function(t){var e,r;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var n=new Array(e),i=0;i<e;i++)n[i]=new Array(r);for(i=0;i<e;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},l.prototype.addNodeToGrid=function(t,e,r){var n,i,a,o;n=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange));for(var s=n;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(t),t.setGridCoordinates(n,i,a,o)},l.prototype.updateGrid=function(){var t,e,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<r.length;t++)e=r[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(t,e,r,n){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var a,o=new Set;t.surrounding=new Array;for(var s=this.grid,l=t.startX-1;l<t.finishX+2;l++)for(var c=t.startY-1;c<t.finishY+2;c++)if(!(l<0||c<0||l>=s.length||c>=s[0].length))for(var h=0;h<s[l][c].length;h++)if(a=s[l][c][h],t.getOwner()==a.getOwner()&&t!=a&&!e.has(a)&&!o.has(a)){var u=Math.abs(t.getCenterX()-a.getCenterX())-(t.getWidth()/2+a.getWidth()/2),d=Math.abs(t.getCenterY()-a.getCenterY())-(t.getHeight()/2+a.getHeight()/2);u<=this.repulsionRange&&d<=this.repulsionRange&&o.add(a)}t.surrounding=[].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(o))}for(l=0;l<t.surrounding.length;l++)this.calcRepulsionForce(t,t.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},t.exports=l},function(t,e,r){"use strict";var n=r(1),i=r(4);function a(t,e,r){n.call(this,t,e,r),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}for(var o in a.prototype=Object.create(n.prototype),n)a[o]=n[o];t.exports=a},function(t,e,r){"use strict";var n=r(3),i=r(4);function a(t,e,r,a){n.call(this,t,e,r,a),this.nodeRepulsion=i.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var o in a.prototype=Object.create(n.prototype),n)a[o]=n[o];a.prototype.setGridCoordinates=function(t,e,r,n){this.startX=t,this.finishX=e,this.startY=r,this.finishY=n},t.exports=a},function(t,e,r){"use strict";function n(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},t.exports=n},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),null!=this.map[t]},i.prototype.get=function(t){var e=n.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){"use strict";var n=r(14);function i(){this.set={}}i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)t.push(this.set[e[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var n=t[r];this.add(n)}},t.exports=i},function(t,e,r){"use strict";function n(){}n.multMat=function(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<e[0].length;i++){r[n][i]=0;for(var a=0;a<t[0].length;a++)r[n][i]+=t[n][a]*e[a][i]}}return r},n.transpose=function(t){for(var e=[],r=0;r<t[0].length;r++){e[r]=[];for(var n=0;n<t.length;n++)e[r][n]=t[n][r]}return e},n.multCons=function(t,e){for(var r=[],n=0;n<t.length;n++)r[n]=t[n]*e;return r},n.minusOp=function(t,e){for(var r=[],n=0;n<t.length;n++)r[n]=t[n]-e[n];return r},n.dotProduct=function(t,e){for(var r=0,n=0;n<t.length;n++)r+=t[n]*e[n];return r},n.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},n.normalize=function(t){for(var e=[],r=this.mag(t),n=0;n<t.length;n++)e[n]=t[n]/r;return e},n.multGamma=function(t){for(var e=[],r=0,n=0;n<t.length;n++)r+=t[n];r*=-1/t.length;for(var i=0;i<t.length;i++)e[i]=r+t[i];return e},n.multL=function(t,e,r){for(var n=[],i=[],a=[],o=0;o<e[0].length;o++){for(var s=0,l=0;l<e.length;l++)s+=-.5*e[l][o]*t[l];i[o]=s}for(var c=0;c<r.length;c++){for(var h=0,u=0;u<r.length;u++)h+=r[c][u]*i[u];a[c]=h}for(var d=0;d<e.length;d++){for(var p=0,f=0;f<e[0].length;f++)p+=e[d][f]*a[f];n[d]=p}return n},t.exports=n},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(11),a=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===r&&void 0===r||(this.compareFunction=this._defaultCompareFunction);var n=void 0;n=e instanceof i?e.size():e.length,this._quicksort(e,0,n-1)}return n(t,[{key:"_quicksort",value:function(t,e,r){if(e<r){var n=this._partition(t,e,r);this._quicksort(t,e,n),this._quicksort(t,n+1,r)}}},{key:"_partition",value:function(t,e,r){for(var n=this._get(t,e),i=e,a=r;;){for(;this.compareFunction(n,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),n);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}}},{key:"_get",value:function(t,e){return t instanceof i?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,r){t instanceof i?t.set_object_at(e,r):t[e]=r}},{key:"_swap",value:function(t,e,r){var n=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,n)}},{key:"_defaultCompareFunction",value:function(t,e){return e>t}}]),t}();t.exports=a},function(t,e,r){"use strict";function n(){}n.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var r=[],n=0;n<e[0];n++)r.push(t(e.slice(1)));return r}([this.m,e]),this.V=function(t){return function t(e){if(0==e.length)return 0;for(var r=[],n=0;n<e[0];n++)r.push(t(e.slice(1)));return r}(t)}([this.n,this.n]);for(var r=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.n),i=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),a=Math.min(this.m-1,this.n),o=Math.max(0,Math.min(this.n-2,this.m)),s=0;s<Math.max(a,o);s++){if(s<a){this.s[s]=0;for(var l=s;l<this.m;l++)this.s[s]=n.hypot(this.s[s],t[l][s]);if(0!==this.s[s]){t[s][s]<0&&(this.s[s]=-this.s[s]);for(var c=s;c<this.m;c++)t[c][s]/=this.s[s];t[s][s]+=1}this.s[s]=-this.s[s]}for(var h=s+1;h<this.n;h++){if(function(t,e){return t&&e}(s<a,0!==this.s[s])){for(var u=0,d=s;d<this.m;d++)u+=t[d][s]*t[d][h];u=-u/t[s][s];for(var p=s;p<this.m;p++)t[p][h]+=u*t[p][s]}r[h]=t[s][h]}if(function(t,e){return e}(0,s<a))for(var f=s;f<this.m;f++)this.U[f][s]=t[f][s];if(s<o){r[s]=0;for(var g=s+1;g<this.n;g++)r[s]=n.hypot(r[s],r[g]);if(0!==r[s]){r[s+1]<0&&(r[s]=-r[s]);for(var m=s+1;m<this.n;m++)r[m]/=r[s];r[s+1]+=1}if(r[s]=-r[s],function(t,e){return t&&e}(s+1<this.m,0!==r[s])){for(var y=s+1;y<this.m;y++)i[y]=0;for(var v=s+1;v<this.n;v++)for(var b=s+1;b<this.m;b++)i[b]+=r[v]*t[b][v];for(var x=s+1;x<this.n;x++)for(var T=-r[x]/r[s+1],w=s+1;w<this.m;w++)t[w][x]+=T*i[w]}for(var k=s+1;k<this.n;k++)this.V[k][s]=r[k]}}var C=Math.min(this.n,this.m+1);a<this.n&&(this.s[a]=t[a][a]),this.m<C&&(this.s[C-1]=0),o+1<C&&(r[o]=t[o][C-1]),r[C-1]=0;for(var E=a;E<e;E++){for(var S=0;S<this.m;S++)this.U[S][E]=0;this.U[E][E]=1}for(var _=a-1;_>=0;_--)if(0!==this.s[_]){for(var A=_+1;A<e;A++){for(var R=0,L=_;L<this.m;L++)R+=this.U[L][_]*this.U[L][A];R=-R/this.U[_][_];for(var I=_;I<this.m;I++)this.U[I][A]+=R*this.U[I][_]}for(var D=_;D<this.m;D++)this.U[D][_]=-this.U[D][_];this.U[_][_]=1+this.U[_][_];for(var N=0;N<_-1;N++)this.U[N][_]=0}else{for(var M=0;M<this.m;M++)this.U[M][_]=0;this.U[_][_]=1}for(var O=this.n-1;O>=0;O--){if(function(t,e){return t&&e}(O<o,0!==r[O]))for(var $=O+1;$<e;$++){for(var P=0,B=O+1;B<this.n;B++)P+=this.V[B][O]*this.V[B][$];P=-P/this.V[O+1][O];for(var F=O+1;F<this.n;F++)this.V[F][$]+=P*this.V[F][O]}for(var z=0;z<this.n;z++)this.V[z][O]=0;this.V[O][O]=1}for(var K=C-1,j=Math.pow(2,-52),q=Math.pow(2,-966);C>0;){var W=void 0,U=void 0;for(W=C-2;W>=-1&&-1!==W;W--)if(Math.abs(r[W])<=q+j*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){r[W]=0;break}if(W===C-2)U=4;else{var G=void 0;for(G=C-1;G>=W&&G!==W;G--){var Y=(G!==C?Math.abs(r[G]):0)+(G!==W+1?Math.abs(r[G-1]):0);if(Math.abs(this.s[G])<=q+j*Y){this.s[G]=0;break}}G===W?U=3:G===C-1?U=1:(U=2,W=G)}switch(W++,U){case 1:var V=r[C-2];r[C-2]=0;for(var H=C-2;H>=W;H--){var X=n.hypot(this.s[H],V),Z=this.s[H]/X,Q=V/X;this.s[H]=X,H!==W&&(V=-Q*r[H-1],r[H-1]=Z*r[H-1]);for(var J=0;J<this.n;J++)X=Z*this.V[J][H]+Q*this.V[J][C-1],this.V[J][C-1]=-Q*this.V[J][H]+Z*this.V[J][C-1],this.V[J][H]=X}break;case 2:var tt=r[W-1];r[W-1]=0;for(var et=W;et<C;et++){var rt=n.hypot(this.s[et],tt),nt=this.s[et]/rt,it=tt/rt;this.s[et]=rt,tt=-it*r[et],r[et]=nt*r[et];for(var at=0;at<this.m;at++)rt=nt*this.U[at][et]+it*this.U[at][W-1],this.U[at][W-1]=-it*this.U[at][et]+nt*this.U[at][W-1],this.U[at][et]=rt}break;case 3:var ot=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[C-1]),Math.abs(this.s[C-2])),Math.abs(r[C-2])),Math.abs(this.s[W])),Math.abs(r[W])),st=this.s[C-1]/ot,lt=this.s[C-2]/ot,ct=r[C-2]/ot,ht=this.s[W]/ot,ut=r[W]/ot,dt=((lt+st)*(lt-st)+ct*ct)/2,pt=st*ct*(st*ct),ft=0;(function(t,e){return t||e})(0!==dt,0!==pt)&&(ft=Math.sqrt(dt*dt+pt),dt<0&&(ft=-ft),ft=pt/(dt+ft));for(var gt=(ht+st)*(ht-st)+ft,mt=ht*ut,yt=W;yt<C-1;yt++){var vt=n.hypot(gt,mt),bt=gt/vt,xt=mt/vt;yt!==W&&(r[yt-1]=vt),gt=bt*this.s[yt]+xt*r[yt],r[yt]=bt*r[yt]-xt*this.s[yt],mt=xt*this.s[yt+1],this.s[yt+1]=bt*this.s[yt+1];for(var Tt=0;Tt<this.n;Tt++)vt=bt*this.V[Tt][yt]+xt*this.V[Tt][yt+1],this.V[Tt][yt+1]=-xt*this.V[Tt][yt]+bt*this.V[Tt][yt+1],this.V[Tt][yt]=vt;if(bt=gt/(vt=n.hypot(gt,mt)),xt=mt/vt,this.s[yt]=vt,gt=bt*r[yt]+xt*this.s[yt+1],this.s[yt+1]=-xt*r[yt]+bt*this.s[yt+1],mt=xt*r[yt+1],r[yt+1]=bt*r[yt+1],yt<this.m-1)for(var wt=0;wt<this.m;wt++)vt=bt*this.U[wt][yt]+xt*this.U[wt][yt+1],this.U[wt][yt+1]=-xt*this.U[wt][yt]+bt*this.U[wt][yt+1],this.U[wt][yt]=vt}r[C-2]=gt;break;case 4:if(this.s[W]<=0){this.s[W]=this.s[W]<0?-this.s[W]:0;for(var kt=0;kt<=K;kt++)this.V[kt][W]=-this.V[kt][W]}for(;W<K&&!(this.s[W]>=this.s[W+1]);){var Ct=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=Ct,W<this.n-1)for(var Et=0;Et<this.n;Et++)Ct=this.V[Et][W+1],this.V[Et][W+1]=this.V[Et][W],this.V[Et][W]=Ct;if(W<this.m-1)for(var St=0;St<this.m;St++)Ct=this.U[St][W+1],this.U[St][W+1]=this.U[St][W],this.U[St][W]=Ct;W++}C--}}return{U:this.U,V:this.V,S:this.s}},n.hypot=function(t,e){var r=void 0;return Math.abs(t)>Math.abs(e)?(r=e/t,r=Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,r=Math.abs(e)*Math.sqrt(1+r*r)):r=0,r},t.exports=n},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=r,this.match_score=n,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][s]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[l][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],r=this.tracebackGrid[e.pos[0]][e.pos[1]];r[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),r[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),r[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var r=[],n=-1;-1!==(n=t.indexOf(e,n+1));)r.push(n);return r}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t}();t.exports=i},function(t,e,r){"use strict";var n=function(){};n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),t.exports=n},function(t,e,r){"use strict";function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;r>=0;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];t===n.event&&n.callback(e)}},t.exports=n}])},t.exports=e()},4353(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",o="hour",s="day",l="week",c="month",h="quarter",u="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},v={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),i=e.clone().add(n,c),a=r-i<0,o=e.clone().add(n+(a?-1:1),c);return+(-(n+(r-i)/(a?i-o:o-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:u,w:l,d:s,D:d,h:o,m:a,s:i,ms:n,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",x={};x[b]=m;var T="$isDayjsObject",w=function(t){return t instanceof S||!(!t||!t[T])},k=function t(e,r,n){var i;if(!e)return b;if("string"==typeof e){var a=e.toLowerCase();x[a]&&(i=a),r&&(x[a]=r,i=a);var o=e.split("-");if(!i&&o.length>1)return t(o[0])}else{var s=e.name;x[s]=e,i=s}return!n&&i&&(b=i),i||!n&&b},C=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},E=v;E.l=k,E.i=w,E.w=function(t,e){return C(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[T]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(f);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return E},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var r=C(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return C(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<C(t)},y.$g=function(t,e,r){return E.u(t)?this[e]:this.set(r,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var r=this,n=!!E.u(e)||e,h=E.p(t),p=function(t,e){var i=E.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?i:i.endOf(s)},f=function(t,e){return E.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},g=this.$W,m=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case u:return n?p(1,0):p(31,11);case c:return n?p(1,m):p(0,m+1);case l:var b=this.$locale().weekStart||0,x=(g<b?g+7:g)-b;return p(n?y-x:y+(6-x),m);case s:case d:return f(v+"Hours",0);case o:return f(v+"Minutes",1);case a:return f(v+"Seconds",2);case i:return f(v+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var r,l=E.p(t),h="set"+(this.$u?"UTC":""),p=(r={},r[s]=h+"Date",r[d]=h+"Date",r[c]=h+"Month",r[u]=h+"FullYear",r[o]=h+"Hours",r[a]=h+"Minutes",r[i]=h+"Seconds",r[n]=h+"Milliseconds",r)[l],f=l===s?this.$D+(e-this.$W):e;if(l===c||l===u){var g=this.clone().set(d,1);g.$d[p](f),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[E.p(t)]()},y.add=function(n,h){var d,p=this;n=Number(n);var f=E.p(h),g=function(t){var e=C(p);return E.w(e.date(e.date()+Math.round(t*n)),p)};if(f===c)return this.set(c,this.$M+n);if(f===u)return this.set(u,this.$y+n);if(f===s)return g(1);if(f===l)return g(7);var m=(d={},d[a]=e,d[o]=r,d[i]=t,d)[f]||1,y=this.$d.getTime()+n*m;return E.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=E.z(this),a=this.$H,o=this.$m,s=this.$M,l=r.weekdays,c=r.months,h=r.meridiem,u=function(t,r,i,a){return t&&(t[r]||t(e,n))||i[r].slice(0,a)},d=function(t){return E.s(a%12||12,t,"0")},f=h||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(g,function(t,n){return n||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return E.s(e.$y,4,"0");case"M":return s+1;case"MM":return E.s(s+1,2,"0");case"MMM":return u(r.monthsShort,s,c,3);case"MMMM":return u(c,s);case"D":return e.$D;case"DD":return E.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(r.weekdaysMin,e.$W,l,2);case"ddd":return u(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return E.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(a,o,!0);case"A":return f(a,o,!1);case"m":return String(o);case"mm":return E.s(o,2,"0");case"s":return String(e.$s);case"ss":return E.s(e.$s,2,"0");case"SSS":return E.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(n,d,p){var f,g=this,m=E.p(d),y=C(n),v=(y.utcOffset()-this.utcOffset())*e,b=this-y,x=function(){return E.m(g,y)};switch(m){case u:f=x()/12;break;case c:f=x();break;case h:f=x()/3;break;case l:f=(b-v)/6048e5;break;case s:f=(b-v)/864e5;break;case o:f=b/r;break;case a:f=b/e;break;case i:f=b/t;break;default:f=b}return p?f:E.a(f)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return x[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=k(t,e,!0);return n&&(r.$L=n),r},y.clone=function(){return E.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),_=S.prototype;return C.prototype=_,[["$ms",n],["$s",i],["$m",a],["$H",o],["$W",s],["$M",c],["$y",u],["$D",d]].forEach(function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),C.extend=function(t,e){return t.$i||(t(e,S,C),t.$i=!0),C},C.locale=k,C.isDayjs=w,C.unix=function(t){return C(1e3*t)},C.en=x[b],C.Ls=x,C.p={},C}()},7375(t){t.exports=function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return n.bind(this)(t);var i=this.$utils(),a=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return r.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return r.ordinal(e.week(),"W");case"w":case"ww":return i.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return i.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return i.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return n.bind(this)(a)}}}()},445(t){t.exports=function(){"use strict";var t={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"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(t){return(t=+t)+(t>68?1900:2e3)},l=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),r=60*e[1]+(+e[2]||0);return 0===r?0:"+"===e[0]?-r:r}(t)}],h=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var r,n=o.meridiem;if(n){for(var i=1;i<=24;i+=1)if(t.indexOf(n(i,0,e))>-1){r=i>12;break}}else r=t===(e?"pm":"PM");return r},d={A:[a,function(t){this.afternoon=u(t,!1)}],a:[a,function(t){this.afternoon=u(t,!0)}],Q:[r,function(t){this.month=3*(t-1)+1}],S:[r,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(t){var e=o.ordinal,r=t.match(/\d+/);if(this.day=r[0],e)for(var n=1;n<=31;n+=1)e(n).replace(/\[|\]/g,"")===t&&(this.day=n)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[a,function(t){var e=h("months"),r=(h("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(r<1)throw new Error;this.month=r%12||r}],MMMM:[a,function(t){var e=h("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(t){this.year=s(t)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function p(r){var n,i;n=r,i=o&&o.formats;for(var a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,r,n){var a=n&&n.toUpperCase();return r||i[n]||t[n]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,r){return e||r.slice(1)})})).match(e),s=a.length,l=0;l<s;l+=1){var c=a[l],h=d[c],u=h&&h[0],p=h&&h[1];a[l]=p?{regex:u,parser:p}:c.replace(/^\[|\]$/g,"")}return function(t){for(var e={},r=0,n=0;r<s;r+=1){var i=a[r];if("string"==typeof i)n+=i.length;else{var o=i.regex,l=i.parser,c=t.slice(n),h=o.exec(c)[0];l.call(e,h),t=t.replace(h,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var r=t.hours;e?r<12&&(t.hours+=12):12===r&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,r){r.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var n=e.prototype,i=n.parse;n.parse=function(t){var e=t.date,n=t.utc,a=t.args;this.$u=n;var s=a[1];if("string"==typeof s){var l=!0===a[2],c=!0===a[3],h=l||c,u=a[2];c&&(u=a[2]),o=this.$locale(),!l&&u&&(o=r.Ls[u]),this.$d=function(t,e,r,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var i=p(e)(t),a=i.year,o=i.month,s=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,f=i.week,g=new Date,m=s||(a||o?1:g.getDate()),y=a||g.getFullYear(),v=0;a&&!o||(v=o>0?o-1:g.getMonth());var b,x=l||0,T=c||0,w=h||0,k=u||0;return d?new Date(Date.UTC(y,v,m,x,T,w,k+60*d.offset*1e3)):r?new Date(Date.UTC(y,v,m,x,T,w,k)):(b=new Date(y,v,m,x,T,w,k),f&&(b=n(b).week(f).toDate()),b)}catch(t){return new Date("")}}(e,s,n,r),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),h&&e!=this.format(s)&&(this.$d=new Date("")),o={}}else if(s instanceof Array)for(var d=s.length,f=1;f<=d;f+=1){a[1]=s[f-1];var g=r.apply(this,a);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}f===d&&(this.$d=new Date(""))}else i.call(this,t)}}}()},3522(t){t.exports=function(){"use strict";var t,e,r=1e3,n=6e4,i=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:s,months:l,days:a,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof v},d=function(t,e,r){return new v(t,r,e.$l)},p=function(t){return e.p(t)+"s"},f=function(t){return t<0},g=function(t){return f(t)?Math.ceil(t):Math.floor(t)},m=function(t){return Math.abs(t)},y=function(t,e){return t?f(t)?{negative:!0,format:""+m(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},v=function(){function f(t,e,r){var n=this;if(this.$d={},this.$l=r,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return d(t*h[p(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){n.$d[p(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var i=t.match(c);if(i){var a=i.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var m=f.prototype;return m.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,r){return e+(t.$d[r]||0)*h[r]},0)},m.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=g(t/s),t%=s,this.$d.months=g(t/l),t%=l,this.$d.days=g(t/a),t%=a,this.$d.hours=g(t/i),t%=i,this.$d.minutes=g(t/n),t%=n,this.$d.seconds=g(t/r),t%=r,this.$d.milliseconds=t},m.toISOString=function(){var t=y(this.$d.years,"Y"),e=y(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=y(r,"D"),i=y(this.$d.hours,"H"),a=y(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=y(o,"S"),l=t.negative||e.negative||n.negative||i.negative||a.negative||s.negative,c=i.format||a.format||s.format?"T":"",h=(l?"-":"")+"P"+t.format+e.format+n.format+c+i.format+a.format+s.format;return"P"===h||"-P"===h?"P0D":h},m.toJSON=function(){return this.toISOString()},m.format=function(t){var r=t||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return r.replace(o,function(t,e){return e||String(n[t])})},m.as=function(t){return this.$ms/h[p(t)]},m.get=function(t){var e=this.$ms,r=p(t);return"milliseconds"===r?e%=1e3:e="weeks"===r?g(e/h[r]):this.$d[r],e||0},m.add=function(t,e,r){var n;return n=e?t*h[p(e)]:u(t)?t.$ms:d(t,this).$ms,d(this.$ms+n*(r?-1:1),this)},m.subtract=function(t,e){return this.add(t,e,!0)},m.locale=function(t){var e=this.clone();return e.$l=t,e},m.clone=function(){return d(this.$ms,this)},m.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},m.valueOf=function(){return this.asMilliseconds()},m.milliseconds=function(){return this.get("milliseconds")},m.asMilliseconds=function(){return this.as("milliseconds")},m.seconds=function(){return this.get("seconds")},m.asSeconds=function(){return this.as("seconds")},m.minutes=function(){return this.get("minutes")},m.asMinutes=function(){return this.as("minutes")},m.hours=function(){return this.get("hours")},m.asHours=function(){return this.as("hours")},m.days=function(){return this.get("days")},m.asDays=function(){return this.as("days")},m.weeks=function(){return this.get("weeks")},m.asWeeks=function(){return this.as("weeks")},m.months=function(){return this.get("months")},m.asMonths=function(){return this.as("months")},m.years=function(){return this.get("years")},m.asYears=function(){return this.as("years")},f}(),b=function(t,e,r){return t.add(e.years()*r,"y").add(e.months()*r,"M").add(e.days()*r,"d").add(e.hours()*r,"h").add(e.minutes()*r,"m").add(e.seconds()*r,"s").add(e.milliseconds()*r,"ms")};return function(r,n,i){t=i,e=i().$utils(),i.duration=function(t,e){var r=i.locale();return d(t,{$l:r},e)},i.isDuration=u;var a=n.prototype.add,o=n.prototype.subtract;n.prototype.add=function(t,e){return u(t)?b(this,t,1):a.bind(this)(t,e)},n.prototype.subtract=function(t,e){return u(t)?b(this,t,-1):o.bind(this)(t,e)}}}()},8313(t){t.exports=function(){"use strict";var t="day";return function(e,r,n){var i=function(e){return e.add(4-e.isoWeekday(),t)},a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var r,a,o,s=i(this),l=(r=this.isoWeekYear(),o=4-(a=(this.$u?n.utc:n)().year(r).startOf("year")).isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,t));return s.diff(l,"week")+1},a.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var o=a.startOf;a.startOf=function(t,e){var r=this.$utils(),n=!!r.u(e)||e;return"isoweek"===r.p(t)?n?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(t,e)}}}()},3143(t){var e;e=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function o(t,e,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),o=r(0),s=r(16),l=r(4);function c(t,e,r,o){null==r&&null==o&&(o=e),n.call(this,o),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new a(e.x,e.y,r.width,r.height):new a}for(var h in c.prototype=Object.create(n.prototype),n)c[h]=n[h];c.prototype.getEdges=function(){return this.edges},c.prototype.getChild=function(){return this.child},c.prototype.getOwner=function(){return this.owner},c.prototype.getWidth=function(){return this.rect.width},c.prototype.setWidth=function(t){this.rect.width=t},c.prototype.getHeight=function(){return this.rect.height},c.prototype.setHeight=function(t){this.rect.height=t},c.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},c.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},c.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},c.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},c.prototype.getRect=function(){return this.rect},c.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},c.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},c.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},c.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},c.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},c.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},c.prototype.getEdgeListToNode=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.target==t){if(n.source!=r)throw"Incorrect edge source!";e.push(n)}}),e},c.prototype.getEdgesBetween=function(t){var e=[],r=this;return r.edges.forEach(function(n){if(n.source!=r&&n.target!=r)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},c.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(r){if(r.source==e)t.add(r.target);else{if(r.target!=e)throw"Incorrect incidency!";t.add(r.source)}}),t},c.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;r<e.length;r++)e[r].withChildren().forEach(function(e){t.add(e)});return t},c.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),r=0;r<e.length;r++)t+=e[r].getNoOfChildren();return 0==t&&(t=1),t},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},c.prototype.scatter=function(){var t,e,r=-o.INITIAL_WORLD_BOUNDARY,n=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_X+s.nextDouble()*(n-r)+r;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=t,this.rect.y=e},c.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),r=t.getBottom()-t.getTop();this.labelWidth>e&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>r&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-r)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-r),this.setHeight(this.labelHeight))}}},c.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},c.prototype.transform=function(t){var e=this.rect.x;e>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY);var r=this.rect.y;r>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var n=new l(e,r),i=t.inverseTransformPoint(n);this.setLocation(i.x,i.y)},c.prototype.getLeft=function(){return this.rect.x},c.prototype.getRight=function(){return this.rect.x+this.rect.width},c.prototype.getTop=function(){return this.rect.y},c.prototype.getBottom=function(){return this.rect.y+this.rect.height},c.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=c},function(t,e,r){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),o=r(6),s=r(3),l=r(1),c=r(13),h=r(12),u=r(11);function d(t,e,r){n.call(this,r),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof o?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var p in d.prototype=Object.create(n.prototype),n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var i=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(r)>-1))throw"Source or target not in graph!";if(e.owner!=r.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=r.owner?null:(i.source=e,i.target=r,i.isInterGraph=!1,this.getEdges().push(i),e.edges.push(i),r!=e&&r.edges.push(i),i)},d.prototype.remove=function(t){var e=t;if(t instanceof s){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var r=e.edges.slice(),n=r.length,i=0;i<n;i++)(a=r[i]).isInterGraph?this.graphManager.remove(a):a.source.owner.remove(a);if(-1==(o=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(o,1)}else if(t instanceof l){var a;if(null==(a=t))throw"Edge is null!";if(null==a.source||null==a.target)throw"Source and/or target is null!";if(null==a.source.owner||null==a.target.owner||a.source.owner!=this||a.target.owner!=this)throw"Source and/or target owner is invalid!";var o,c=a.source.edges.indexOf(a),h=a.target.edges.indexOf(a);if(!(c>-1&&h>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(c,1),a.target!=a.source&&a.target.edges.splice(h,1),-1==(o=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(o,1)}},d.prototype.updateLeftTop=function(){for(var t,e,r,n=i.MAX_VALUE,a=i.MAX_VALUE,o=this.getNodes(),s=o.length,l=0;l<s;l++){var c=o[l];n>(t=c.getTop())&&(n=t),a>(e=c.getLeft())&&(a=e)}return n==i.MAX_VALUE?null:(r=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=a-r,this.top=n-r,new h(this.left,this.top))},d.prototype.updateBounds=function(t){for(var e,r,n,a,o,s=i.MAX_VALUE,l=-i.MAX_VALUE,h=i.MAX_VALUE,u=-i.MAX_VALUE,d=this.nodes,p=d.length,f=0;f<p;f++){var g=d[f];t&&null!=g.child&&g.updateBounds(),s>(e=g.getLeft())&&(s=e),l<(r=g.getRight())&&(l=r),h>(n=g.getTop())&&(h=n),u<(a=g.getBottom())&&(u=a)}var m=new c(s,h,l-s,u-h);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),o=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=m.x-o,this.right=m.x+m.width+o,this.top=m.y-o,this.bottom=m.y+m.height+o},d.calculateBounds=function(t){for(var e,r,n,a,o=i.MAX_VALUE,s=-i.MAX_VALUE,l=i.MAX_VALUE,h=-i.MAX_VALUE,u=t.length,d=0;d<u;d++){var p=t[d];o>(e=p.getLeft())&&(o=e),s<(r=p.getRight())&&(s=r),l>(n=p.getTop())&&(l=n),h<(a=p.getBottom())&&(h=a)}return new c(o,l,s-o,h-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,r=e.length,n=0;n<r;n++)t+=e[n].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},d.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var e,r,n=new u,i=new Set,a=this.nodes[0];for(a.withChildren().forEach(function(t){n.push(t),i.add(t)});0!==n.length;)for(var o=(e=(a=n.shift()).getEdges()).length,s=0;s<o;s++)null==(r=e[s].getOtherEndInGraph(a,this))||i.has(r)||r.withChildren().forEach(function(t){n.push(t),i.add(t)});if(this.isConnected=!1,i.size>=this.nodes.length){var l=0;i.forEach(function(e){e.owner==t&&l++}),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=d},function(t,e,r){"use strict";var n,i=r(1);function a(t){n=r(5),this.layout=t,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),r=this.add(t,e);return this.setRootGraph(r),this.rootGraph},a.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}i=r,r=t;var a=(n=e).getOwner(),o=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==o)return r.isInterGraph=!1,a.add(r,n,i);if(r.isInterGraph=!0,r.source=n,r.target=i,this.edges.indexOf(r)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(r),null==r.source||null==r.target)throw"Edge source and/or target is null!";if(-1!=r.source.edges.indexOf(r)||-1!=r.target.edges.indexOf(r))throw"Edge already in source and/or target incidency list!";return r.source.edges.push(r),r.target.edges.push(r),r},a.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var r,a=[],o=(a=a.concat(e.getEdges())).length,s=0;s<o;s++)r=a[s],e.remove(r);var l,c=[];for(o=(c=c.concat(e.getNodes())).length,s=0;s<o;s++)l=c[s],e.remove(l);e==this.rootGraph&&this.setRootGraph(null);var h=this.graphs.indexOf(e);this.graphs.splice(h,1),e.parent=null}else if(t instanceof i){if(null==(r=t))throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(null==r.source||null==r.target)throw"Source and/or target is null!";if(-1==r.source.edges.indexOf(r)||-1==r.target.edges.indexOf(r))throw"Source and/or target doesn't know this edge!";if(h=r.source.edges.indexOf(r),r.source.edges.splice(h,1),h=r.target.edges.indexOf(r),r.target.edges.splice(h,1),null==r.source.owner||null==r.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==r.source.owner.getGraphManager().edges.indexOf(r))throw"Not in owner graph manager's edge list!";h=r.source.owner.getGraphManager().edges.indexOf(r),r.source.owner.getGraphManager().edges.splice(h,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),r=e.length,n=0;n<r;n++)t=t.concat(e[n].getNodes());this.allNodes=t}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(null==this.allEdges){for(var t=[],e=this.getGraphs(),r=(e.length,0);r<e.length;r++)t=t.concat(e[r].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var r,n=t.getOwner();null!=(r=n.getParent());){if(r==e)return!0;if(null==(n=r.getOwner()))break}for(n=e.getOwner();null!=(r=n.getParent());){if(r==t)return!0;if(null==(n=r.getOwner()))break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var t,e,r,n,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++)if(e=(t=a[s]).source,r=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=r,e!=r){for(n=e.getOwner();null==t.lca;){for(t.targetInLca=r,i=r.getOwner();null==t.lca;){if(i==n){t.lca=i;break}if(i==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=i.getParent(),i=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=e.getOwner()},a.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var r=t.getOwner();null!=r;){for(var n=e.getOwner();null!=n;){if(n==r)return n;n=n.getParent().getOwner()}r=r.getParent().getOwner()}return r},a.prototype.calcInclusionTreeDepths=function(t,e){var r;null==t&&null==e&&(t=this.rootGraph,e=1);for(var n=t.getNodes(),i=n.length,a=0;a<i;a++)(r=n[a]).inclusionTreeDepth=e,null!=r.child&&this.calcInclusionTreeDepths(r.child,e+1)},a.prototype.includesInvalidEdge=function(){for(var t,e=this.edges.length,r=0;r<e;r++)if(t=this.edges[r],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=a},function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";var n=r(12);function i(){}i.calcSeparationAmount=function(t,e,r,n){if(!t.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(t,e,i),r[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),r[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var a=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(a=1);var o=a*r[0],s=r[1]/a;r[0]<s?s=r[0]:o=r[1],r[0]=-1*i[0]*(s/2+n),r[1]=-1*i[1]*(o/2+n)},i.decideDirectionsForOverlappingNodes=function(t,e,r){t.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,t.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},i.getIntersection2=function(t,e,r){var n=t.getCenterX(),i=t.getCenterY(),a=e.getCenterX(),o=e.getCenterY();if(t.intersects(e))return r[0]=n,r[1]=i,r[2]=a,r[3]=o,!0;var s=t.getX(),l=t.getY(),c=t.getRight(),h=t.getX(),u=t.getBottom(),d=t.getRight(),p=t.getWidthHalf(),f=t.getHeightHalf(),g=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),b=e.getBottom(),x=e.getRight(),T=e.getWidthHalf(),w=e.getHeightHalf(),k=!1,C=!1;if(n===a){if(i>o)return r[0]=n,r[1]=l,r[2]=a,r[3]=b,!1;if(i<o)return r[0]=n,r[1]=u,r[2]=a,r[3]=m,!1}else if(i===o){if(n>a)return r[0]=s,r[1]=i,r[2]=y,r[3]=o,!1;if(n<a)return r[0]=c,r[1]=i,r[2]=g,r[3]=o,!1}else{var E=t.height/t.width,S=e.height/e.width,_=(o-i)/(a-n),A=void 0,R=void 0,L=void 0,I=void 0,D=void 0,N=void 0;if(-E===_?n>a?(r[0]=h,r[1]=u,k=!0):(r[0]=c,r[1]=l,k=!0):E===_&&(n>a?(r[0]=s,r[1]=l,k=!0):(r[0]=d,r[1]=u,k=!0)),-S===_?a>n?(r[2]=v,r[3]=b,C=!0):(r[2]=y,r[3]=m,C=!0):S===_&&(a>n?(r[2]=g,r[3]=m,C=!0):(r[2]=x,r[3]=b,C=!0)),k&&C)return!1;if(n>a?i>o?(A=this.getCardinalDirection(E,_,4),R=this.getCardinalDirection(S,_,2)):(A=this.getCardinalDirection(-E,_,3),R=this.getCardinalDirection(-S,_,1)):i>o?(A=this.getCardinalDirection(-E,_,1),R=this.getCardinalDirection(-S,_,3)):(A=this.getCardinalDirection(E,_,2),R=this.getCardinalDirection(S,_,4)),!k)switch(A){case 1:I=l,L=n+-f/_,r[0]=L,r[1]=I;break;case 2:L=d,I=i+p*_,r[0]=L,r[1]=I;break;case 3:I=u,L=n+f/_,r[0]=L,r[1]=I;break;case 4:L=h,I=i+-p*_,r[0]=L,r[1]=I}if(!C)switch(R){case 1:N=m,D=a+-w/_,r[2]=D,r[3]=N;break;case 2:D=x,N=o+T*_,r[2]=D,r[3]=N;break;case 3:N=b,D=a+w/_,r[2]=D,r[3]=N;break;case 4:D=v,N=o+-T*_,r[2]=D,r[3]=N}}return!1},i.getCardinalDirection=function(t,e,r){return t>e?r:1+r%4},i.getIntersection=function(t,e,r,i){if(null==i)return this.getIntersection2(t,e,r);var a,o,s,l,c,h,u,d=t.x,p=t.y,f=e.x,g=e.y,m=r.x,y=r.y,v=i.x,b=i.y;return 0===(u=(a=g-p)*(l=m-v)-(o=b-y)*(s=d-f))?null:new n((s*(h=v*y-m*b)-l*(c=f*p-d*g))/u,(o*c-a*h)/u)},i.angleOfVector=function(t,e,r,n){var i=void 0;return t!==r?(i=Math.atan((n-e)/(r-t)),r<t?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},i.doIntersect=function(t,e,r,n){var i=t.x,a=t.y,o=e.x,s=e.y,l=r.x,c=r.y,h=n.x,u=n.y,d=(o-i)*(u-c)-(h-l)*(s-a);if(0===d)return!1;var p=((u-c)*(h-i)+(l-h)*(u-a))/d,f=((a-s)*(h-i)+(o-i)*(u-a))/d;return 0<p&&p<1&&0<f&&f<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}n.sign=function(t){return t>0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(t){return{value:t,next:null,prev:null}},a=function(t,e,r,n){return null!==t?t.next=e:n.head=e,null!==r?r.prev=e:n.tail=e,e.prev=t,e.next=r,n.length++,e},o=function(t,e){var r=t.prev,n=t.next;return null!==r?r.next=n:e.head=n,null!==n?n.prev=r:e.tail=r,t.prev=t.next=null,e.length--,t},s=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return r.push(t)})}return n(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return a(e.prev,i(t),e,this)}},{key:"insertAfter",value:function(t,e){return a(e,i(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return a(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return a(e,t,e.next,this)}},{key:"push",value:function(t){return a(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return a(null,i(t),this.head,this)}},{key:"remove",value:function(t){return o(t,this)}},{key:"pop",value:function(){return o(this.tail,this).value}},{key:"popNode",value:function(){return o(this.tail,this)}},{key:"shift",value:function(){return o(this.head,this).value}},{key:"shiftNode",value:function(){return o(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,r=this.head;e<t;)r=r.next,e++;return r.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var r=1,n=this.head;r<t;)n=n.next,r++;n.value=e}}}]),t}();t.exports=s},function(t,e,r){"use strict";function n(t,e,r){this.x=null,this.y=null,null==t&&null==e&&null==r?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==r?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==r&&(r=t,this.x=r.x,this.y=r.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(t,e,r){"Point"==t.constructor.name&&null==e&&null==r?(r=t,this.setLocation(r.x,r.y)):"number"==typeof t&&"number"==typeof e&&null==r&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},n.prototype.move=function(t,e){this.x=t,this.y=e},n.prototype.translate=function(t,e){this.x+=t,this.y+=e},n.prototype.equals=function(t){if("Point"==t.constructor.name){var e=t;return this.x==e.x&&this.y==e.y}return this==t},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=r&&null!=n&&(this.x=t,this.y=e,this.width=r,this.height=n)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(t){this.x=t},n.prototype.getY=function(){return this.y},n.prototype.setY=function(t){this.y=t},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function i(){}i.lastID=0,i.createID=function(t){return i.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=i.getString(),i.lastID++),t.uniqueID)},i.getString=function(t){return null==t&&(t=i.lastID),"Object#"+t},i.isPrimitive=function(t){var e=void 0===t?"undefined":n(t);return null==t||"object"!=e&&"function"!=e},t.exports=i},function(t,e,r){"use strict";function n(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=r(0),a=r(6),o=r(3),s=r(1),l=r(5),c=r(4),h=r(17),u=r(27);function d(t){u.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}d.RANDOM_SEED=1,d.prototype=Object.create(u.prototype),d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},d.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},d.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},d.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t,t},d.prototype.newGraph=function(t){return new l(null,this.graphManager,t)},d.prototype.newNode=function(t){return new o(this.graphManager,t)},d.prototype.newEdge=function(t){return new s(null,null,t)},d.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},d.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==i.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},d.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},d.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var r=this.graphManager.getRoot().getNodes();for(e=0;e<r.length;e++)r[e];this.update(this.graphManager.getRoot())}},d.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof o){var e=t;if(null!=e.getChild())for(var r=e.getChild().getNodes(),n=0;n<r.length;n++)update(r[n]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else if(t instanceof s){var i=t;null!=i.vGraphObject&&i.vGraphObject.update(i)}else if(t instanceof l){var a=t;null!=a.vGraphObject&&a.vGraphObject.update(a)}},d.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},d.prototype.transform=function(t){if(null==t)this.transform(new c(0,0));else{var e=new h,r=this.graphManager.getRoot().updateLeftTop();if(null!=r){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(r.x),e.setDeviceOrgY(r.y);for(var n=this.getAllNodes(),i=0;i<n.length;i++)n[i].transform(e)}}},d.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,r,n=t.getNodes(),i=0;i<n.length;i++)null==(r=(e=n[i]).getChild())||0==r.getNodes().length?e.scatter():(this.positionNodesRandomly(r),e.updateBounds())},d.prototype.getFlatForest=function(){for(var t=[],e=!0,r=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<r.length;a++)null!=r[a].getChild()&&(i=!1);if(!i)return t;var o=new Set,s=[],l=new Map,c=[];for(c=c.concat(r);c.length>0&&e;){for(s.push(c[0]);s.length>0&&e;){var h=s[0];s.splice(0,1),o.add(h);var u=h.getEdges();for(a=0;a<u.length;a++){var d=u[a].getOtherEnd(h);if(l.get(h)!=d){if(o.has(d)){e=!1;break}s.push(d),l.set(d,h)}}}if(e){var p=[].concat(n(o));for(t.push(p),a=0;a<p.length;a++){var f=p[a],g=c.indexOf(f);g>-1&&c.splice(g,1)}o=new Set,l=new Map}else t=[]}return t},d.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],r=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),i=0;i<t.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),n.add(a);var o=this.newEdge(null);this.graphManager.add(o,r,a),e.add(a),r=a}return o=this.newEdge(null),this.graphManager.add(o,r,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):n.remove(t),e},d.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(n(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var r=t[e];if(r.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(r),a=0;a<i.length;a++){var o=i[a],s=new c(o.getCenterX(),o.getCenterY()),l=r.bendpoints.get(a);l.x=s.x,l.y=s.y,o.getOwner().remove(o)}this.graphManager.add(r,r.source,r.target)}}},d.transform=function(t,e,r,n){if(null!=r&&null!=n){var i=e;return t<=50?i-=(e-e/r)/50*(50-t):i+=(e*n-e)/50*(t-50),i}var a,o;return t<=50?(a=9*e/500,o=e/10):(a=9*e/50,o=-8*e),a*t+o},d.findCenterOfTree=function(t){var e=[];e=e.concat(t);var r=[],n=new Map,i=!1,a=null;1!=e.length&&2!=e.length||(i=!0,a=e[0]);for(var o=0;o<e.length;o++){var s=(h=e[o]).getNeighborsList().size;n.set(h,h.getNeighborsList().size),1==s&&r.push(h)}var l=[];for(l=l.concat(r);!i;){var c=[];for(c=c.concat(l),l=[],o=0;o<e.length;o++){var h=e[o],u=e.indexOf(h);u>=0&&e.splice(u,1),h.getNeighborsList().forEach(function(t){if(r.indexOf(t)<0){var e=n.get(t)-1;1==e&&l.push(t),n.set(t,e)}})}r=r.concat(l),1!=e.length&&2!=e.length||(i=!0,a=e[0])}return a},d.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=d},function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(4);function i(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(t){this.lworldExtX=t},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(t){this.lworldExtY=t},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},i.prototype.transformX=function(t){var e=0,r=this.lworldExtX;return 0!=r&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/r),e},i.prototype.transformY=function(t){var e=0,r=this.lworldExtY;return 0!=r&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/r),e},i.prototype.inverseTransformX=function(t){var e=0,r=this.ldeviceExtX;return 0!=r&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/r),e},i.prototype.inverseTransformY=function(t){var e=0,r=this.ldeviceExtY;return 0!=r&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/r),e},i.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=i},function(t,e,r){"use strict";var n=r(15),i=r(7),a=r(0),o=r(8),s=r(9);function l(){n.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var c in l.prototype=Object.create(n.prototype),n)l[c]=n[c];l.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var t,e,r,n,o,s,l=this.getGraphManager().getAllEdges(),c=0;c<l.length;c++)(t=l[c]).idealLength=this.idealEdgeLength,t.isInterGraph&&(r=t.getSource(),n=t.getTarget(),o=t.getSourceInLca().getEstimatedSize(),s=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=o+s-2*a.SIMPLE_NODE_SIZE),e=t.getLca().getInclusionTreeDepth(),t.idealLength+=i.DEFAULT_EDGE_LENGTH*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(r.getInclusionTreeDepth()+n.getInclusionTreeDepth()-2*e))},l.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),r=0;r<e.length;r++)t=e[r],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var t,e,r,n,a,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),a=new Set,t=0;t<l.length;t++)r=l[t],this.calculateRepulsionForceOfANode(r,a,o,s),a.add(r);else for(t=0;t<l.length;t++)for(r=l[t],e=t+1;e<l.length;e++)n=l[e],r.getOwner()==n.getOwner()&&this.calcRepulsionForce(r,n)},l.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),r=0;r<e.length;r++)t=e[r],this.calcGravitationalForce(t)},l.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},l.prototype.calcSpringForce=function(t,e){var r,n,i,a,o=t.getSource(),s=t.getTarget();if(this.uniformLeafNodeSizes&&null==o.getChild()&&null==s.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(r=t.getLength())&&(i=(n=this.springConstant*(r-e))*(t.lengthX/r),a=n*(t.lengthY/r),o.springForceX+=i,o.springForceY+=a,s.springForceX-=i,s.springForceY-=a)},l.prototype.calcRepulsionForce=function(t,e){var r,n,a,l,c,h,u,d=t.getRect(),p=e.getRect(),f=new Array(2),g=new Array(4);if(d.intersects(p)){o.calcSeparationAmount(d,p,f,i.DEFAULT_EDGE_LENGTH/2),h=2*f[0],u=2*f[1];var m=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=m*h,t.repulsionForceY-=m*u,e.repulsionForceX+=m*h,e.repulsionForceY+=m*u}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(r=p.getCenterX()-d.getCenterX(),n=p.getCenterY()-d.getCenterY()):(o.getIntersection(d,p,g),r=g[2]-g[0],n=g[3]-g[1]),Math.abs(r)<i.MIN_REPULSION_DIST&&(r=s.sign(r)*i.MIN_REPULSION_DIST),Math.abs(n)<i.MIN_REPULSION_DIST&&(n=s.sign(n)*i.MIN_REPULSION_DIST),a=r*r+n*n,l=Math.sqrt(a),h=(c=this.repulsionConstant*t.noOfChildren*e.noOfChildren/a)*r/l,u=c*n/l,t.repulsionForceX-=h,t.repulsionForceY-=u,e.repulsionForceX+=h,e.repulsionForceY+=u},l.prototype.calcGravitationalForce=function(t){var e,r,n,i,a,o,s,l;r=((e=t.getOwner()).getRight()+e.getLeft())/2,n=(e.getTop()+e.getBottom())/2,i=t.getCenterX()-r,a=t.getCenterY()-n,o=Math.abs(i)+t.getWidth()/2,s=Math.abs(a)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(o>(l=e.getEstimatedSize()*this.gravityRangeFactor)||s>l)&&(t.gravitationForceX=-this.gravityConstant*i,t.gravitationForceY=-this.gravityConstant*a):(o>(l=e.getEstimatedSize()*this.compoundGravityRangeFactor)||s>l)&&(t.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),r=0;r<e.length;r++)(t=e[r]).noOfChildren=t.getNoOfChildren()},l.prototype.calcGrid=function(t){var e,r;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),r=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var n=new Array(e),i=0;i<e;i++)n[i]=new Array(r);for(i=0;i<e;i++)for(var a=0;a<r;a++)n[i][a]=new Array;return n},l.prototype.addNodeToGrid=function(t,e,r){var n,i,a,o;n=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),i=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().y-r)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().height+t.getRect().y-r)/this.repulsionRange));for(var s=n;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(t),t.setGridCoordinates(n,i,a,o)},l.prototype.updateGrid=function(){var t,e,r=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<r.length;t++)e=r[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(t,e,r,n){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&r||n){var a,o=new Set;t.surrounding=new Array;for(var s=this.grid,l=t.startX-1;l<t.finishX+2;l++)for(var c=t.startY-1;c<t.finishY+2;c++)if(!(l<0||c<0||l>=s.length||c>=s[0].length))for(var h=0;h<s[l][c].length;h++)if(a=s[l][c][h],t.getOwner()==a.getOwner()&&t!=a&&!e.has(a)&&!o.has(a)){var u=Math.abs(t.getCenterX()-a.getCenterX())-(t.getWidth()/2+a.getWidth()/2),d=Math.abs(t.getCenterY()-a.getCenterY())-(t.getHeight()/2+a.getHeight()/2);u<=this.repulsionRange&&d<=this.repulsionRange&&o.add(a)}t.surrounding=[].concat(function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(o))}for(l=0;l<t.surrounding.length;l++)this.calcRepulsionForce(t,t.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},t.exports=l},function(t,e,r){"use strict";var n=r(1),i=r(7);function a(t,e,r){n.call(this,t,e,r),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(n.prototype),n)a[o]=n[o];t.exports=a},function(t,e,r){"use strict";var n=r(3);function i(t,e,r,i){n.call(this,t,e,r,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(n.prototype),n)i[a]=n[a];i.prototype.setGridCoordinates=function(t,e,r,n){this.startX=t,this.finishX=e,this.startY=r,this.finishY=n},t.exports=i},function(t,e,r){"use strict";function n(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},t.exports=n},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(t,e){var r=n.createID(t);this.contains(r)||(this.map[r]=e,this.keys.push(t))},i.prototype.contains=function(t){return n.createID(t),null!=this.map[t]},i.prototype.get=function(t){var e=n.createID(t);return this.map[e]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){"use strict";var n=r(14);function i(){this.set={}}i.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},i.prototype.remove=function(t){delete this.set[n.createID(t)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(t){return this.set[n.createID(t)]==t},i.prototype.isEmpty=function(){return 0===this.size()},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)t.push(this.set[e[n]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(t){for(var e=t.length,r=0;r<e;r++){var n=t[r];this.add(n)}},t.exports=i},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(11),a=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===r&&void 0===r||(this.compareFunction=this._defaultCompareFunction);var n=void 0;n=e instanceof i?e.size():e.length,this._quicksort(e,0,n-1)}return n(t,[{key:"_quicksort",value:function(t,e,r){if(e<r){var n=this._partition(t,e,r);this._quicksort(t,e,n),this._quicksort(t,n+1,r)}}},{key:"_partition",value:function(t,e,r){for(var n=this._get(t,e),i=e,a=r;;){for(;this.compareFunction(n,this._get(t,a));)a--;for(;this.compareFunction(this._get(t,i),n);)i++;if(!(i<a))return a;this._swap(t,i,a),i++,a--}}},{key:"_get",value:function(t,e){return t instanceof i?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,r){t instanceof i?t.set_object_at(e,r):t[e]=r}},{key:"_swap",value:function(t,e,r){var n=this._get(t,e);this._set(t,e,this._get(t,r)),this._set(t,r,n)}},{key:"_defaultCompareFunction",value:function(t,e){return e>t}}]),t}();t.exports=a},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=r,this.match_score=n,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][s]=0}this.tracebackGrid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=new Array(this.jMax);for(var c=0;c<this.jMax;c++)this.tracebackGrid[l][c]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var r=1;r<this.iMax;r++)for(var n=1;n<this.jMax;n++){var i=[this.sequence1[r-1]===this.sequence2[n-1]?this.grid[r-1][n-1]+this.match_score:this.grid[r-1][n-1]+this.mismatch_penalty,this.grid[r-1][n]+this.gap_penalty,this.grid[r][n-1]+this.gap_penalty],a=this.arrayAllMaxIndexes(i);this.grid[r][n]=i[a[0]],this.tracebackGrid[r][n]=[a.includes(0),a.includes(1),a.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],r=this.tracebackGrid[e.pos[0]][e.pos[1]];r[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),r[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),r[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var r=[],n=-1;-1!==(n=t.indexOf(e,n+1));)r.push(n);return r}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t}();t.exports=i},function(t,e,r){"use strict";var n=function(){};n.FDLayout=r(18),n.FDLayoutConstants=r(7),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(4),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(24),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(5),n.LEdge=r(1),n.LGraphManager=r(6),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(25),t.exports=n},function(t,e,r){"use strict";function n(){this.listeners=[]}var i=n.prototype;i.addListener=function(t,e){this.listeners.push({event:t,callback:e})},i.removeListener=function(t,e){for(var r=this.listeners.length;r>=0;r--){var n=this.listeners[r];n.event===t&&n.callback===e&&this.listeners.splice(r,1)}},i.emit=function(t,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];t===n.event&&n.callback(e)}},t.exports=n}])},t.exports=e()},2274(t,e,r){"use strict";function n(t,e,r){if(t&&t.length){const[n,i]=e,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-n)*o-(r-i)*s+n,e[1]=(t-n)*s+(r-i)*o+i}}}function i(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,r,a=1){const o=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,c=[0,0];if(o)for(const i of l)n(i,c,o);const h=function(t,e,r){const n=[];for(const h of t){const t=[...h];i(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&n.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const i of n)for(let t=0;t<i.length-1;t++){const e=i[t],r=i[t+1];if(e[1]!==r[1]){const t=Math.min(e[1],r[1]);o.push({ymin:t,ymax:Math.max(e[1],r[1]),x:t===e[1]?e[0]:r[0],islope:(r[0]-e[0])/(r[1]-e[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return a;let s=[],l=o[0].ymin,c=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>l);e++)t=e;o.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||c%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,n=s[e].edge;a.push([[Math.round(r.x),l],[Math.round(n.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),c++}return a}(l,s,a);if(o){for(const t of l)n(t,c,-o);!function(t,e,r){const i=[];t.forEach(t=>i.push(...t)),n(i,e,r)}(h,c,-o)}return h}function o(t,e){var r;const n=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=i),a(t,i,n,o||1)}r.d(e,{A:()=>it});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const n of t)r.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class c extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const n=o(t,Object.assign({},e,{hachureGap:r})),i=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(i),c=.5*r*Math.sin(i);for(const[o,h]of n)l([o,h])&&a.push([[o[0]-s,o[1]+c],[...h]],[[o[0]+s,o[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class h extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),i=this._fillPolygons(t,n);return r.ops=r.ops.concat(i.ops),r}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let i=e.fillWeight;i<0&&(i=e.strokeWidth/2);const a=n/4;for(const o of t){const t=l(o),s=t/n,c=Math.ceil(s)-1,h=t-c*n,u=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let o=0;o<c;o++){const t=d+h+o*n,s=u-a+2*Math.random()*a,l=t-a+2*Math.random()*a,c=this.helper.ellipse(s,l,i,i,e);r.push(...c.ops)}}return{type:"fillSketch",ops:r}}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,n=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,i=[];return t.forEach(t=>{const a=l(t),o=Math.floor(a/(r+n)),s=(a+n-o*(r+n))/2;let c=t[0],h=t[1];c[0]>h[0]&&(c=t[1],h=t[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let l=0;l<o;l++){const t=l*(r+n),a=t+r,o=[c[0]+t*Math.cos(u)+s*Math.cos(u),c[1]+t*Math.sin(u)+s*Math.sin(u)],h=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(o[0],o[1],h[0],h[1],e))}}),i}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,n=e.zigzagOffset<0?r:e.zigzagOffset,i=o(t,e=Object.assign({},e,{hachureGap:r+n}));return{type:"fillSketch",ops:this.zigzagLines(i,n,e)}}zigzagLines(t,e,r){const n=[];return t.forEach(t=>{const i=l(t),a=Math.round(i/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let l=0;l<a;l++){const t=2*l*e,i=2*(l+1)*e,a=Math.sqrt(2*Math.pow(e,2)),s=[o[0]+t*Math.cos(c),o[1]+t*Math.sin(c)],h=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[s[0]+a*Math.cos(c+Math.PI/4),s[1]+a*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(s[0],s[1],u[0],u[1],r),...this.helper.doubleLineOps(u[0],u[1],h[0],h[1],r))}}),n}}const f={};class g{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const m={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function y(t,e){return t.type===e}function v(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let n="BOD",i=0,a=r[i];for(;!y(a,2);){let o=0;const s=[];if("BOD"===n){if("M"!==a.text&&"m"!==a.text)return v("M0,0"+t);i++,o=m[a.text],n=a.text}else y(a,1)?o=m[n]:(i++,o=m[a.text],n=a.text);if(!(i+o<r.length))throw new Error("Path data ended short");for(let t=i;t<i+o;t++){const e=r[t];if(!y(e,1))throw new Error("Param not a number: "+n+","+e.text);s[s.length]=+e.text}if("number"!=typeof m[n])throw new Error("Bad segment: "+n);{const t={key:n,data:s};e.push(t),i+=o,a=r[i],"M"===n&&(n="L"),"m"===n&&(n="l")}}return e}function b(t){let e=0,r=0,n=0,i=0;const a=[];for(const{key:o,data:s}of t)switch(o){case"M":a.push({key:"M",data:[...s]}),[e,r]=s,[n,i]=s;break;case"m":e+=s[0],r+=s[1],a.push({key:"M",data:[e,r]}),n=e,i=r;break;case"L":a.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map((t,n)=>n%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,n)=>n%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,n)=>n%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function x(t){const e=[];let r="",n=0,i=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,o]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],s=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=n+(n-s),a=i+(i-l)):(t=n,a=i),e.push({key:"C",data:[t,a,...h]}),s=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{const[t,a]=h;let o=0,c=0;"Q"===r||"T"===r?(o=n+(n-s),c=i+(i-l)):(o=n,c=i);const u=n+2*(o-n)/3,d=i+2*(c-i)/3,p=t+2*(o-t)/3,f=a+2*(c-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),s=o,l=c,n=t,i=a;break}case"Q":{const[t,r,a,o]=h,c=n+2*(t-n)/3,u=i+2*(r-i)/3,d=a+2*(t-a)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[c,u,d,p,a,o]}),s=t,l=r,n=a,i=o;break}case"A":{const t=Math.abs(h[0]),r=Math.abs(h[1]),a=h[2],o=h[3],s=h[4],l=h[5],c=h[6];0===t||0===r?(e.push({key:"C",data:[n,i,l,c,l,c]}),n=l,i=c):n===l&&i===c||(w(n,i,l,c,t,r,a,o,s).forEach(function(t){e.push({key:"C",data:t})}),n=l,i=c);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=o}r=c}return e}function T(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function w(t,e,r,n,i,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,m=0;if(c)[p,f,g,m]=c;else{[t,e]=T(t,e,-h),[r,n]=T(r,n,-h);const o=(t-r)/2,c=(e-n)/2;let u=o*o/(i*i)+c*c/(a*a);u>1&&(u=Math.sqrt(u),i*=u,a*=u);const d=i*i,y=a*a,v=d*y-d*c*c-y*o*o,b=d*c*c+y*o*o,x=(s===l?-1:1)*Math.sqrt(Math.abs(v/b));g=x*i*c/a+(t+r)/2,m=x*-a*o/i+(e+n)/2,p=Math.asin(parseFloat(((e-m)/a).toFixed(9))),f=Math.asin(parseFloat(((n-m)/a).toFixed(9))),t<g&&(p=Math.PI-p),r<g&&(f=Math.PI-f),p<0&&(p=2*Math.PI+p),f<0&&(f=2*Math.PI+f),l&&p>f&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let y=f-p;if(Math.abs(y)>120*Math.PI/180){const t=f,e=r,s=n;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=w(r=g+i*Math.cos(f),n=m+a*Math.sin(f),e,s,i,a,o,0,l,[f,t,g,m])}y=f-p;const v=Math.cos(p),b=Math.sin(p),x=Math.cos(f),k=Math.sin(f),C=Math.tan(y/4),E=4/3*i*C,S=4/3*a*C,_=[t,e],A=[t+E*b,e-S*v],R=[r+E*k,n-S*x],L=[r,n];if(A[0]=2*_[0]-A[0],A[1]=2*_[1]-A[1],c)return[A,R,L].concat(d);{d=[A,R,L].concat(d);const t=[];for(let e=0;e<d.length;e+=3){const r=T(d[e][0],d[e][1],h),n=T(d[e+1][0],d[e+1][1],h),i=T(d[e+2][0],d[e+2][1],h);t.push([r[0],r[1],n[0],n[1],i[0],i[1]])}return t}}const k={randOffset:function(t,e){return $(t,e)},randOffsetWithRange:function(t,e,r){return O(t,e,r)},ellipse:function(t,e,r,n,i){return A(t,e,i,_(r,n,i)).opset},doubleLineOps:function(t,e,r,n,i){return P(t,e,r,n,i,!0)}};function C(t,e,r,n,i){return{type:"path",ops:P(t,e,r,n,i)}}function E(t,e,r){const n=(t||[]).length;if(n>2){const i=[];for(let e=0;e<n-1;e++)i.push(...P(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&i.push(...P(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return 2===n?C(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function S(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,n=F(r[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:F(r[0],1.5*(1+.22*e.roughness),N(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=F(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:F(a,1.5*(1+.22*e.roughness),N(e));for(const e of t)"move"!==e.op&&n.push(e);for(const e of r)"move"!==e.op&&i.push(e)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function _(t,e,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/i;let o=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return o+=$(o*l,r),s+=$(s*l,r),{increment:a,rx:o,ry:s}}function A(t,e,r,n){const[i,a]=K(n.increment,t,e,n.rx,n.ry,1,n.increment*O(.1,O(.4,1,r),r),r);let o=z(i,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[i]=K(n.increment,t,e,n.rx,n.ry,1.5,0,r),a=z(i,null,r);o=o.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function R(t,e,r,n,i,a,o,s,l){const c=t,h=e;let u=Math.abs(r/2),d=Math.abs(n/2);u+=$(.01*u,l),d+=$(.01*d,l);let p=i,f=a;for(;p<0;)p+=2*Math.PI,f+=2*Math.PI;f-p>2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(f-p)/2),y=j(m,c,h,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=j(m,c,h,u,d,p,f,1.5,l);y.push(...t)}return o&&(s?y.push(...P(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...P(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function L(t,e){const r=x(b(v(t))),n=[];let i=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],i=[s[0],s[1]];break;case"L":n.push(...P(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,i,o,l,c]=s;n.push(...q(t,r,i,o,l,c,a,e)),a=[l,c];break}case"Z":n.push(...P(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function I(t,e){const r=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+$(t,e),n[0][1]+$(t,e)]});for(let a=1;a<i;a++)r.push({op:"lineTo",data:[n[a][0]+$(t,e),n[a][1]+$(t,e)]})}}return{type:"fillPath",ops:r}}function D(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!f[r])switch(r){case"zigzag":f[r]||(f[r]=new c(e));break;case"cross-hatch":f[r]||(f[r]=new h(e));break;case"dots":f[r]||(f[r]=new u(e));break;case"dashed":f[r]||(f[r]=new d(e));break;case"zigzag-line":f[r]||(f[r]=new p(e));break;default:r="hachure",f[r]||(f[r]=new s(e))}return f[r]}(e,k).fillPolygons(t,e)}function N(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function M(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function O(t,e,r,n=1){return r.roughness*n*(M(r)*(e-t)+t)}function $(t,e,r=1){return O(-t,t,e,r)}function P(t,e,r,n,i,a=!1){const o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=B(t,e,r,n,i,!0,!1);if(o)return s;const l=B(t,e,r,n,i,!0,!0);return s.concat(l)}function B(t,e,r,n,i,a,o){const s=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(s);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*M(i);let p=i.bowing*i.maxRandomnessOffset*(n-e)/200,f=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=$(p,i,c),f=$(f,i,c);const g=[],m=()=>$(u,i,c),y=()=>$(h,i,c),v=i.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):g.push({op:"move",data:[t+(v?0:$(h,i,c)),e+(v?0:$(h,i,c))]})),o?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(n-e)*d+m(),r+(v?0:m()),n+(v?0:m())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}),g}function F(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+$(e,r),t[0][1]+$(e,r)]),n.push([t[0][0]+$(e,r),t[0][1]+$(e,r)]);for(let i=1;i<t.length;i++)n.push([t[i][0]+$(e,r),t[i][1]+$(e,r)]),i===t.length-1&&n.push([t[i][0]+$(e,r),t[i][1]+$(e,r)]);return z(n,null,r)}function z(t,e,r){const n=t.length,i=[];if(n>3){const a=[],o=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;e++){const r=t[e];a[0]=[r[0],r[1]],a[1]=[r[0]+(o*t[e+1][0]-o*t[e-1][0])/6,r[1]+(o*t[e+1][1]-o*t[e-1][1])/6],a[2]=[t[e+1][0]+(o*t[e][0]-o*t[e+2][0])/6,t[e+1][1]+(o*t[e][1]-o*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+$(t,r),e[1]+$(t,r)]})}}else 3===n?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&i.push(...B(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function K(t,e,r,n,i,a,o,s){const l=[],c=[];if(0===s.roughness){t/=4,c.push([e+n*Math.cos(-t),r+i*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+n*Math.cos(a),r+i*Math.sin(a)];l.push(t),c.push(t)}c.push([e+n*Math.cos(0),r+i*Math.sin(0)]),c.push([e+n*Math.cos(t),r+i*Math.sin(t)])}else{const h=$(.5,s)-Math.PI/2;c.push([$(a,s)+e+.9*n*Math.cos(h-t),$(a,s)+r+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let o=h;o<u;o+=t){const t=[$(a,s)+e+n*Math.cos(o),$(a,s)+r+i*Math.sin(o)];l.push(t),c.push(t)}c.push([$(a,s)+e+n*Math.cos(h+2*Math.PI+.5*o),$(a,s)+r+i*Math.sin(h+2*Math.PI+.5*o)]),c.push([$(a,s)+e+.98*n*Math.cos(h+o),$(a,s)+r+.98*i*Math.sin(h+o)]),c.push([$(a,s)+e+.9*n*Math.cos(h+.5*o),$(a,s)+r+.9*i*Math.sin(h+.5*o)])}return[c,l]}function j(t,e,r,n,i,a,o,s,l){const c=a+$(.1,l),h=[];h.push([$(s,l)+e+.9*n*Math.cos(c-t),$(s,l)+r+.9*i*Math.sin(c-t)]);for(let u=c;u<=o;u+=t)h.push([$(s,l)+e+n*Math.cos(u),$(s,l)+r+i*Math.sin(u)]);return h.push([e+n*Math.cos(o),r+i*Math.sin(o)]),h.push([e+n*Math.cos(o),r+i*Math.sin(o)]),z(h,null,l)}function q(t,e,r,n,i,a,o,s){const l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let h=[0,0];const u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let p=0;p<u;p++)0===p?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:$(c[0],s)),o[1]+(d?0:$(c[0],s))]}),h=d?[i,a]:[i+$(c[p],s),a+$(c[p],s)],l.push({op:"bcurveTo",data:[t+$(c[p],s),e+$(c[p],s),r+$(c[p],s),n+$(c[p],s),h[0],h[1]]});return l}function W(t){return[...t]}function U(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(3===r)n.push(W(t[0]),W(t[1]),W(t[2]),W(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const i=[],a=1-e;n.push(W(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];i[0]=[e[0],e[1]],i[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],i[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],i[3]=[r[t+1][0],r[t+1][1]],n.push(i[1],i[2],i[3])}}return n}function G(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Y(t,e,r){const n=G(e,r);if(0===n)return G(t,e);let i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return i=Math.max(0,Math.min(1,i)),G(t,V(e,r,i))}function V(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function H(t,e,r,n){const i=n||[];if(function(t,e){const r=t[e+0],n=t[e+1],i=t[e+2],a=t[e+3];let o=3*n[0]-2*r[0]-a[0];o*=o;let s=3*n[1]-2*r[1]-a[1];s*=s;let l=3*i[0]-2*a[0]-r[0];l*=l;let c=3*i[1]-2*a[1]-r[1];return c*=c,o<l&&(o=l),s<c&&(s=c),o+s}(t,e)<r){const r=t[e+0];i.length?(a=i[i.length-1],o=r,Math.sqrt(G(a,o))>1&&i.push(r)):i.push(r),i.push(t[e+3])}else{const n=.5,a=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],c=V(a,o,n),h=V(o,s,n),u=V(s,l,n),d=V(c,h,n),p=V(h,u,n),f=V(d,p,n);H([a,c,d,f],0,r,i),H([f,p,u,l],0,r,i)}var a,o;return i}function X(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,n,i){const a=i||[],o=t[e],s=t[r-1];let l=0,c=1;for(let h=e+1;h<r-1;++h){const e=Y(t[h],o,s);e>l&&(l=e,c=h)}return Math.sqrt(l)>n?(Z(t,e,c+1,n,a),Z(t,c,r,n,a)):(a.length||a.push(o),a.push(s)),a}function Q(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let a=0;a<i;a++)H(t,3*a,e,n);return r&&r>0?Z(n,0,n.length,r):n}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,n,i){const a=this._o(i);return this._d("line",[C(t,e,r,n,a)],a)}rectangle(t,e,r,n,i){const a=this._o(i),o=[],s=function(t,e,r,n,i){return function(t,e){return E(t,!0,e)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}(t,e,r,n,a);if(a.fill){const i=[[t,e],[t+r,e],[t+r,e+n],[t,e+n]];"solid"===a.fillStyle?o.push(I([i],a)):o.push(D([i],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,r,n,i){const a=this._o(i),o=[],s=_(r,n,a),l=A(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const r=A(t,e,a,s).opset;r.type="fillPath",o.push(r)}else o.push(D([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,r,n){const i=this.ellipse(t,e,r,r,n);return i.shape="circle",i}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[E(t,!1,r)],r)}arc(t,e,r,n,i,a,o=!1,s){const l=this._o(s),c=[],h=R(t,e,r,n,i,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=R(t,e,r,n,i,a,!0,!1,o);s.type="fillPath",c.push(s)}else c.push(function(t,e,r,n,i,a,o){const s=t,l=e;let c=Math.abs(r/2),h=Math.abs(n/2);c+=$(.01*c,o),h+=$(.01*h,o);let u=i,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/o.curveStepCount,f=[];for(let g=u;g<=d;g+=p)f.push([s+c*Math.cos(g),l+h*Math.sin(g)]);return f.push([s+c*Math.cos(d),l+h*Math.sin(d)]),f.push([s,l]),D([f],o)}(t,e,r,n,i,a,l));return l.stroke!==J&&c.push(h),this._d("arc",c,l)}curve(t,e){const r=this._o(e),n=[],i=S(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=S(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],i=t;if(i.length){const t="number"==typeof i[0][0]?[i]:i;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Q(U([n[0],n[0],n[1],n[2]]),10,(1+r.roughness)/2)):e.push(...Q(U(n),10,(1+r.roughness)/2))}e.length&&n.push(D([e],r))}return r.stroke!==J&&n.push(i),this._d("curve",n,r)}polygon(t,e){const r=this._o(e),n=[],i=E(t,!0,r);return r.fill&&("solid"===r.fillStyle?n.push(I([t],r)):n.push(D([t],r))),r.stroke!==J&&n.push(i),this._d("polygon",n,r)}path(t,e){const r=this._o(e),n=[];if(!t)return this._d("path",n,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const n=x(b(v(t))),i=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...Q(s,1)),s=[]},c=()=>{l(),a.length&&(i.push(a),a=[])};for(const{key:u,data:d}of n)switch(u){case"M":c(),o=[d[0],d[1]],a.push(o);break;case"L":l(),a.push([d[0],d[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([d[0],d[1]]),s.push([d[2],d[3]]),s.push([d[4],d[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(c(),!r)return i;const h=[];for(const u of i){const t=X(u,r);t.length&&h.push(t)}return h}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=L(t,r);if(i)if("solid"===r.fillStyle)if(1===s.length){const e=L(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(I(s,r));else n.push(D(s,r));return a&&(o?s.forEach(t=>{n.push(E(t,!1,r))}):n.push(l)),this._d("path",n,r)}opsToPath(t,e){let r="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map(t=>+t.toFixed(e)):n.data;switch(n.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,n=[];for(const i of e){let t=null;switch(i.type){case"path":t={d:this.opsToPath(i),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(i),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":t=this.fillSketch(i,r)}t&&n.push(t)}return n}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===r.stroke?"transparent":r.stroke,n.lineWidth=r.strokeWidth,r.strokeLineDash&&n.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(n.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(n,a,i),n.restore();break;case"fillPath":{n.save(),n.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,i,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,r)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a),a}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a),a}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a),a}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i),i}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,n,i,a,o=!1,s){const l=this.gen.arc(t,e,r,n,i,a,o,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class nt{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,i=n.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=n.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,o,r)}e&&i.appendChild(e)}return i}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);const i=t.createElementNS(rt,"path");return i.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",n+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){const a=this.gen.line(t,e,r,n,i);return this.draw(a)}rectangle(t,e,r,n,i){const a=this.gen.rectangle(t,e,r,n,i);return this.draw(a)}ellipse(t,e,r,n,i){const a=this.gen.ellipse(t,e,r,n,i);return this.draw(a)}circle(t,e,r,n){const i=this.gen.circle(t,e,r,n);return this.draw(i)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,n,i,a,o=!1,s){const l=this.gen.arc(t,e,r,n,i,a,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var it={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new nt(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},513(t,e,r){"use strict";function n(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from("string"==typeof t?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(i.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,i)+"}","g");n=n.map(function(t){return t.replace(a,"\n")})}n[0]=n[0].replace(/^\r?\n/,"");var o=n[0];return e.forEach(function(t,e){var r=o.match(/(?:^|\n)( *)$/),i=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+i+t}).join("\n")),o+=a+n[e+1]}),o}r.d(e,{T:()=>n})},6402(t,e,r){"use strict";r.d(e,{createArchitectureServices:()=>n.S});var n=r(5016);r(9302)},5016(t,e,r){"use strict";r.d(e,{S:()=>s});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},a=class extends n.dg{static{(0,n.K2)(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){if("ARCH_ICON"===t.name)return e.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===t.name)return e.replace(/["()]/g,"");if("ARCH_TITLE"===t.name){let t=e.replace(/^\[|]$/g,"").trim();return(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1),t=t.replace(/\\"/g,'"').replace(/\\'/g,"'")),t.trim()}}},o={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new a,"ValueConverter")}};function s(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.wV,o);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}(0,n.K2)(s,"createArchitectureServices")},9511(t,e,r){"use strict";r.d(e,{v:()=>o});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function o(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.FZ,a);return e.ServiceRegistry.register(r),{shared:e,Info:r}}(0,n.K2)(o,"createInfoServices")},1681(t,e,r){"use strict";r.d(e,{d:()=>h});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},a=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,o=class extends n.dg{static{(0,n.K2)(this,"TreemapValueConverter")}runCustomConverter(t,e,r){if("NUMBER2"===t.name)return parseFloat(e.replace(/,/g,""));if("SEPARATOR"===t.name)return e.substring(1,e.length-1);if("STRING2"===t.name)return e.substring(1,e.length-1);if("INDENTATION"===t.name)return e.length;if("ClassDef"===t.name){if("string"!=typeof e)return e;const t=a.exec(e);if(t)return{$type:"ClassDefStatement",className:t[1],styleText:t[2]||void 0}}}};function s(t){const e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){const t={Treemap:e.checkSingleRoot.bind(e)};r.register(t,e)}}(0,n.K2)(s,"registerValidationChecks");var l=class{static{(0,n.K2)(this,"TreemapValidator")}checkSingleRoot(t,e){let r;for(const n of t.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&e("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},c={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new o,"ValueConverter")},validation:{TreemapValidator:(0,n.K2)(()=>new l,"TreemapValidator")}};function h(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.XE,c);return e.ServiceRegistry.register(r),s(r),{shared:e,Treemap:r}}(0,n.K2)(h,"createTreemapServices")},5160(t,e,r){"use strict";r.d(e,{f:()=>o});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function o(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.Bg,a);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}(0,n.K2)(o,"createRadarServices")},4824(t,e,r){"use strict";r.d(e,{$:()=>o});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function o(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.p5,a);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}(0,n.K2)(o,"createPacketServices")},532(t,e,r){"use strict";r.d(e,{f:()=>s});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},a=class extends n.dg{static{(0,n.K2)(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},o={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new a,"ValueConverter")}};function s(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.D_,o);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}(0,n.K2)(s,"createPieServices")},2968(t,e,r){"use strict";r.d(e,{g:()=>p});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},a=new Set(["cmd","command"]),o=new Set(["evt","event"]),s=new Set(["rmo","readmodel"]),l=new Set(["pcr","processor"]),c=new Set(["ui"]);function h(t){const e=t.validation.EventModelingValidator,r=t.validation.ValidationRegistry;if(r){const t={EmTimeFrame:e.checkSourceFrameTypes.bind(e),EmResetFrame:e.checkSourceFrameTypes.bind(e)};r.register(t,e)}}(0,n.K2)(h,"registerValidationChecks");var u=class{static{(0,n.K2)(this,"EventModelingValidator")}checkSourceFrameTypes(t,e){0!==t.sourceFrames.length&&(a.has(t.modelEntityType)?this.validateSources(t,new Set([...c,...l]),"command","ui or processor",e):o.has(t.modelEntityType)?this.validateSources(t,a,"event","command",e):s.has(t.modelEntityType)?this.validateSources(t,o,"read model","event",e):l.has(t.modelEntityType)?this.validateSources(t,s,"processor","read model",e):c.has(t.modelEntityType)&&this.validateSources(t,s,"ui","read model",e))}validateSources(t,e,r,n,i){for(const a of t.sourceFrames){const o=a.ref;void 0===o||e.has(o.modelEntityType)||i("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:t,property:"sourceFrames"})}}},d={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")},validation:{EventModelingValidator:(0,n.K2)(()=>new u,"EventModelingValidator")}};function p(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.x0,d);return e.ServiceRegistry.register(r),h(r),{shared:e,EventModel:r}}(0,n.K2)(p,"createEventModelingServices")},9302(t,e,r){"use strict";r.d(e,{Bg:()=>p$,CZ:()=>g$,DD:()=>vL,D_:()=>d$,F5:()=>MD,FZ:()=>h$,K2:()=>zt,Tm:()=>b$,WQ:()=>iL,XE:()=>f$,Xr:()=>m$,d$:()=>c$,dg:()=>v$,mR:()=>x$,p5:()=>u$,sr:()=>o$,tG:()=>rL,uM:()=>nL,wV:()=>s$,x0:()=>l$});var n,i,a,o,s,l,c,h,u,d,p,f,g,m,y,v,b,x,T,w,k,C,E,S,_,A,R,L,I,D,N,M,O,$,P,B,F,z,K,j,q,W,U,G,Y,V,H,X,Z,Q,J,tt,et,rt,nt,it,at,ot,st,lt,ct,ht,ut,dt,pt,ft,gt,mt,yt,vt,bt,xt,Tt,wt,kt,Ct,Et,St,_t,At,Rt,Lt,It,Dt,Nt,Mt=Object.create,Ot=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,Pt=Object.getOwnPropertyNames,Bt=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty,zt=(t,e)=>Ot(t,"name",{value:e,configurable:!0}),Kt=(t,e)=>function(){return e||(0,t[Pt(t)[0]])((e={exports:{}}).exports,e),e.exports},jt=(t,e)=>{for(var r in e)Ot(t,r,{get:e[r],enumerable:!0})},qt=(t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of Pt(e))Ft.call(t,i)||i===r||Ot(t,i,{get:()=>e[i],enumerable:!(n=$t(e,i))||n.enumerable});return t},Wt=(t,e,r)=>(qt(t,e,"default"),r&&qt(r,e,"default")),Ut=(t,e,r)=>(r=null!=t?Mt(Bt(t)):{},qt(!e&&t&&t.__esModule?r:Ot(r,"default",{value:t,enumerable:!0}),t)),Gt=t=>qt(Ot({},"__esModule",{value:!0}),t),Yt={};jt(Yt,{AnnotatedTextEdit:()=>E,ChangeAnnotation:()=>k,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>lt,CodeActionContext:()=>st,CodeActionKind:()=>at,CodeActionTriggerKind:()=>ot,CodeDescription:()=>b,CodeLens:()=>ct,Color:()=>u,ColorInformation:()=>d,ColorPresentation:()=>p,Command:()=>T,CompletionItem:()=>G,CompletionItemKind:()=>z,CompletionItemLabelDetails:()=>U,CompletionItemTag:()=>j,CompletionList:()=>Y,CreateFile:()=>_,DeleteFile:()=>R,Diagnostic:()=>x,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,DocumentHighlight:()=>J,DocumentHighlightKind:()=>Q,DocumentLink:()=>ut,DocumentSymbol:()=>it,DocumentUri:()=>n,EOL:()=>Lt,FoldingRange:()=>g,FoldingRangeKind:()=>f,FormattingOptions:()=>ht,Hover:()=>H,InlayHint:()=>wt,InlayHintKind:()=>xt,InlayHintLabelPart:()=>Tt,InlineCompletionContext:()=>At,InlineCompletionItem:()=>Ct,InlineCompletionList:()=>Et,InlineCompletionTriggerKind:()=>St,InlineValueContext:()=>bt,InlineValueEvaluatableExpression:()=>vt,InlineValueText:()=>mt,InlineValueVariableLookup:()=>yt,InsertReplaceEdit:()=>q,InsertTextFormat:()=>K,InsertTextMode:()=>W,Location:()=>c,LocationLink:()=>h,MarkedString:()=>V,MarkupContent:()=>F,MarkupKind:()=>B,OptionalVersionedTextDocumentIdentifier:()=>$,ParameterInformation:()=>X,Position:()=>s,Range:()=>l,RenameFile:()=>A,SelectedCompletionInfo:()=>_t,SelectionRange:()=>dt,SemanticTokenModifiers:()=>ft,SemanticTokenTypes:()=>pt,SemanticTokens:()=>gt,SignatureInformation:()=>Z,StringValue:()=>kt,SymbolInformation:()=>rt,SymbolKind:()=>tt,SymbolTag:()=>et,TextDocument:()=>It,TextDocumentEdit:()=>S,TextDocumentIdentifier:()=>M,TextDocumentItem:()=>P,TextEdit:()=>w,URI:()=>i,VersionedTextDocumentIdentifier:()=>O,WorkspaceChange:()=>N,WorkspaceEdit:()=>L,WorkspaceFolder:()=>Rt,WorkspaceSymbol:()=>nt,integer:()=>a,uinteger:()=>o});var Vt,Ht,Xt=(Vt={"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,Mt,Ot,$t,Pt,Bt,Ft,Kt,jt,qt,Wt;!function(t){function e(t){return"string"==typeof t}zt(e,"is"),t.is=e}(n||(n={})),function(t){function e(t){return"string"==typeof t}zt(e,"is"),t.is=e}(i||(i={})),function(t){function e(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,zt(e,"is"),t.is=e}(a||(a={})),function(t){function e(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}t.MIN_VALUE=0,t.MAX_VALUE=2147483647,zt(e,"is"),t.is=e}(o||(o={})),function(t){function e(t,e){return t===Number.MAX_VALUE&&(t=o.MAX_VALUE),e===Number.MAX_VALUE&&(e=o.MAX_VALUE),{line:t,character:e}}function r(t){let e=t;return Nt.objectLiteral(e)&&Nt.uinteger(e.line)&&Nt.uinteger(e.character)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(s||(s={})),function(t){function e(t,e,r,n){if(Nt.uinteger(t)&&Nt.uinteger(e)&&Nt.uinteger(r)&&Nt.uinteger(n))return{start:s.create(t,e),end:s.create(r,n)};if(s.is(t)&&s.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${n}]`)}function r(t){let e=t;return Nt.objectLiteral(e)&&s.is(e.start)&&s.is(e.end)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(l||(l={})),function(t){function e(t,e){return{uri:t,range:e}}function r(t){let e=t;return Nt.objectLiteral(e)&&l.is(e.range)&&(Nt.string(e.uri)||Nt.undefined(e.uri))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(c||(c={})),function(t){function e(t,e,r,n){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:n}}function r(t){let e=t;return Nt.objectLiteral(e)&&l.is(e.targetRange)&&Nt.string(e.targetUri)&&l.is(e.targetSelectionRange)&&(l.is(e.originSelectionRange)||Nt.undefined(e.originSelectionRange))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(h||(h={})),function(t){function e(t,e,r,n){return{red:t,green:e,blue:r,alpha:n}}function r(t){const e=t;return Nt.objectLiteral(e)&&Nt.numberRange(e.red,0,1)&&Nt.numberRange(e.green,0,1)&&Nt.numberRange(e.blue,0,1)&&Nt.numberRange(e.alpha,0,1)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(u||(u={})),function(t){function e(t,e){return{range:t,color:e}}function r(t){const e=t;return Nt.objectLiteral(e)&&l.is(e.range)&&u.is(e.color)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(d||(d={})),function(t){function e(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function r(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.label)&&(Nt.undefined(e.textEdit)||w.is(e))&&(Nt.undefined(e.additionalTextEdits)||Nt.typedArray(e.additionalTextEdits,w.is))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(p||(p={})),(t=f||(f={})).Comment="comment",t.Imports="imports",t.Region="region",function(t){function e(t,e,r,n,i,a){const o={startLine:t,endLine:e};return Nt.defined(r)&&(o.startCharacter=r),Nt.defined(n)&&(o.endCharacter=n),Nt.defined(i)&&(o.kind=i),Nt.defined(a)&&(o.collapsedText=a),o}function r(t){const e=t;return Nt.objectLiteral(e)&&Nt.uinteger(e.startLine)&&Nt.uinteger(e.startLine)&&(Nt.undefined(e.startCharacter)||Nt.uinteger(e.startCharacter))&&(Nt.undefined(e.endCharacter)||Nt.uinteger(e.endCharacter))&&(Nt.undefined(e.kind)||Nt.string(e.kind))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(g||(g={})),function(t){function e(t,e){return{location:t,message:e}}function r(t){let e=t;return Nt.defined(e)&&c.is(e.location)&&Nt.string(e.message)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(m||(m={})),(e=y||(y={})).Error=1,e.Warning=2,e.Information=3,e.Hint=4,(r=v||(v={})).Unnecessary=1,r.Deprecated=2,function(t){function e(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.href)}zt(e,"is"),t.is=e}(b||(b={})),function(t){function e(t,e,r,n,i,a){let o={range:t,message:e};return Nt.defined(r)&&(o.severity=r),Nt.defined(n)&&(o.code=n),Nt.defined(i)&&(o.source=i),Nt.defined(a)&&(o.relatedInformation=a),o}function r(t){var e;let r=t;return Nt.defined(r)&&l.is(r.range)&&Nt.string(r.message)&&(Nt.number(r.severity)||Nt.undefined(r.severity))&&(Nt.integer(r.code)||Nt.string(r.code)||Nt.undefined(r.code))&&(Nt.undefined(r.codeDescription)||Nt.string(null===(e=r.codeDescription)||void 0===e?void 0:e.href))&&(Nt.string(r.source)||Nt.undefined(r.source))&&(Nt.undefined(r.relatedInformation)||Nt.typedArray(r.relatedInformation,m.is))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(x||(x={})),function(t){function e(t,e,...r){let n={title:t,command:e};return Nt.defined(r)&&r.length>0&&(n.arguments=r),n}function r(t){let e=t;return Nt.defined(e)&&Nt.string(e.title)&&Nt.string(e.command)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(T||(T={})),function(t){function e(t,e){return{range:t,newText:e}}function r(t,e){return{range:{start:t,end:t},newText:e}}function n(t){return{range:t,newText:""}}function i(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.newText)&&l.is(e.range)}zt(e,"replace"),t.replace=e,zt(r,"insert"),t.insert=r,zt(n,"del"),t.del=n,zt(i,"is"),t.is=i}(w||(w={})),function(t){function e(t,e,r){const n={label:t};return void 0!==e&&(n.needsConfirmation=e),void 0!==r&&(n.description=r),n}function r(t){const e=t;return Nt.objectLiteral(e)&&Nt.string(e.label)&&(Nt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(Nt.string(e.description)||void 0===e.description)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(k||(k={})),function(t){function e(t){const e=t;return Nt.string(e)}zt(e,"is"),t.is=e}(C||(C={})),function(t){function e(t,e,r){return{range:t,newText:e,annotationId:r}}function r(t,e,r){return{range:{start:t,end:t},newText:e,annotationId:r}}function n(t,e){return{range:t,newText:"",annotationId:e}}function i(t){const e=t;return w.is(e)&&(k.is(e.annotationId)||C.is(e.annotationId))}zt(e,"replace"),t.replace=e,zt(r,"insert"),t.insert=r,zt(n,"del"),t.del=n,zt(i,"is"),t.is=i}(E||(E={})),function(t){function e(t,e){return{textDocument:t,edits:e}}function r(t){let e=t;return Nt.defined(e)&&$.is(e.textDocument)&&Array.isArray(e.edits)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(S||(S={})),function(t){function e(t,e,r){let n={kind:"create",uri:t};return void 0===e||void 0===e.overwrite&&void 0===e.ignoreIfExists||(n.options=e),void 0!==r&&(n.annotationId=r),n}function r(t){let e=t;return e&&"create"===e.kind&&Nt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||Nt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||Nt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||C.is(e.annotationId))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(_||(_={})),function(t){function e(t,e,r,n){let i={kind:"rename",oldUri:t,newUri:e};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(i.options=r),void 0!==n&&(i.annotationId=n),i}function r(t){let e=t;return e&&"rename"===e.kind&&Nt.string(e.oldUri)&&Nt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||Nt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||Nt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||C.is(e.annotationId))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(A||(A={})),function(t){function e(t,e,r){let n={kind:"delete",uri:t};return void 0===e||void 0===e.recursive&&void 0===e.ignoreIfNotExists||(n.options=e),void 0!==r&&(n.annotationId=r),n}function r(t){let e=t;return e&&"delete"===e.kind&&Nt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||Nt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||Nt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||C.is(e.annotationId))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(R||(R={})),function(t){function e(t){let e=t;return e&&(void 0!==e.changes||void 0!==e.documentChanges)&&(void 0===e.documentChanges||e.documentChanges.every(t=>Nt.string(t.kind)?_.is(t)||A.is(t)||R.is(t):S.is(t)))}zt(e,"is"),t.is=e}(L||(L={})),I=class{static{zt(this,"TextEditChangeImpl")}constructor(t,e){this.edits=t,this.changeAnnotations=e}insert(t,e,r){let n,i;if(void 0===r?n=w.insert(t,e):C.is(r)?(i=r,n=E.insert(t,e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=E.insert(t,e,i)),this.edits.push(n),void 0!==i)return i}replace(t,e,r){let n,i;if(void 0===r?n=w.replace(t,e):C.is(r)?(i=r,n=E.replace(t,e,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=E.replace(t,e,i)),this.edits.push(n),void 0!==i)return i}delete(t,e){let r,n;if(void 0===e?r=w.del(t):C.is(e)?(n=e,r=E.del(t,e)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(e),r=E.del(t,n)),this.edits.push(r),void 0!==n)return n}add(t){this.edits.push(t)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(t){if(void 0===t)throw new Error("Text edit change is not configured to manage change annotations.")}},D=class{static{zt(this,"ChangeAnnotations")}constructor(t){this._annotations=void 0===t?Object.create(null):t,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(t,e){let r;if(C.is(t)?r=t:(r=this.nextId(),e=t),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===e)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=e,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},N=class{static{zt(this,"WorkspaceChange")}constructor(t){this._textEditChanges=Object.create(null),void 0!==t?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new D(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(t=>{if(S.is(t)){const e=new I(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=e}})):t.changes&&Object.keys(t.changes).forEach(e=>{const r=new I(t.changes[e]);this._textEditChanges[e]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(t){if($.is(t)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const e={uri:t.uri,version:t.version};let r=this._textEditChanges[e.uri];if(!r){const t=[],n={textDocument:e,edits:t};this._workspaceEdit.documentChanges.push(n),r=new I(t,this._changeAnnotations),this._textEditChanges[e.uri]=r}return r}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let e=this._textEditChanges[t];if(!e){let r=[];this._workspaceEdit.changes[t]=r,e=new I(r),this._textEditChanges[t]=e}return e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new D,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(t,e,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,i,a;if(k.is(e)||C.is(e)?n=e:r=e,void 0===n?i=_.create(t,r):(a=C.is(n)?n:this._changeAnnotations.manage(n),i=_.create(t,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}renameFile(t,e,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,a,o;if(k.is(r)||C.is(r)?i=r:n=r,void 0===i?a=A.create(t,e,n):(o=C.is(i)?i:this._changeAnnotations.manage(i),a=A.create(t,e,n,o)),this._workspaceEdit.documentChanges.push(a),void 0!==o)return o}deleteFile(t,e,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,i,a;if(k.is(e)||C.is(e)?n=e:r=e,void 0===n?i=R.create(t,r):(a=C.is(n)?n:this._changeAnnotations.manage(n),i=R.create(t,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}},function(t){function e(t){return{uri:t}}function r(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(M||(M={})),function(t){function e(t,e){return{uri:t,version:e}}function r(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)&&Nt.integer(e.version)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(O||(O={})),function(t){function e(t,e){return{uri:t,version:e}}function r(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)&&(null===e.version||Nt.integer(e.version))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}($||($={})),function(t){function e(t,e,r,n){return{uri:t,languageId:e,version:r,text:n}}function r(t){let e=t;return Nt.defined(e)&&Nt.string(e.uri)&&Nt.string(e.languageId)&&Nt.integer(e.version)&&Nt.string(e.text)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(P||(P={})),function(t){function e(e){const r=e;return r===t.PlainText||r===t.Markdown}t.PlainText="plaintext",t.Markdown="markdown",zt(e,"is"),t.is=e}(B||(B={})),function(t){function e(t){const e=t;return Nt.objectLiteral(t)&&B.is(e.kind)&&Nt.string(e.value)}zt(e,"is"),t.is=e}(F||(F={})),(Mt=z||(z={})).Text=1,Mt.Method=2,Mt.Function=3,Mt.Constructor=4,Mt.Field=5,Mt.Variable=6,Mt.Class=7,Mt.Interface=8,Mt.Module=9,Mt.Property=10,Mt.Unit=11,Mt.Value=12,Mt.Enum=13,Mt.Keyword=14,Mt.Snippet=15,Mt.Color=16,Mt.File=17,Mt.Reference=18,Mt.Folder=19,Mt.EnumMember=20,Mt.Constant=21,Mt.Struct=22,Mt.Event=23,Mt.Operator=24,Mt.TypeParameter=25,(Ot=K||(K={})).PlainText=1,Ot.Snippet=2,(j||(j={})).Deprecated=1,function(t){function e(t,e,r){return{newText:t,insert:e,replace:r}}function r(t){const e=t;return e&&Nt.string(e.newText)&&l.is(e.insert)&&l.is(e.replace)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(q||(q={})),($t=W||(W={})).asIs=1,$t.adjustIndentation=2,function(t){function e(t){const e=t;return e&&(Nt.string(e.detail)||void 0===e.detail)&&(Nt.string(e.description)||void 0===e.description)}zt(e,"is"),t.is=e}(U||(U={})),function(t){function e(t){return{label:t}}zt(e,"create"),t.create=e}(G||(G={})),function(t){function e(t,e){return{items:t||[],isIncomplete:!!e}}zt(e,"create"),t.create=e}(Y||(Y={})),function(t){function e(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function r(t){const e=t;return Nt.string(e)||Nt.objectLiteral(e)&&Nt.string(e.language)&&Nt.string(e.value)}zt(e,"fromPlainText"),t.fromPlainText=e,zt(r,"is"),t.is=r}(V||(V={})),function(t){function e(t){let e=t;return!!e&&Nt.objectLiteral(e)&&(F.is(e.contents)||V.is(e.contents)||Nt.typedArray(e.contents,V.is))&&(void 0===t.range||l.is(t.range))}zt(e,"is"),t.is=e}(H||(H={})),function(t){function e(t,e){return e?{label:t,documentation:e}:{label:t}}zt(e,"create"),t.create=e}(X||(X={})),function(t){function e(t,e,...r){let n={label:t};return Nt.defined(e)&&(n.documentation=e),Nt.defined(r)?n.parameters=r:n.parameters=[],n}zt(e,"create"),t.create=e}(Z||(Z={})),(Pt=Q||(Q={})).Text=1,Pt.Read=2,Pt.Write=3,function(t){function e(t,e){let r={range:t};return Nt.number(e)&&(r.kind=e),r}zt(e,"create"),t.create=e}(J||(J={})),(Bt=tt||(tt={})).File=1,Bt.Module=2,Bt.Namespace=3,Bt.Package=4,Bt.Class=5,Bt.Method=6,Bt.Property=7,Bt.Field=8,Bt.Constructor=9,Bt.Enum=10,Bt.Interface=11,Bt.Function=12,Bt.Variable=13,Bt.Constant=14,Bt.String=15,Bt.Number=16,Bt.Boolean=17,Bt.Array=18,Bt.Object=19,Bt.Key=20,Bt.Null=21,Bt.EnumMember=22,Bt.Struct=23,Bt.Event=24,Bt.Operator=25,Bt.TypeParameter=26,(et||(et={})).Deprecated=1,function(t){function e(t,e,r,n,i){let a={name:t,kind:e,location:{uri:n,range:r}};return i&&(a.containerName=i),a}zt(e,"create"),t.create=e}(rt||(rt={})),function(t){function e(t,e,r,n){return void 0!==n?{name:t,kind:e,location:{uri:r,range:n}}:{name:t,kind:e,location:{uri:r}}}zt(e,"create"),t.create=e}(nt||(nt={})),function(t){function e(t,e,r,n,i,a){let o={name:t,detail:e,kind:r,range:n,selectionRange:i};return void 0!==a&&(o.children=a),o}function r(t){let e=t;return e&&Nt.string(e.name)&&Nt.number(e.kind)&&l.is(e.range)&&l.is(e.selectionRange)&&(void 0===e.detail||Nt.string(e.detail))&&(void 0===e.deprecated||Nt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(it||(it={})),(Ft=at||(at={})).Empty="",Ft.QuickFix="quickfix",Ft.Refactor="refactor",Ft.RefactorExtract="refactor.extract",Ft.RefactorInline="refactor.inline",Ft.RefactorRewrite="refactor.rewrite",Ft.Source="source",Ft.SourceOrganizeImports="source.organizeImports",Ft.SourceFixAll="source.fixAll",(Kt=ot||(ot={})).Invoked=1,Kt.Automatic=2,function(t){function e(t,e,r){let n={diagnostics:t};return null!=e&&(n.only=e),null!=r&&(n.triggerKind=r),n}function r(t){let e=t;return Nt.defined(e)&&Nt.typedArray(e.diagnostics,x.is)&&(void 0===e.only||Nt.typedArray(e.only,Nt.string))&&(void 0===e.triggerKind||e.triggerKind===ot.Invoked||e.triggerKind===ot.Automatic)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(st||(st={})),function(t){function e(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):T.is(e)?n.command=e:n.edit=e,i&&void 0!==r&&(n.kind=r),n}function r(t){let e=t;return e&&Nt.string(e.title)&&(void 0===e.diagnostics||Nt.typedArray(e.diagnostics,x.is))&&(void 0===e.kind||Nt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||T.is(e.command))&&(void 0===e.isPreferred||Nt.boolean(e.isPreferred))&&(void 0===e.edit||L.is(e.edit))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(lt||(lt={})),function(t){function e(t,e){let r={range:t};return Nt.defined(e)&&(r.data=e),r}function r(t){let e=t;return Nt.defined(e)&&l.is(e.range)&&(Nt.undefined(e.command)||T.is(e.command))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(ct||(ct={})),function(t){function e(t,e){return{tabSize:t,insertSpaces:e}}function r(t){let e=t;return Nt.defined(e)&&Nt.uinteger(e.tabSize)&&Nt.boolean(e.insertSpaces)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(ht||(ht={})),function(t){function e(t,e,r){return{range:t,target:e,data:r}}function r(t){let e=t;return Nt.defined(e)&&l.is(e.range)&&(Nt.undefined(e.target)||Nt.string(e.target))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(ut||(ut={})),function(t){function e(t,e){return{range:t,parent:e}}function r(e){let r=e;return Nt.objectLiteral(r)&&l.is(r.range)&&(void 0===r.parent||t.is(r.parent))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(dt||(dt={})),(jt=pt||(pt={})).namespace="namespace",jt.type="type",jt.class="class",jt.enum="enum",jt.interface="interface",jt.struct="struct",jt.typeParameter="typeParameter",jt.parameter="parameter",jt.variable="variable",jt.property="property",jt.enumMember="enumMember",jt.event="event",jt.function="function",jt.method="method",jt.macro="macro",jt.keyword="keyword",jt.modifier="modifier",jt.comment="comment",jt.string="string",jt.number="number",jt.regexp="regexp",jt.operator="operator",jt.decorator="decorator",(qt=ft||(ft={})).declaration="declaration",qt.definition="definition",qt.readonly="readonly",qt.static="static",qt.deprecated="deprecated",qt.abstract="abstract",qt.async="async",qt.modification="modification",qt.documentation="documentation",qt.defaultLibrary="defaultLibrary",function(t){function e(t){const e=t;return Nt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}zt(e,"is"),t.is=e}(gt||(gt={})),function(t){function e(t,e){return{range:t,text:e}}function r(t){const e=t;return null!=e&&l.is(e.range)&&Nt.string(e.text)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(mt||(mt={})),function(t){function e(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function r(t){const e=t;return null!=e&&l.is(e.range)&&Nt.boolean(e.caseSensitiveLookup)&&(Nt.string(e.variableName)||void 0===e.variableName)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(yt||(yt={})),function(t){function e(t,e){return{range:t,expression:e}}function r(t){const e=t;return null!=e&&l.is(e.range)&&(Nt.string(e.expression)||void 0===e.expression)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(vt||(vt={})),function(t){function e(t,e){return{frameId:t,stoppedLocation:e}}function r(t){const e=t;return Nt.defined(e)&&l.is(t.stoppedLocation)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(bt||(bt={})),function(t){function e(t){return 1===t||2===t}t.Type=1,t.Parameter=2,zt(e,"is"),t.is=e}(xt||(xt={})),function(t){function e(t){return{value:t}}function r(t){const e=t;return Nt.objectLiteral(e)&&(void 0===e.tooltip||Nt.string(e.tooltip)||F.is(e.tooltip))&&(void 0===e.location||c.is(e.location))&&(void 0===e.command||T.is(e.command))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(Tt||(Tt={})),function(t){function e(t,e,r){const n={position:t,label:e};return void 0!==r&&(n.kind=r),n}function r(t){const e=t;return Nt.objectLiteral(e)&&s.is(e.position)&&(Nt.string(e.label)||Nt.typedArray(e.label,Tt.is))&&(void 0===e.kind||xt.is(e.kind))&&void 0===e.textEdits||Nt.typedArray(e.textEdits,w.is)&&(void 0===e.tooltip||Nt.string(e.tooltip)||F.is(e.tooltip))&&(void 0===e.paddingLeft||Nt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||Nt.boolean(e.paddingRight))}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(wt||(wt={})),function(t){function e(t){return{kind:"snippet",value:t}}zt(e,"createSnippet"),t.createSnippet=e}(kt||(kt={})),function(t){function e(t,e,r,n){return{insertText:t,filterText:e,range:r,command:n}}zt(e,"create"),t.create=e}(Ct||(Ct={})),function(t){function e(t){return{items:t}}zt(e,"create"),t.create=e}(Et||(Et={})),(Wt=St||(St={})).Invoked=0,Wt.Automatic=1,function(t){function e(t,e){return{range:t,text:e}}zt(e,"create"),t.create=e}(_t||(_t={})),function(t){function e(t,e){return{triggerKind:t,selectedCompletionInfo:e}}zt(e,"create"),t.create=e}(At||(At={})),function(t){function e(t){const e=t;return Nt.objectLiteral(e)&&i.is(e.uri)&&Nt.string(e.name)}zt(e,"is"),t.is=e}(Rt||(Rt={})),Lt=["\n","\r\n","\r"],function(t){function e(t,e,r,n){return new Dt(t,e,r,n)}function r(t){let e=t;return!!(Nt.defined(e)&&Nt.string(e.uri)&&(Nt.undefined(e.languageId)||Nt.string(e.languageId))&&Nt.uinteger(e.lineCount)&&Nt.func(e.getText)&&Nt.func(e.positionAt)&&Nt.func(e.offsetAt))}function n(t,e){let r=t.getText(),n=i(e,(t,e)=>{let r=t.range.start.line-e.range.start.line;return 0===r?t.range.start.character-e.range.start.character:r}),a=r.length;for(let i=n.length-1;i>=0;i--){let e=n[i],o=t.offsetAt(e.range.start),s=t.offsetAt(e.range.end);if(!(s<=a))throw new Error("Overlapping edit");r=r.substring(0,o)+e.newText+r.substring(s,r.length),a=o}return r}function i(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),a=t.slice(r);i(n,e),i(a,e);let o=0,s=0,l=0;for(;o<n.length&&s<a.length;){let r=e(n[o],a[s]);t[l++]=r<=0?n[o++]:a[s++]}for(;o<n.length;)t[l++]=n[o++];for(;s<a.length;)t[l++]=a[s++];return t}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r,zt(n,"applyEdits"),t.applyEdits=n,zt(i,"mergeSort")}(It||(It={})),Dt=class{static{zt(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let e=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(e,r)}return this._content}update(t,e){this._content=t.text,this._version=e,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let t=[],e=this._content,r=!0;for(let n=0;n<e.length;n++){r&&(t.push(n),r=!1);let i=e.charAt(n);r="\r"===i||"\n"===i,"\r"===i&&n+1<e.length&&"\n"===e.charAt(n+1)&&n++}r&&e.length>0&&t.push(e.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,n=e.length;if(0===n)return s.create(0,t);for(;r<n;){let i=Math.floor((r+n)/2);e[i]>t?n=i:r=i+1}let i=r-1;return s.create(i,t-e[i])}offsetAt(t){let e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;let r=e[t.line],n=t.line+1<e.length?e[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,n),r)}get lineCount(){return this.getLineOffsets().length}},function(t){const e=Object.prototype.toString;function r(t){return void 0!==t}function n(t){return void 0===t}function i(t){return!0===t||!1===t}function a(t){return"[object String]"===e.call(t)}function o(t){return"[object Number]"===e.call(t)}function s(t,r,n){return"[object Number]"===e.call(t)&&r<=t&&t<=n}function l(t){return"[object Number]"===e.call(t)&&-2147483648<=t&&t<=2147483647}function c(t){return"[object Number]"===e.call(t)&&0<=t&&t<=2147483647}function h(t){return"[object Function]"===e.call(t)}function u(t){return null!==t&&"object"==typeof t}function d(t,e){return Array.isArray(t)&&t.every(e)}zt(r,"defined"),t.defined=r,zt(n,"undefined"),t.undefined=n,zt(i,"boolean"),t.boolean=i,zt(a,"string"),t.string=a,zt(o,"number"),t.number=o,zt(s,"numberRange"),t.numberRange=s,zt(l,"integer"),t.integer=l,zt(c,"uinteger"),t.uinteger=c,zt(h,"func"),t.func=h,zt(u,"objectLiteral"),t.objectLiteral=u,zt(d,"typedArray"),t.typedArray=d}(Nt||(Nt={}))}},function(){return Vt&&(Ht=(0,Vt[Pt(Vt)[0]])(Vt=0)),Ht}),Zt=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(t){var e;function r(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}Object.defineProperty(t,"__esModule",{value:!0}),zt(r,"RAL"),function(t){function r(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}zt(r,"install"),t.install=r}(r||(r={})),t.default=r}}),Qt=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(t){function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function o(t){return Array.isArray(t)}function s(t){return o(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,zt(e,"boolean"),t.boolean=e,zt(r,"string"),t.string=r,zt(n,"number"),t.number=n,zt(i,"error"),t.error=i,zt(a,"func"),t.func=a,zt(o,"array"),t.array=o,zt(s,"stringArray"),t.stringArray=s}}),Jt=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var e,r=Zt();!function(t){const e={dispose(){}};t.None=function(){return e}}(e||(t.Event=e={}));var n=class{static{zt(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:zt(()=>this.remove(t,e),"dispose")})}remove(t,e=null){if(!this._callbacks)return;let r=!1;for(let n=0,i=this._callbacks.length;n<i;n++)if(this._callbacks[n]===t){if(this._contexts[n]===e)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];const e=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{e.push(n[o].apply(i[o],t))}catch(a){(0,r.default)().console.error(a)}return e}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class t{static{zt(this,"Emitter")}constructor(t){this._options=t}get event(){return this._event||(this._event=(e,r,i)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);const a={dispose:zt(()=>{this._callbacks&&(this._callbacks.remove(e,r),a.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(i)&&i.push(a),a}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};t.Emitter=i,i._noop=function(){}}}),te=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r=Zt(),n=Qt(),i=Jt();!function(t){function e(e){const r=e;return r&&(r===t.None||r===t.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),zt(e,"is"),t.is=e}(e||(t.CancellationToken=e={}));var a=Object.freeze(function(t,e){const n=(0,r.default)().timer.setTimeout(t.bind(e),0);return{dispose(){n.dispose()}}}),o=class{static{zt(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},s=class{static{zt(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=s}}),ee=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;var e,r,n=Qt();(r=e||(t.ErrorCodes=e={})).ParseError=-32700,r.InvalidRequest=-32600,r.MethodNotFound=-32601,r.InvalidParams=-32602,r.InternalError=-32603,r.jsonrpcReservedErrorRangeStart=-32099,r.serverErrorStart=-32099,r.MessageWriteError=-32099,r.MessageReadError=-32098,r.PendingResponseRejected=-32097,r.ConnectionInactive=-32096,r.ServerNotInitialized=-32002,r.UnknownErrorCode=-32001,r.jsonrpcReservedErrorRangeEnd=-32e3,r.serverErrorEnd=-32e3;var i=class t extends Error{static{zt(this,"ResponseError")}constructor(r,i,a){super(i),this.code=n.number(r)?r:e.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,t.prototype)}toJson(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),t}};t.ResponseError=i;var a=class t{static{zt(this,"ParameterStructures")}constructor(t){this.kind=t}static is(e){return e===t.auto||e===t.byName||e===t.byPosition}toString(){return this.kind}};t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var o=class{static{zt(this,"AbstractMessageSignature")}constructor(t,e){this.method=t,this.numberOfParams=e}get parameterStructures(){return a.auto}};t.AbstractMessageSignature=o;var s=class extends o{static{zt(this,"RequestType0")}constructor(t){super(t,0)}};t.RequestType0=s;var l=class extends o{static{zt(this,"RequestType")}constructor(t,e=a.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};t.RequestType=l;var c=class extends o{static{zt(this,"RequestType1")}constructor(t,e=a.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};t.RequestType1=c;var h=class extends o{static{zt(this,"RequestType2")}constructor(t){super(t,2)}};t.RequestType2=h;var u=class extends o{static{zt(this,"RequestType3")}constructor(t){super(t,3)}};t.RequestType3=u;var d=class extends o{static{zt(this,"RequestType4")}constructor(t){super(t,4)}};t.RequestType4=d;var p=class extends o{static{zt(this,"RequestType5")}constructor(t){super(t,5)}};t.RequestType5=p;var f=class extends o{static{zt(this,"RequestType6")}constructor(t){super(t,6)}};t.RequestType6=f;var g=class extends o{static{zt(this,"RequestType7")}constructor(t){super(t,7)}};t.RequestType7=g;var m=class extends o{static{zt(this,"RequestType8")}constructor(t){super(t,8)}};t.RequestType8=m;var y=class extends o{static{zt(this,"RequestType9")}constructor(t){super(t,9)}};t.RequestType9=y;var v=class extends o{static{zt(this,"NotificationType")}constructor(t,e=a.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};t.NotificationType=v;var b=class extends o{static{zt(this,"NotificationType0")}constructor(t){super(t,0)}};t.NotificationType0=b;var x=class extends o{static{zt(this,"NotificationType1")}constructor(t,e=a.auto){super(t,1),this._parameterStructures=e}get parameterStructures(){return this._parameterStructures}};t.NotificationType1=x;var T=class extends o{static{zt(this,"NotificationType2")}constructor(t){super(t,2)}};t.NotificationType2=T;var w=class extends o{static{zt(this,"NotificationType3")}constructor(t){super(t,3)}};t.NotificationType3=w;var k=class extends o{static{zt(this,"NotificationType4")}constructor(t){super(t,4)}};t.NotificationType4=k;var C=class extends o{static{zt(this,"NotificationType5")}constructor(t){super(t,5)}};t.NotificationType5=C;var E=class extends o{static{zt(this,"NotificationType6")}constructor(t){super(t,6)}};t.NotificationType6=E;var S=class extends o{static{zt(this,"NotificationType7")}constructor(t){super(t,7)}};t.NotificationType7=S;var _=class extends o{static{zt(this,"NotificationType8")}constructor(t){super(t,8)}};t.NotificationType8=_;var A,R=class extends o{static{zt(this,"NotificationType9")}constructor(t){super(t,9)}};t.NotificationType9=R,function(t){function e(t){const e=t;return e&&n.string(e.method)&&(n.string(e.id)||n.number(e.id))}function r(t){const e=t;return e&&n.string(e.method)&&void 0===t.id}function i(t){const e=t;return e&&(void 0!==e.result||!!e.error)&&(n.string(e.id)||n.number(e.id)||null===e.id)}zt(e,"isRequest"),t.isRequest=e,zt(r,"isNotification"),t.isNotification=r,zt(i,"isResponse"),t.isResponse=i}(A||(t.Message=A={}))}}),re=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(t){var e,r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,(n=r||(t.Touch=r={})).None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last;var i=class{static{zt(this,"LinkedMap")}constructor(){this[e]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,e=r.None){const n=this._map.get(t);if(n)return e!==r.None&&this.touch(n,e),n.value}set(t,e,n=r.None){let i=this._map.get(t);if(i)i.value=e,n!==r.None&&this.touch(i,n);else{switch(i={key:t,value:e,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){const e=this._map.get(t);if(e)return this._map.delete(t),this.removeItem(e),this._size--,e.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,e){const r=this._state;let n=this._head;for(;n;){if(e?t.bind(e)(n.value,n.key,this):t(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const t=this._state;let e=this._head;const r={[Symbol.iterator]:()=>r,next:zt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:e.key,done:!1};return e=e.next,t}return{value:void 0,done:!0}},"next")};return r}values(){const t=this._state;let e=this._head;const r={[Symbol.iterator]:()=>r,next:zt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:e.value,done:!1};return e=e.next,t}return{value:void 0,done:!0}},"next")};return r}entries(){const t=this._state;let e=this._head;const r={[Symbol.iterator]:()=>r,next:zt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(e){const t={value:[e.key,e.value],done:!1};return e=e.next,t}return{value:void 0,done:!0}},"next")};return r}[(e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(0===t)return void this.clear();let e=this._head,r=this.size;for(;e&&r>t;)this._map.delete(e.key),e=e.next,r--;this._head=e,this._size=r,e&&(e.previous=void 0),this._state++}addItemFirst(t){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");t.next=this._head,this._head.previous=t}else this._tail=t;this._head=t,this._state++}addItemLast(t){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");t.previous=this._tail,this._tail.next=t}else this._head=t;this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{const e=t.next,r=t.previous;if(!e||!r)throw new Error("Invalid list");e.previous=r,r.next=e}t.next=void 0,t.previous=void 0,this._state++}touch(t,e){if(!this._head||!this._tail)throw new Error("Invalid list");if(e===r.First||e===r.Last)if(e===r.First){if(t===this._head)return;const e=t.next,r=t.previous;t===this._tail?(r.next=void 0,this._tail=r):(e.previous=r,r.next=e),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(e===r.Last){if(t===this._tail)return;const e=t.next,r=t.previous;t===this._head?(e.previous=void 0,this._head=e):(e.previous=r,r.next=e),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}toJSON(){const t=[];return this.forEach((e,r)=>{t.push([r,e])}),t}fromJSON(t){this.clear();for(const[e,r]of t)this.set(e,r)}};t.LinkedMap=i;var a=class extends i{static{zt(this,"LRUCache")}constructor(t,e=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,e),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,e=r.AsNew){return super.get(t,e)}peek(t){return super.get(t,r.None)}set(t,e){return super.set(t,e,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};t.LRUCache=a}}),ne=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(t){function e(t){return{dispose:t}}zt(e,"create"),t.create=e}(e||(t.Disposable=e={}))}}),ie=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;var e,r,n=te();(r=e||(e={})).Continue=0,r.Cancelled=1;var i=class{static{zt(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(t){if(null===t.id)return;const r=new SharedArrayBuffer(4);new Int32Array(r,0,1)[0]=e.Continue,this.buffers.set(t.id,r),t.$cancellationData=r}async sendCancellation(t,r){const n=this.buffers.get(r);if(void 0===n)return;const i=new Int32Array(n,0,1);Atomics.store(i,0,e.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};t.SharedArraySenderStrategy=i;var a=class{static{zt(this,"SharedArrayBufferCancellationToken")}constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===e.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},o=class{static{zt(this,"SharedArrayBufferCancellationTokenSource")}constructor(t){this.token=new a(t)}cancel(){}dispose(){}},s=class{static{zt(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(t){const e=t.$cancellationData;return void 0===e?new n.CancellationTokenSource:new o(e)}};t.SharedArrayReceiverStrategy=s}}),ae=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;var e=Zt(),r=class{static{zt(this,"Semaphore")}constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((e,r)=>{this._waiting.push({thunk:t,resolve:e,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,e.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const e=t.thunk();e instanceof Promise?e.then(e=>{this._active--,t.resolve(e),this.runNext()},e=>{this._active--,t.reject(e),this.runNext()}):(this._active--,t.resolve(e),this.runNext())}catch(e){this._active--,t.reject(e),this.runNext()}}};t.Semaphore=r}}),oe=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;var e,r=Zt(),n=Qt(),i=Jt(),a=ae();!function(t){function e(t){let e=t;return e&&n.func(e.listen)&&n.func(e.dispose)&&n.func(e.onError)&&n.func(e.onClose)&&n.func(e.onPartialMessage)}zt(e,"is"),t.is=e}(e||(t.MessageReader=e={}));var o,s=class{static{zt(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${n.string(t.message)?t.message:"unknown"}`)}};t.AbstractMessageReader=s,function(t){function e(t){let e,n;const i=new Map;let a;const o=new Map;if(void 0===t||"string"==typeof t)e=t??"utf-8";else{if(e=t.charset??"utf-8",void 0!==t.contentDecoder&&(n=t.contentDecoder,i.set(n.name,n)),void 0!==t.contentDecoders)for(const e of t.contentDecoders)i.set(e.name,e);if(void 0!==t.contentTypeDecoder&&(a=t.contentTypeDecoder,o.set(a.name,a)),void 0!==t.contentTypeDecoders)for(const e of t.contentTypeDecoders)o.set(e.name,e)}return void 0===a&&(a=(0,r.default)().applicationJson.decoder,o.set(a.name,a)),{charset:e,contentDecoder:n,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}zt(e,"fromOptions"),t.fromOptions=e}(o||(o={}));var l=class extends s{static{zt(this,"ReadableStreamMessageReader")}constructor(t,e){super(),this.readable=t,this.options=o.fromOptions(e),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;const e=this.readable.onData(t=>{this.onData(t)});return this.readable.onError(t=>this.fireError(t)),this.readable.onClose(()=>this.fireClose()),e}onData(t){try{for(this.buffer.append(t);;){if(-1===this.nextMessageLength){const t=this.buffer.tryReadHeaders(!0);if(!t)return;const e=t.get("content-length");if(!e)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(t))}`));const r=parseInt(e);if(isNaN(r))return void this.fireError(new Error(`Content-Length value must be a number. Got ${e}`));this.nextMessageLength=r}const t=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const e=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(t):t,r=await this.options.contentTypeDecoder.decode(e,this.options);this.callback(r)}).catch(t=>{this.fireError(t)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((t,e)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:e}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};t.ReadableStreamMessageReader=l}}),se=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;var e,r=Zt(),n=Qt(),i=ae(),a=Jt();!function(t){function e(t){let e=t;return e&&n.func(e.dispose)&&n.func(e.onClose)&&n.func(e.onError)&&n.func(e.write)}zt(e,"is"),t.is=e}(e||(t.MessageWriter=e={}));var o,s=class{static{zt(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,e,r){this.errorEmitter.fire([this.asError(t),e,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${n.string(t.message)?t.message:"unknown"}`)}};t.AbstractMessageWriter=s,function(t){function e(t){return void 0===t||"string"==typeof t?{charset:t??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}zt(e,"fromOptions"),t.fromOptions=e}(o||(o={}));var l=class extends s{static{zt(this,"WriteableStreamMessageWriter")}constructor(t,e){super(),this.writable=t,this.options=o.fromOptions(e),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(t=>this.fireError(t)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(t=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(t):t).then(e=>{const r=[];return r.push("Content-Length: ",e.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(t,r,e)},t=>{throw this.fireError(t),t}))}async doWrite(t,e,r){try{return await this.writable.write(e.join(""),"ascii"),this.writable.write(r)}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,e){this.errorCount++,this.fireError(t,e,this.errorCount)}end(){this.writable.end()}};t.WriteableStreamMessageWriter=l}}),le=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;var e=class{static{zt(this,"AbstractMessageBuffer")}constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){const e="string"==typeof t?this.fromString(t,this._encoding):t;this._chunks.push(e),this._totalLength+=e.byteLength}tryReadHeaders(t=!1){if(0===this._chunks.length)return;let e=0,r=0,n=0,i=0;t:for(;r<this._chunks.length;){const t=this._chunks[r];for(n=0;n<t.length;){switch(t[n]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,n++;break t;default:e=0}break;default:e=0}n++}i+=t.byteLength,r++}if(4!==e)return;const a=this._read(i+n),o=new Map,s=this.toString(a,"ascii").split("\r\n");if(s.length<2)return o;for(let l=0;l<s.length-2;l++){const e=s[l],r=e.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${e}`);const n=e.substr(0,r),i=e.substr(r+1).trim();o.set(t?n.toLowerCase():n,i)}return o}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(0===t)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){const e=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(e)}if(this._chunks[0].byteLength>t){const e=this._chunks[0],r=this.asNative(e,t);return this._chunks[0]=e.slice(t),this._totalLength-=t,r}const e=this.allocNative(t);let r=0;for(;t>0;){const n=this._chunks[0];if(n.byteLength>t){const i=n.slice(0,t);e.set(i,r),r+=t,this._chunks[0]=n.slice(t),this._totalLength-=t,t-=t}else e.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,t-=n.byteLength}return e}};t.AbstractMessageBuffer=e}}),ce=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;var e,r,n,i=Zt(),a=Qt(),o=ee(),s=re(),l=Jt(),c=te();(e||(e={})).type=new o.NotificationType("$/cancelRequest"),function(t){function e(t){return"string"==typeof t||"number"==typeof t}zt(e,"is"),t.is=e}(r||(t.ProgressToken=r={})),(n||(n={})).type=new o.NotificationType("$/progress");var h,u,d,p,f,g,m,y,v,b,x,T=class{static{zt(this,"ProgressType")}constructor(){}};t.ProgressType=T,function(t){function e(t){return a.func(t)}zt(e,"is"),t.is=e}(h||(h={})),t.NullLogger=Object.freeze({error:zt(()=>{},"error"),warn:zt(()=>{},"warn"),info:zt(()=>{},"info"),log:zt(()=>{},"log")}),(d=u||(t.Trace=u={}))[d.Off=0]="Off",d[d.Messages=1]="Messages",d[d.Compact=2]="Compact",d[d.Verbose=3]="Verbose",(f=p||(t.TraceValues=p={})).Off="off",f.Messages="messages",f.Compact="compact",f.Verbose="verbose",function(t){function e(e){if(!a.string(e))return t.Off;switch(e=e.toLowerCase()){case"off":default:return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose}}function r(e){switch(e){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}zt(e,"fromString"),t.fromString=e,zt(r,"toString"),t.toString=r}(u||(t.Trace=u={})),(m=g||(t.TraceFormat=g={})).Text="text",m.JSON="json",function(t){function e(e){return a.string(e)&&"json"===(e=e.toLowerCase())?t.JSON:t.Text}zt(e,"fromString"),t.fromString=e}(g||(t.TraceFormat=g={})),(y||(t.SetTraceNotification=y={})).type=new o.NotificationType("$/setTrace"),(v||(t.LogTraceNotification=v={})).type=new o.NotificationType("$/logTrace"),(x=b||(t.ConnectionErrors=b={}))[x.Closed=1]="Closed",x[x.Disposed=2]="Disposed",x[x.AlreadyListening=3]="AlreadyListening";var w,k,C,E,S,_,A,R,L,I,D=class t extends Error{static{zt(this,"ConnectionError")}constructor(e,r){super(r),this.code=e,Object.setPrototypeOf(this,t.prototype)}};function N(d,p,f,m){const x=void 0!==f?f:t.NullLogger;let T=0,w=0,C=0;const E="2.0";let S;const R=new Map;let I;const N=new Map,M=new Map;let O,$,P=new s.LinkedMap,B=new Map,F=new Set,z=new Map,K=u.Off,j=g.Text,q=L.New;const W=new l.Emitter,U=new l.Emitter,G=new l.Emitter,Y=new l.Emitter,V=new l.Emitter,H=m&&m.cancellationStrategy?m.cancellationStrategy:_.Message;function X(t){if(null===t)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+t.toString()}function Z(t){return null===t?"res-unknown-"+(++C).toString():"res-"+t.toString()}function Q(){return"not-"+(++w).toString()}function J(t,e){o.Message.isRequest(e)?t.set(X(e.id),e):o.Message.isResponse(e)?t.set(Z(e.id),e):t.set(Q(),e)}function tt(t){}function et(){return q===L.Listening}function rt(){return q===L.Closed}function nt(){return q===L.Disposed}function it(){q!==L.New&&q!==L.Listening||(q=L.Closed,U.fire(void 0))}function at(t){W.fire([t,void 0,void 0])}function ot(t){W.fire(t)}function st(){O||0===P.size||(O=(0,i.default)().timer.setImmediate(()=>{O=void 0,ct()}))}function lt(t){o.Message.isRequest(t)?ut(t):o.Message.isNotification(t)?pt(t):o.Message.isResponse(t)?dt(t):ft(t)}function ct(){if(0===P.size)return;const t=P.shift();try{const e=m?.messageStrategy;A.is(e)?e.handleMessage(t,lt):lt(t)}finally{st()}}zt(X,"createRequestQueueKey"),zt(Z,"createResponseQueueKey"),zt(Q,"createNotificationQueueKey"),zt(J,"addMessageToQueue"),zt(tt,"cancelUndispatched"),zt(et,"isListening"),zt(rt,"isClosed"),zt(nt,"isDisposed"),zt(it,"closeHandler"),zt(at,"readErrorHandler"),zt(ot,"writeErrorHandler"),d.onClose(it),d.onError(at),p.onClose(it),p.onError(ot),zt(st,"triggerMessageQueue"),zt(lt,"handleMessage"),zt(ct,"processMessageQueue");const ht=zt(t=>{try{if(o.Message.isNotification(t)&&t.method===e.type.method){const e=t.params.id,r=X(e),n=P.get(r);if(o.Message.isRequest(n)){const i=m?.connectionStrategy,a=i&&i.cancelUndispatched?i.cancelUndispatched(n,tt):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return P.delete(r),z.delete(e),a.id=n.id,vt(a,t.method,Date.now()),void p.write(a).catch(()=>x.error("Sending response for canceled message failed."))}const i=z.get(e);if(void 0!==i)return i.cancel(),void xt(t);F.add(e)}J(P,t)}finally{st()}},"callback");function ut(t){if(nt())return;function e(e,r,n){const i={jsonrpc:E,id:t.id};e instanceof o.ResponseError?i.error=e.toJson():i.result=void 0===e?null:e,vt(i,r,n),p.write(i).catch(()=>x.error("Sending response failed."))}function r(e,r,n){const i={jsonrpc:E,id:t.id,error:e.toJson()};vt(i,r,n),p.write(i).catch(()=>x.error("Sending response failed."))}function n(e,r,n){void 0===e&&(e=null);const i={jsonrpc:E,id:t.id,result:e};vt(i,r,n),p.write(i).catch(()=>x.error("Sending response failed."))}zt(e,"reply"),zt(r,"replyError"),zt(n,"replySuccess"),bt(t);const i=R.get(t.method);let s,l;i&&(s=i.type,l=i.handler);const c=Date.now();if(l||S){const i=t.id??String(Date.now()),u=k.is(H.receiver)?H.receiver.createCancellationTokenSource(i):H.receiver.createCancellationTokenSource(t);null!==t.id&&F.has(t.id)&&u.cancel(),null!==t.id&&z.set(i,u);try{let h;if(l)if(void 0===t.params){if(void 0!==s&&0!==s.numberOfParams)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${t.method} defines ${s.numberOfParams} params but received none.`),t.method,c);h=l(u.token)}else if(Array.isArray(t.params)){if(void 0!==s&&s.parameterStructures===o.ParameterStructures.byName)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by name but received parameters by position`),t.method,c);h=l(...t.params,u.token)}else{if(void 0!==s&&s.parameterStructures===o.ParameterStructures.byPosition)return void r(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${t.method} defines parameters by position but received parameters by name`),t.method,c);h=l(t.params,u.token)}else S&&(h=S(t.method,t.params,u.token));const d=h;h?d.then?d.then(r=>{z.delete(i),e(r,t.method,c)},e=>{z.delete(i),e instanceof o.ResponseError?r(e,t.method,c):e&&a.string(e.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${e.message}`),t.method,c):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,c)}):(z.delete(i),e(h,t.method,c)):(z.delete(i),n(h,t.method,c))}catch(h){z.delete(i),h instanceof o.ResponseError?e(h,t.method,c):h&&a.string(h.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${t.method} failed with message: ${h.message}`),t.method,c):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${t.method} failed unexpectedly without providing any details.`),t.method,c)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${t.method}`),t.method,c)}function dt(t){if(!nt())if(null===t.id)t.error?x.error(`Received response message without id: Error is: \n${JSON.stringify(t.error,void 0,4)}`):x.error("Received response message without id. No further error information provided.");else{const r=t.id,n=B.get(r);if(Tt(t,n),void 0!==n){B.delete(r);try{if(t.error){const e=t.error;n.reject(new o.ResponseError(e.code,e.message,e.data))}else{if(void 0===t.result)throw new Error("Should never happen.");n.resolve(t.result)}}catch(e){e.message?x.error(`Response handler '${n.method}' failed with message: ${e.message}`):x.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function pt(t){if(nt())return;let i,a;if(t.method===e.type.method){const e=t.params.id;return F.delete(e),void xt(t)}{const e=N.get(t.method);e&&(a=e.handler,i=e.type)}if(a||I)try{if(xt(t),a)if(void 0===t.params)void 0!==i&&0!==i.numberOfParams&&i.parameterStructures!==o.ParameterStructures.byName&&x.error(`Notification ${t.method} defines ${i.numberOfParams} params but received none.`),a();else if(Array.isArray(t.params)){const e=t.params;t.method===n.type.method&&2===e.length&&r.is(e[0])?a({token:e[0],value:e[1]}):(void 0!==i&&(i.parameterStructures===o.ParameterStructures.byName&&x.error(`Notification ${t.method} defines parameters by name but received parameters by position`),i.numberOfParams!==t.params.length&&x.error(`Notification ${t.method} defines ${i.numberOfParams} params but received ${e.length} arguments`)),a(...e))}else void 0!==i&&i.parameterStructures===o.ParameterStructures.byPosition&&x.error(`Notification ${t.method} defines parameters by position but received parameters by name`),a(t.params);else I&&I(t.method,t.params)}catch(s){s.message?x.error(`Notification handler '${t.method}' failed with message: ${s.message}`):x.error(`Notification handler '${t.method}' failed unexpectedly.`)}else G.fire(t)}function ft(t){if(!t)return void x.error("Received empty message.");x.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(t,null,4)}`);const e=t;if(a.string(e.id)||a.number(e.id)){const t=e.id,r=B.get(t);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}function gt(t){if(null!=t)switch(K){case u.Verbose:return JSON.stringify(t,null,4);case u.Compact:return JSON.stringify(t);default:return}}function mt(t){if(K!==u.Off&&$)if(j===g.Text){let e;K!==u.Verbose&&K!==u.Compact||!t.params||(e=`Params: ${gt(t.params)}\n\n`),$.log(`Sending request '${t.method} - (${t.id})'.`,e)}else wt("send-request",t)}function yt(t){if(K!==u.Off&&$)if(j===g.Text){let e;K!==u.Verbose&&K!==u.Compact||(e=t.params?`Params: ${gt(t.params)}\n\n`:"No parameters provided.\n\n"),$.log(`Sending notification '${t.method}'.`,e)}else wt("send-notification",t)}function vt(t,e,r){if(K!==u.Off&&$)if(j===g.Text){let n;K!==u.Verbose&&K!==u.Compact||(t.error&&t.error.data?n=`Error data: ${gt(t.error.data)}\n\n`:t.result?n=`Result: ${gt(t.result)}\n\n`:void 0===t.error&&(n="No result returned.\n\n")),$.log(`Sending response '${e} - (${t.id})'. Processing request took ${Date.now()-r}ms`,n)}else wt("send-response",t)}function bt(t){if(K!==u.Off&&$)if(j===g.Text){let e;K!==u.Verbose&&K!==u.Compact||!t.params||(e=`Params: ${gt(t.params)}\n\n`),$.log(`Received request '${t.method} - (${t.id})'.`,e)}else wt("receive-request",t)}function xt(t){if(K!==u.Off&&$&&t.method!==v.type.method)if(j===g.Text){let e;K!==u.Verbose&&K!==u.Compact||(e=t.params?`Params: ${gt(t.params)}\n\n`:"No parameters provided.\n\n"),$.log(`Received notification '${t.method}'.`,e)}else wt("receive-notification",t)}function Tt(t,e){if(K!==u.Off&&$)if(j===g.Text){let r;if(K!==u.Verbose&&K!==u.Compact||(t.error&&t.error.data?r=`Error data: ${gt(t.error.data)}\n\n`:t.result?r=`Result: ${gt(t.result)}\n\n`:void 0===t.error&&(r="No result returned.\n\n")),e){const n=t.error?` Request failed: ${t.error.message} (${t.error.code}).`:"";$.log(`Received response '${e.method} - (${t.id})' in ${Date.now()-e.timerStart}ms.${n}`,r)}else $.log(`Received response ${t.id} without active response promise.`,r)}else wt("receive-response",t)}function wt(t,e){if(!$||K===u.Off)return;const r={isLSPMessage:!0,type:t,message:e,timestamp:Date.now()};$.log(r)}function kt(){if(rt())throw new D(b.Closed,"Connection is closed.");if(nt())throw new D(b.Disposed,"Connection is disposed.")}function Ct(){if(et())throw new D(b.AlreadyListening,"Connection is already listening")}function Et(){if(!et())throw new Error("Call listen() first.")}function St(t){return void 0===t?null:t}function _t(t){return null===t?void 0:t}function At(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function Rt(t,e){switch(t){case o.ParameterStructures.auto:return At(e)?_t(e):[St(e)];case o.ParameterStructures.byName:if(!At(e))throw new Error("Received parameters by name but param is not an object literal.");return _t(e);case o.ParameterStructures.byPosition:return[St(e)];default:throw new Error(`Unknown parameter structure ${t.toString()}`)}}function Lt(t,e){let r;const n=t.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=Rt(t.parameterStructures,e[0]);break;default:r=[];for(let t=0;t<e.length&&t<n;t++)r.push(St(e[t]));if(e.length<n)for(let t=e.length;t<n;t++)r.push(null)}return r}zt(ut,"handleRequest"),zt(dt,"handleResponse"),zt(pt,"handleNotification"),zt(ft,"handleInvalidMessage"),zt(gt,"stringifyTrace"),zt(mt,"traceSendingRequest"),zt(yt,"traceSendingNotification"),zt(vt,"traceSendingResponse"),zt(bt,"traceReceivedRequest"),zt(xt,"traceReceivedNotification"),zt(Tt,"traceReceivedResponse"),zt(wt,"logLSPMessage"),zt(kt,"throwIfClosedOrDisposed"),zt(Ct,"throwIfListening"),zt(Et,"throwIfNotListening"),zt(St,"undefinedToNull"),zt(_t,"nullToUndefined"),zt(At,"isNamedParam"),zt(Rt,"computeSingleParam"),zt(Lt,"computeMessageParams");const It={sendNotification:zt((t,...e)=>{let r,n;if(kt(),a.string(t)){r=t;const i=e[0];let a=0,s=o.ParameterStructures.auto;o.ParameterStructures.is(i)&&(a=1,s=i);let l=e.length;const c=l-a;switch(c){case 0:n=void 0;break;case 1:n=Rt(s,e[a]);break;default:if(s===o.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);n=e.slice(a,l).map(t=>St(t))}}else{const i=e;r=t.method,n=Lt(t,i)}const i={jsonrpc:E,method:r,params:n};return yt(i),p.write(i).catch(t=>{throw x.error("Sending notification failed."),t})},"sendNotification"),onNotification:zt((t,e)=>{let r;return kt(),a.func(t)?I=t:e&&(a.string(t)?(r=t,N.set(t,{type:void 0,handler:e})):(r=t.method,N.set(t.method,{type:t,handler:e}))),{dispose:zt(()=>{void 0!==r?N.delete(r):I=void 0},"dispose")}},"onNotification"),onProgress:zt((t,e,r)=>{if(M.has(e))throw new Error(`Progress handler for token ${e} already registered`);return M.set(e,r),{dispose:zt(()=>{M.delete(e)},"dispose")}},"onProgress"),sendProgress:zt((t,e,r)=>It.sendNotification(n.type,{token:e,value:r}),"sendProgress"),onUnhandledProgress:Y.event,sendRequest:zt((t,...e)=>{let r,n,i;if(kt(),Et(),a.string(t)){r=t;const a=e[0],s=e[e.length-1];let l=0,h=o.ParameterStructures.auto;o.ParameterStructures.is(a)&&(l=1,h=a);let u=e.length;c.CancellationToken.is(s)&&(u-=1,i=s);const d=u-l;switch(d){case 0:n=void 0;break;case 1:n=Rt(h,e[l]);break;default:if(h===o.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);n=e.slice(l,u).map(t=>St(t))}}else{const a=e;r=t.method,n=Lt(t,a);const o=t.numberOfParams;i=c.CancellationToken.is(a[o])?a[o]:void 0}const s=T++;let l;i&&(l=i.onCancellationRequested(()=>{const t=H.sender.sendCancellation(It,s);return void 0===t?(x.log(`Received no promise from cancellation strategy when cancelling id ${s}`),Promise.resolve()):t.catch(()=>{x.log(`Sending cancellation messages for id ${s} failed`)})}));const h={jsonrpc:E,id:s,method:r,params:n};return mt(h),"function"==typeof H.sender.enableCancellation&&H.sender.enableCancellation(h),new Promise(async(t,e)=>{const n=zt(e=>{t(e),H.sender.cleanup(s),l?.dispose()},"resolveWithCleanup"),i=zt(t=>{e(t),H.sender.cleanup(s),l?.dispose()},"rejectWithCleanup"),a={method:r,timerStart:Date.now(),resolve:n,reject:i};try{await p.write(h),B.set(s,a)}catch(c){throw x.error("Sending request failed."),a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,c.message?c.message:"Unknown reason")),c}})},"sendRequest"),onRequest:zt((t,e)=>{kt();let r=null;return h.is(t)?(r=void 0,S=t):a.string(t)?(r=null,void 0!==e&&(r=t,R.set(t,{handler:e,type:void 0}))):void 0!==e&&(r=t.method,R.set(t.method,{type:t,handler:e})),{dispose:zt(()=>{null!==r&&(void 0!==r?R.delete(r):S=void 0)},"dispose")}},"onRequest"),hasPendingResponse:zt(()=>B.size>0,"hasPendingResponse"),trace:zt(async(t,e,r)=>{let n=!1,i=g.Text;void 0!==r&&(a.boolean(r)?n=r:(n=r.sendNotification||!1,i=r.traceFormat||g.Text)),K=t,j=i,$=K===u.Off?void 0:e,!n||rt()||nt()||await It.sendNotification(y.type,{value:u.toString(t)})},"trace"),onError:W.event,onClose:U.event,onUnhandledNotification:G.event,onDispose:V.event,end:zt(()=>{p.end()},"end"),dispose:zt(()=>{if(nt())return;q=L.Disposed,V.fire(void 0);const t=new o.ResponseError(o.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of B.values())e.reject(t);B=new Map,z=new Map,F=new Set,P=new s.LinkedMap,a.func(p.dispose)&&p.dispose(),a.func(d.dispose)&&d.dispose()},"dispose"),listen:zt(()=>{kt(),Ct(),q=L.Listening,d.listen(ht)},"listen"),inspect:zt(()=>{(0,i.default)().console.log("inspect")},"inspect")};return It.onNotification(v.type,t=>{if(K===u.Off||!$)return;const e=K===u.Verbose||K===u.Compact;$.log(t.message,e?t.verbose:void 0)}),It.onNotification(n.type,t=>{const e=M.get(t.token);e?e(t.value):Y.fire(t)}),It}t.ConnectionError=D,function(t){function e(t){const e=t;return e&&a.func(e.cancelUndispatched)}zt(e,"is"),t.is=e}(w||(t.ConnectionStrategy=w={})),function(t){function e(t){const e=t;return e&&(void 0===e.kind||"id"===e.kind)&&a.func(e.createCancellationTokenSource)&&(void 0===e.dispose||a.func(e.dispose))}zt(e,"is"),t.is=e}(k||(t.IdCancellationReceiverStrategy=k={})),function(t){function e(t){const e=t;return e&&"request"===e.kind&&a.func(e.createCancellationTokenSource)&&(void 0===e.dispose||a.func(e.dispose))}zt(e,"is"),t.is=e}(C||(t.RequestCancellationReceiverStrategy=C={})),function(t){function e(t){return k.is(t)||C.is(t)}t.Message=Object.freeze({createCancellationTokenSource:t=>new c.CancellationTokenSource}),zt(e,"is"),t.is=e}(E||(t.CancellationReceiverStrategy=E={})),function(t){function r(t){const e=t;return e&&a.func(e.sendCancellation)&&a.func(e.cleanup)}t.Message=Object.freeze({sendCancellation:(t,r)=>t.sendNotification(e.type,{id:r}),cleanup(t){}}),zt(r,"is"),t.is=r}(S||(t.CancellationSenderStrategy=S={})),function(t){function e(t){const e=t;return e&&E.is(e.receiver)&&S.is(e.sender)}t.Message=Object.freeze({receiver:E.Message,sender:S.Message}),zt(e,"is"),t.is=e}(_||(t.CancellationStrategy=_={})),function(t){function e(t){const e=t;return e&&a.func(e.handleMessage)}zt(e,"is"),t.is=e}(A||(t.MessageStrategy=A={})),function(t){function e(t){const e=t;return e&&(_.is(e.cancellationStrategy)||w.is(e.connectionStrategy)||A.is(e.messageStrategy))}zt(e,"is"),t.is=e}(R||(t.ConnectionOptions=R={})),(I=L||(L={}))[I.New=1]="New",I[I.Listening=2]="Listening",I[I.Closed=3]="Closed",I[I.Disposed=4]="Disposed",zt(N,"createMessageConnection"),t.createMessageConnection=N}}),he=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;var e=ee();Object.defineProperty(t,"Message",{enumerable:!0,get:zt(function(){return e.Message},"get")}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:zt(function(){return e.RequestType},"get")}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:zt(function(){return e.RequestType0},"get")}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:zt(function(){return e.RequestType1},"get")}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:zt(function(){return e.RequestType2},"get")}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:zt(function(){return e.RequestType3},"get")}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:zt(function(){return e.RequestType4},"get")}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:zt(function(){return e.RequestType5},"get")}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:zt(function(){return e.RequestType6},"get")}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:zt(function(){return e.RequestType7},"get")}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:zt(function(){return e.RequestType8},"get")}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:zt(function(){return e.RequestType9},"get")}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:zt(function(){return e.ResponseError},"get")}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:zt(function(){return e.ErrorCodes},"get")}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:zt(function(){return e.NotificationType},"get")}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:zt(function(){return e.NotificationType0},"get")}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:zt(function(){return e.NotificationType1},"get")}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:zt(function(){return e.NotificationType2},"get")}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:zt(function(){return e.NotificationType3},"get")}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:zt(function(){return e.NotificationType4},"get")}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:zt(function(){return e.NotificationType5},"get")}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:zt(function(){return e.NotificationType6},"get")}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:zt(function(){return e.NotificationType7},"get")}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:zt(function(){return e.NotificationType8},"get")}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:zt(function(){return e.NotificationType9},"get")}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:zt(function(){return e.ParameterStructures},"get")});var r=re();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:zt(function(){return r.LinkedMap},"get")}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:zt(function(){return r.LRUCache},"get")}),Object.defineProperty(t,"Touch",{enumerable:!0,get:zt(function(){return r.Touch},"get")});var n=ne();Object.defineProperty(t,"Disposable",{enumerable:!0,get:zt(function(){return n.Disposable},"get")});var i=Jt();Object.defineProperty(t,"Event",{enumerable:!0,get:zt(function(){return i.Event},"get")}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:zt(function(){return i.Emitter},"get")});var a=te();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:zt(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:zt(function(){return a.CancellationToken},"get")});var o=ie();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:zt(function(){return o.SharedArraySenderStrategy},"get")}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:zt(function(){return o.SharedArrayReceiverStrategy},"get")});var s=oe();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:zt(function(){return s.MessageReader},"get")}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:zt(function(){return s.AbstractMessageReader},"get")}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:zt(function(){return s.ReadableStreamMessageReader},"get")});var l=se();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:zt(function(){return l.MessageWriter},"get")}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:zt(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:zt(function(){return l.WriteableStreamMessageWriter},"get")});var c=le();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:zt(function(){return c.AbstractMessageBuffer},"get")});var h=ce();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:zt(function(){return h.ConnectionStrategy},"get")}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:zt(function(){return h.ConnectionOptions},"get")}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:zt(function(){return h.NullLogger},"get")}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:zt(function(){return h.createMessageConnection},"get")}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:zt(function(){return h.ProgressToken},"get")}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:zt(function(){return h.ProgressType},"get")}),Object.defineProperty(t,"Trace",{enumerable:!0,get:zt(function(){return h.Trace},"get")}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:zt(function(){return h.TraceValues},"get")}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:zt(function(){return h.TraceFormat},"get")}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:zt(function(){return h.SetTraceNotification},"get")}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:zt(function(){return h.LogTraceNotification},"get")}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:zt(function(){return h.ConnectionErrors},"get")}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:zt(function(){return h.ConnectionError},"get")}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:zt(function(){return h.CancellationReceiverStrategy},"get")}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:zt(function(){return h.CancellationSenderStrategy},"get")}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:zt(function(){return h.CancellationStrategy},"get")}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:zt(function(){return h.MessageStrategy},"get")});var u=Zt();t.RAL=u.default}}),ue=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(t){Object.defineProperty(t,"__esModule",{value:!0});var e=he(),r=class t extends e.AbstractMessageBuffer{static{zt(this,"MessageBuffer")}constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return t.emptyBuffer}fromString(t,e){return(new TextEncoder).encode(t)}toString(t,e){return"ascii"===e?this.asciiDecoder.decode(t):new TextDecoder(e).decode(t)}asNative(t,e){return void 0===e?t:t.slice(0,e)}allocNative(t){return new Uint8Array(t)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{zt(this,"ReadableStreamWrapper")}constructor(t){this.socket=t,this._onData=new e.Emitter,this._messageListener=t=>{t.data.arrayBuffer().then(t=>{this._onData.fire(new Uint8Array(t))},()=>{(0,e.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),e.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),e.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),e.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},i=class{static{zt(this,"WritableStreamWrapper")}constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),e.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),e.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),e.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,e){if("string"==typeof t){if(void 0!==e&&"utf-8"!==e)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:zt(t=>new r(t),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:zt((t,e)=>{if("utf-8"!==e.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${e.charset}`);return Promise.resolve(a.encode(JSON.stringify(t,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:zt((t,e)=>{if(!(t instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(e.charset).decode(t)))},"decode")})}),stream:Object.freeze({asReadableStream:zt(t=>new n(t),"asReadableStream"),asWritableStream:zt(t=>new i(t),"asWritableStream")}),console,timer:Object.freeze({setTimeout(t,e,...r){const n=setTimeout(t,e,...r);return{dispose:zt(()=>clearTimeout(n),"dispose")}},setImmediate(t,...e){const r=setTimeout(t,0,...e);return{dispose:zt(()=>clearTimeout(r),"dispose")}},setInterval(t,e,...r){const n=setInterval(t,e,...r);return{dispose:zt(()=>clearInterval(n),"dispose")}}})});function s(){return o}zt(s,"RIL"),function(t){function r(){e.RAL.install(o)}zt(r,"install"),t.install=r}(s||(s={})),t.default=s}}),de=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(t){var e=t&&t.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:zt(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),r=t&&t.__exportStar||function(t,r){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||e(r,t,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,ue().default.install();var n=he();r(he(),t);var i=class extends n.AbstractMessageReader{static{zt(this,"BrowserMessageReader")}constructor(t){super(),this._onData=new n.Emitter,this._messageListener=t=>{this._onData.fire(t.data)},t.addEventListener("error",t=>this.fireError(t)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}};t.BrowserMessageReader=i;var a=class extends n.AbstractMessageWriter{static{zt(this,"BrowserMessageWriter")}constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",t=>this.fireError(t))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(e){return this.handleError(e,t),Promise.reject(e)}}handleError(t,e){this.errorCount++,this.fireError(t,e,this.errorCount)}end(){}};function o(t,e,r,i){return void 0===r&&(r=n.NullLogger),n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(t,e,r,i)}t.BrowserMessageWriter=a,zt(o,"createMessageConnection"),t.createMessageConnection=o}}),pe=Kt({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(t,e){e.exports=de()}}),fe=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;var e,r,n=de();(r=e||(t.MessageDirection=e={})).clientToServer="clientToServer",r.serverToClient="serverToClient",r.both="both";var i=class{static{zt(this,"RegistrationType")}constructor(t){this.method=t}};t.RegistrationType=i;var a=class extends n.RequestType0{static{zt(this,"ProtocolRequestType0")}constructor(t){super(t)}};t.ProtocolRequestType0=a;var o=class extends n.RequestType{static{zt(this,"ProtocolRequestType")}constructor(t){super(t,n.ParameterStructures.byName)}};t.ProtocolRequestType=o;var s=class extends n.NotificationType0{static{zt(this,"ProtocolNotificationType0")}constructor(t){super(t)}};t.ProtocolNotificationType0=s;var l=class extends n.NotificationType{static{zt(this,"ProtocolNotificationType")}constructor(t){super(t,n.ParameterStructures.byName)}};t.ProtocolNotificationType=l}}),ge=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(t){function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function o(t){return Array.isArray(t)}function s(t){return o(t)&&t.every(t=>r(t))}function l(t,e){return Array.isArray(t)&&t.every(e)}function c(t){return null!==t&&"object"==typeof t}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,zt(e,"boolean"),t.boolean=e,zt(r,"string"),t.string=r,zt(n,"number"),t.number=n,zt(i,"error"),t.error=i,zt(a,"func"),t.func=a,zt(o,"array"),t.array=o,zt(s,"stringArray"),t.stringArray=s,zt(l,"typedArray"),t.typedArray=l,zt(c,"objectLiteral"),t.objectLiteral=c}}),me=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;var e,r,n=fe();(r=e||(t.ImplementationRequest=e={})).method="textDocument/implementation",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),ye=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;var e,r,n=fe();(r=e||(t.TypeDefinitionRequest=e={})).method="textDocument/typeDefinition",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),ve=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;var e,r,n,i,a=fe();(r=e||(t.WorkspaceFoldersRequest=e={})).method="workspace/workspaceFolders",r.messageDirection=a.MessageDirection.serverToClient,r.type=new a.ProtocolRequestType0(r.method),(i=n||(t.DidChangeWorkspaceFoldersNotification=n={})).method="workspace/didChangeWorkspaceFolders",i.messageDirection=a.MessageDirection.clientToServer,i.type=new a.ProtocolNotificationType(i.method)}}),be=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;var e,r,n=fe();(r=e||(t.ConfigurationRequest=e={})).method="workspace/configuration",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),xe=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;var e,r,n,i,a=fe();(r=e||(t.DocumentColorRequest=e={})).method="textDocument/documentColor",r.messageDirection=a.MessageDirection.clientToServer,r.type=new a.ProtocolRequestType(r.method),(i=n||(t.ColorPresentationRequest=n={})).method="textDocument/colorPresentation",i.messageDirection=a.MessageDirection.clientToServer,i.type=new a.ProtocolRequestType(i.method)}}),Te=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;var e,r,n,i,a=fe();(r=e||(t.FoldingRangeRequest=e={})).method="textDocument/foldingRange",r.messageDirection=a.MessageDirection.clientToServer,r.type=new a.ProtocolRequestType(r.method),(i=n||(t.FoldingRangeRefreshRequest=n={})).method="workspace/foldingRange/refresh",i.messageDirection=a.MessageDirection.serverToClient,i.type=new a.ProtocolRequestType0(i.method)}}),we=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;var e,r,n=fe();(r=e||(t.DeclarationRequest=e={})).method="textDocument/declaration",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),ke=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;var e,r,n=fe();(r=e||(t.SelectionRangeRequest=e={})).method="textDocument/selectionRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Ce=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;var e,r,n,i,a,o=de(),s=fe();!function(t){function e(e){return e===t.type}t.type=new o.ProgressType,zt(e,"is"),t.is=e}(e||(t.WorkDoneProgress=e={})),(n=r||(t.WorkDoneProgressCreateRequest=r={})).method="window/workDoneProgress/create",n.messageDirection=s.MessageDirection.serverToClient,n.type=new s.ProtocolRequestType(n.method),(a=i||(t.WorkDoneProgressCancelNotification=i={})).method="window/workDoneProgress/cancel",a.messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolNotificationType(a.method)}}),Ee=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;var e,r,n,i,a,o,s=fe();(r=e||(t.CallHierarchyPrepareRequest=e={})).method="textDocument/prepareCallHierarchy",r.messageDirection=s.MessageDirection.clientToServer,r.type=new s.ProtocolRequestType(r.method),(i=n||(t.CallHierarchyIncomingCallsRequest=n={})).method="callHierarchy/incomingCalls",i.messageDirection=s.MessageDirection.clientToServer,i.type=new s.ProtocolRequestType(i.method),(o=a||(t.CallHierarchyOutgoingCallsRequest=a={})).method="callHierarchy/outgoingCalls",o.messageDirection=s.MessageDirection.clientToServer,o.type=new s.ProtocolRequestType(o.method)}}),Se=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;var e,r,n,i,a,o,s,l,c,h,u,d=fe();(e||(t.TokenFormat=e={})).Relative="relative",(n=r||(t.SemanticTokensRegistrationType=r={})).method="textDocument/semanticTokens",n.type=new d.RegistrationType(n.method),(a=i||(t.SemanticTokensRequest=i={})).method="textDocument/semanticTokens/full",a.messageDirection=d.MessageDirection.clientToServer,a.type=new d.ProtocolRequestType(a.method),a.registrationMethod=r.method,(s=o||(t.SemanticTokensDeltaRequest=o={})).method="textDocument/semanticTokens/full/delta",s.messageDirection=d.MessageDirection.clientToServer,s.type=new d.ProtocolRequestType(s.method),s.registrationMethod=r.method,(c=l||(t.SemanticTokensRangeRequest=l={})).method="textDocument/semanticTokens/range",c.messageDirection=d.MessageDirection.clientToServer,c.type=new d.ProtocolRequestType(c.method),c.registrationMethod=r.method,(u=h||(t.SemanticTokensRefreshRequest=h={})).method="workspace/semanticTokens/refresh",u.messageDirection=d.MessageDirection.serverToClient,u.type=new d.ProtocolRequestType0(u.method)}}),_e=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;var e,r,n=fe();(r=e||(t.ShowDocumentRequest=e={})).method="window/showDocument",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),Ae=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;var e,r,n=fe();(r=e||(t.LinkedEditingRangeRequest=e={})).method="textDocument/linkedEditingRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Re=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;var e,r,n,i,a,o,s,l,c,h,u,d,p,f,g=fe();(r=e||(t.FileOperationPatternKind=e={})).file="file",r.folder="folder",(i=n||(t.WillCreateFilesRequest=n={})).method="workspace/willCreateFiles",i.messageDirection=g.MessageDirection.clientToServer,i.type=new g.ProtocolRequestType(i.method),(o=a||(t.DidCreateFilesNotification=a={})).method="workspace/didCreateFiles",o.messageDirection=g.MessageDirection.clientToServer,o.type=new g.ProtocolNotificationType(o.method),(l=s||(t.WillRenameFilesRequest=s={})).method="workspace/willRenameFiles",l.messageDirection=g.MessageDirection.clientToServer,l.type=new g.ProtocolRequestType(l.method),(h=c||(t.DidRenameFilesNotification=c={})).method="workspace/didRenameFiles",h.messageDirection=g.MessageDirection.clientToServer,h.type=new g.ProtocolNotificationType(h.method),(d=u||(t.DidDeleteFilesNotification=u={})).method="workspace/didDeleteFiles",d.messageDirection=g.MessageDirection.clientToServer,d.type=new g.ProtocolNotificationType(d.method),(f=p||(t.WillDeleteFilesRequest=p={})).method="workspace/willDeleteFiles",f.messageDirection=g.MessageDirection.clientToServer,f.type=new g.ProtocolRequestType(f.method)}}),Le=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;var e,r,n,i,a,o,s=fe();(r=e||(t.UniquenessLevel=e={})).document="document",r.project="project",r.group="group",r.scheme="scheme",r.global="global",(i=n||(t.MonikerKind=n={})).$import="import",i.$export="export",i.local="local",(o=a||(t.MonikerRequest=a={})).method="textDocument/moniker",o.messageDirection=s.MessageDirection.clientToServer,o.type=new s.ProtocolRequestType(o.method)}}),Ie=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e,r,n,i,a,o,s=fe();(r=e||(t.TypeHierarchyPrepareRequest=e={})).method="textDocument/prepareTypeHierarchy",r.messageDirection=s.MessageDirection.clientToServer,r.type=new s.ProtocolRequestType(r.method),(i=n||(t.TypeHierarchySupertypesRequest=n={})).method="typeHierarchy/supertypes",i.messageDirection=s.MessageDirection.clientToServer,i.type=new s.ProtocolRequestType(i.method),(o=a||(t.TypeHierarchySubtypesRequest=a={})).method="typeHierarchy/subtypes",o.messageDirection=s.MessageDirection.clientToServer,o.type=new s.ProtocolRequestType(o.method)}}),De=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;var e,r,n,i,a=fe();(r=e||(t.InlineValueRequest=e={})).method="textDocument/inlineValue",r.messageDirection=a.MessageDirection.clientToServer,r.type=new a.ProtocolRequestType(r.method),(i=n||(t.InlineValueRefreshRequest=n={})).method="workspace/inlineValue/refresh",i.messageDirection=a.MessageDirection.serverToClient,i.type=new a.ProtocolRequestType0(i.method)}}),Ne=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;var e,r,n,i,a,o,s=fe();(r=e||(t.InlayHintRequest=e={})).method="textDocument/inlayHint",r.messageDirection=s.MessageDirection.clientToServer,r.type=new s.ProtocolRequestType(r.method),(i=n||(t.InlayHintResolveRequest=n={})).method="inlayHint/resolve",i.messageDirection=s.MessageDirection.clientToServer,i.type=new s.ProtocolRequestType(i.method),(o=a||(t.InlayHintRefreshRequest=a={})).method="workspace/inlayHint/refresh",o.messageDirection=s.MessageDirection.serverToClient,o.type=new s.ProtocolRequestType0(o.method)}}),Me=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;var e,r,n,i,a,o,s,l,c,h=de(),u=ge(),d=fe();!function(t){function e(t){const e=t;return e&&u.boolean(e.retriggerRequest)}zt(e,"is"),t.is=e}(e||(t.DiagnosticServerCancellationData=e={})),(n=r||(t.DocumentDiagnosticReportKind=r={})).Full="full",n.Unchanged="unchanged",(a=i||(t.DocumentDiagnosticRequest=i={})).method="textDocument/diagnostic",a.messageDirection=d.MessageDirection.clientToServer,a.type=new d.ProtocolRequestType(a.method),a.partialResult=new h.ProgressType,(s=o||(t.WorkspaceDiagnosticRequest=o={})).method="workspace/diagnostic",s.messageDirection=d.MessageDirection.clientToServer,s.type=new d.ProtocolRequestType(s.method),s.partialResult=new h.ProgressType,(c=l||(t.DiagnosticRefreshRequest=l={})).method="workspace/diagnostic/refresh",c.messageDirection=d.MessageDirection.serverToClient,c.type=new d.ProtocolRequestType0(c.method)}}),Oe=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;var e,r,n,i,a,o,s,l,c,h,u,d,p,f,g,m=(Xt(),Gt(Yt)),y=ge(),v=fe();!function(t){function e(t){return 1===t||2===t}t.Markup=1,t.Code=2,zt(e,"is"),t.is=e}(e||(t.NotebookCellKind=e={})),function(t){function e(t,e){const r={executionOrder:t};return!0!==e&&!1!==e||(r.success=e),r}function r(t){const e=t;return y.objectLiteral(e)&&m.uinteger.is(e.executionOrder)&&(void 0===e.success||y.boolean(e.success))}function n(t,e){return t===e||null!=t&&null!=e&&(t.executionOrder===e.executionOrder&&t.success===e.success)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r,zt(n,"equals"),t.equals=n}(r||(t.ExecutionSummary=r={})),function(t){function n(t,e){return{kind:t,document:e}}function i(t){const r=t;return y.objectLiteral(r)&&e.is(r.kind)&&m.DocumentUri.is(r.document)&&(void 0===r.metadata||y.objectLiteral(r.metadata))}function a(t,e){const n=new Set;return t.document!==e.document&&n.add("document"),t.kind!==e.kind&&n.add("kind"),t.executionSummary!==e.executionSummary&&n.add("executionSummary"),void 0===t.metadata&&void 0===e.metadata||o(t.metadata,e.metadata)||n.add("metadata"),void 0===t.executionSummary&&void 0===e.executionSummary||r.equals(t.executionSummary,e.executionSummary)||n.add("executionSummary"),n}function o(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(typeof t!=typeof e)return!1;if("object"!=typeof t)return!1;const r=Array.isArray(t),n=Array.isArray(e);if(r!==n)return!1;if(r&&n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!o(t[r],e[r]))return!1}if(y.objectLiteral(t)&&y.objectLiteral(e)){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;if(r.sort(),n.sort(),!o(r,n))return!1;for(let i=0;i<r.length;i++){const n=r[i];if(!o(t[n],e[n]))return!1}}return!0}zt(n,"create"),t.create=n,zt(i,"is"),t.is=i,zt(a,"diff"),t.diff=a,zt(o,"equalsMetadata")}(n||(t.NotebookCell=n={})),function(t){function e(t,e,r,n){return{uri:t,notebookType:e,version:r,cells:n}}function r(t){const e=t;return y.objectLiteral(e)&&y.string(e.uri)&&m.integer.is(e.version)&&y.typedArray(e.cells,n.is)}zt(e,"create"),t.create=e,zt(r,"is"),t.is=r}(i||(t.NotebookDocument=i={})),(o=a||(t.NotebookDocumentSyncRegistrationType=a={})).method="notebookDocument/sync",o.messageDirection=v.MessageDirection.clientToServer,o.type=new v.RegistrationType(o.method),(l=s||(t.DidOpenNotebookDocumentNotification=s={})).method="notebookDocument/didOpen",l.messageDirection=v.MessageDirection.clientToServer,l.type=new v.ProtocolNotificationType(l.method),l.registrationMethod=a.method,function(t){function e(t){const e=t;return y.objectLiteral(e)&&m.uinteger.is(e.start)&&m.uinteger.is(e.deleteCount)&&(void 0===e.cells||y.typedArray(e.cells,n.is))}function r(t,e,r){const n={start:t,deleteCount:e};return void 0!==r&&(n.cells=r),n}zt(e,"is"),t.is=e,zt(r,"create"),t.create=r}(c||(t.NotebookCellArrayChange=c={})),(u=h||(t.DidChangeNotebookDocumentNotification=h={})).method="notebookDocument/didChange",u.messageDirection=v.MessageDirection.clientToServer,u.type=new v.ProtocolNotificationType(u.method),u.registrationMethod=a.method,(p=d||(t.DidSaveNotebookDocumentNotification=d={})).method="notebookDocument/didSave",p.messageDirection=v.MessageDirection.clientToServer,p.type=new v.ProtocolNotificationType(p.method),p.registrationMethod=a.method,(g=f||(t.DidCloseNotebookDocumentNotification=f={})).method="notebookDocument/didClose",g.messageDirection=v.MessageDirection.clientToServer,g.type=new v.ProtocolNotificationType(g.method),g.registrationMethod=a.method}}),$e=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;var e,r,n=fe();(r=e||(t.InlineCompletionRequest=e={})).method="textDocument/inlineCompletion",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Pe=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=fe(),r=(Xt(),Gt(Yt)),n=ge(),i=me();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:zt(function(){return i.ImplementationRequest},"get")});var a=ye();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:zt(function(){return a.TypeDefinitionRequest},"get")});var o=ve();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:zt(function(){return o.WorkspaceFoldersRequest},"get")}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:zt(function(){return o.DidChangeWorkspaceFoldersNotification},"get")});var s=be();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:zt(function(){return s.ConfigurationRequest},"get")});var l=xe();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:zt(function(){return l.DocumentColorRequest},"get")}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:zt(function(){return l.ColorPresentationRequest},"get")});var c=Te();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:zt(function(){return c.FoldingRangeRequest},"get")}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:zt(function(){return c.FoldingRangeRefreshRequest},"get")});var h=we();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:zt(function(){return h.DeclarationRequest},"get")});var u=ke();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:zt(function(){return u.SelectionRangeRequest},"get")});var d=Ce();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:zt(function(){return d.WorkDoneProgress},"get")}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:zt(function(){return d.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:zt(function(){return d.WorkDoneProgressCancelNotification},"get")});var p=Ee();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:zt(function(){return p.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:zt(function(){return p.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:zt(function(){return p.CallHierarchyPrepareRequest},"get")});var f=Se();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:zt(function(){return f.TokenFormat},"get")}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:zt(function(){return f.SemanticTokensRequest},"get")}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:zt(function(){return f.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:zt(function(){return f.SemanticTokensRangeRequest},"get")}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:zt(function(){return f.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:zt(function(){return f.SemanticTokensRegistrationType},"get")});var g=_e();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:zt(function(){return g.ShowDocumentRequest},"get")});var m=Ae();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:zt(function(){return m.LinkedEditingRangeRequest},"get")});var y=Re();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:zt(function(){return y.FileOperationPatternKind},"get")}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:zt(function(){return y.DidCreateFilesNotification},"get")}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:zt(function(){return y.WillCreateFilesRequest},"get")}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:zt(function(){return y.DidRenameFilesNotification},"get")}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:zt(function(){return y.WillRenameFilesRequest},"get")}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:zt(function(){return y.DidDeleteFilesNotification},"get")}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:zt(function(){return y.WillDeleteFilesRequest},"get")});var v=Le();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:zt(function(){return v.UniquenessLevel},"get")}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:zt(function(){return v.MonikerKind},"get")}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:zt(function(){return v.MonikerRequest},"get")});var b=Ie();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:zt(function(){return b.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:zt(function(){return b.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:zt(function(){return b.TypeHierarchySupertypesRequest},"get")});var x=De();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:zt(function(){return x.InlineValueRequest},"get")}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:zt(function(){return x.InlineValueRefreshRequest},"get")});var T=Ne();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:zt(function(){return T.InlayHintRequest},"get")}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:zt(function(){return T.InlayHintResolveRequest},"get")}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:zt(function(){return T.InlayHintRefreshRequest},"get")});var w=Me();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:zt(function(){return w.DiagnosticServerCancellationData},"get")}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:zt(function(){return w.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:zt(function(){return w.DocumentDiagnosticRequest},"get")}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:zt(function(){return w.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:zt(function(){return w.DiagnosticRefreshRequest},"get")});var k=Oe();Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:zt(function(){return k.NotebookCellKind},"get")}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:zt(function(){return k.ExecutionSummary},"get")}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:zt(function(){return k.NotebookCell},"get")}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:zt(function(){return k.NotebookDocument},"get")}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:zt(function(){return k.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:zt(function(){return k.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:zt(function(){return k.NotebookCellArrayChange},"get")}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:zt(function(){return k.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:zt(function(){return k.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:zt(function(){return k.DidCloseNotebookDocumentNotification},"get")});var C,E,S,_,A,R,L,I,D,N,M,O,$,P,B,F,z,K,j,q,W,U,G,Y,V,H,X,Z,Q,J,tt,et,rt,nt,it,at,ot,st,lt,ct,ht,ut,dt,pt,ft,gt,mt,yt,vt,bt,xt,Tt,wt,kt,Ct,Et,St,_t,At,Rt,Lt,It,Dt,Nt,Mt,Ot,$t,Pt,Bt,Ft,Kt,jt,qt,Wt,Ut,Vt,Ht,Zt,Qt,Jt,te,ee,re,ne,ie,ae,oe,se,le,ce,he,ue,de,pe,Pe,Be,Fe,ze,Ke,je,qe,We,Ue,Ge,Ye,Ve,He,Xe,Ze,Qe,Je,tr,er,rr,nr,ir,ar,or,sr,lr=$e();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:zt(function(){return lr.InlineCompletionRequest},"get")}),function(t){function e(t){const e=t;return n.string(e)||n.string(e.language)||n.string(e.scheme)||n.string(e.pattern)}zt(e,"is"),t.is=e}(C||(t.TextDocumentFilter=C={})),function(t){function e(t){const e=t;return n.objectLiteral(e)&&(n.string(e.notebookType)||n.string(e.scheme)||n.string(e.pattern))}zt(e,"is"),t.is=e}(E||(t.NotebookDocumentFilter=E={})),function(t){function e(t){const e=t;return n.objectLiteral(e)&&(n.string(e.notebook)||E.is(e.notebook))&&(void 0===e.language||n.string(e.language))}zt(e,"is"),t.is=e}(S||(t.NotebookCellTextDocumentFilter=S={})),function(t){function e(t){if(!Array.isArray(t))return!1;for(let e of t)if(!n.string(e)&&!C.is(e)&&!S.is(e))return!1;return!0}zt(e,"is"),t.is=e}(_||(t.DocumentSelector=_={})),(R=A||(t.RegistrationRequest=A={})).method="client/registerCapability",R.messageDirection=e.MessageDirection.serverToClient,R.type=new e.ProtocolRequestType(R.method),(I=L||(t.UnregistrationRequest=L={})).method="client/unregisterCapability",I.messageDirection=e.MessageDirection.serverToClient,I.type=new e.ProtocolRequestType(I.method),(N=D||(t.ResourceOperationKind=D={})).Create="create",N.Rename="rename",N.Delete="delete",(O=M||(t.FailureHandlingKind=M={})).Abort="abort",O.Transactional="transactional",O.TextOnlyTransactional="textOnlyTransactional",O.Undo="undo",(P=$||(t.PositionEncodingKind=$={})).UTF8="utf-8",P.UTF16="utf-16",P.UTF32="utf-32",function(t){function e(t){const e=t;return e&&n.string(e.id)&&e.id.length>0}zt(e,"hasId"),t.hasId=e}(B||(t.StaticRegistrationOptions=B={})),function(t){function e(t){const e=t;return e&&(null===e.documentSelector||_.is(e.documentSelector))}zt(e,"is"),t.is=e}(F||(t.TextDocumentRegistrationOptions=F={})),function(t){function e(t){const e=t;return n.objectLiteral(e)&&(void 0===e.workDoneProgress||n.boolean(e.workDoneProgress))}function r(t){const e=t;return e&&n.boolean(e.workDoneProgress)}zt(e,"is"),t.is=e,zt(r,"hasWorkDoneProgress"),t.hasWorkDoneProgress=r}(z||(t.WorkDoneProgressOptions=z={})),(j=K||(t.InitializeRequest=K={})).method="initialize",j.messageDirection=e.MessageDirection.clientToServer,j.type=new e.ProtocolRequestType(j.method),(q||(t.InitializeErrorCodes=q={})).unknownProtocolVersion=1,(U=W||(t.InitializedNotification=W={})).method="initialized",U.messageDirection=e.MessageDirection.clientToServer,U.type=new e.ProtocolNotificationType(U.method),(Y=G||(t.ShutdownRequest=G={})).method="shutdown",Y.messageDirection=e.MessageDirection.clientToServer,Y.type=new e.ProtocolRequestType0(Y.method),(H=V||(t.ExitNotification=V={})).method="exit",H.messageDirection=e.MessageDirection.clientToServer,H.type=new e.ProtocolNotificationType0(H.method),(Z=X||(t.DidChangeConfigurationNotification=X={})).method="workspace/didChangeConfiguration",Z.messageDirection=e.MessageDirection.clientToServer,Z.type=new e.ProtocolNotificationType(Z.method),(J=Q||(t.MessageType=Q={})).Error=1,J.Warning=2,J.Info=3,J.Log=4,J.Debug=5,(et=tt||(t.ShowMessageNotification=tt={})).method="window/showMessage",et.messageDirection=e.MessageDirection.serverToClient,et.type=new e.ProtocolNotificationType(et.method),(nt=rt||(t.ShowMessageRequest=rt={})).method="window/showMessageRequest",nt.messageDirection=e.MessageDirection.serverToClient,nt.type=new e.ProtocolRequestType(nt.method),(at=it||(t.LogMessageNotification=it={})).method="window/logMessage",at.messageDirection=e.MessageDirection.serverToClient,at.type=new e.ProtocolNotificationType(at.method),(st=ot||(t.TelemetryEventNotification=ot={})).method="telemetry/event",st.messageDirection=e.MessageDirection.serverToClient,st.type=new e.ProtocolNotificationType(st.method),(ct=lt||(t.TextDocumentSyncKind=lt={})).None=0,ct.Full=1,ct.Incremental=2,(ut=ht||(t.DidOpenTextDocumentNotification=ht={})).method="textDocument/didOpen",ut.messageDirection=e.MessageDirection.clientToServer,ut.type=new e.ProtocolNotificationType(ut.method),function(t){function e(t){let e=t;return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}function r(t){let e=t;return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}zt(e,"isIncremental"),t.isIncremental=e,zt(r,"isFull"),t.isFull=r}(dt||(t.TextDocumentContentChangeEvent=dt={})),(ft=pt||(t.DidChangeTextDocumentNotification=pt={})).method="textDocument/didChange",ft.messageDirection=e.MessageDirection.clientToServer,ft.type=new e.ProtocolNotificationType(ft.method),(mt=gt||(t.DidCloseTextDocumentNotification=gt={})).method="textDocument/didClose",mt.messageDirection=e.MessageDirection.clientToServer,mt.type=new e.ProtocolNotificationType(mt.method),(vt=yt||(t.DidSaveTextDocumentNotification=yt={})).method="textDocument/didSave",vt.messageDirection=e.MessageDirection.clientToServer,vt.type=new e.ProtocolNotificationType(vt.method),(xt=bt||(t.TextDocumentSaveReason=bt={})).Manual=1,xt.AfterDelay=2,xt.FocusOut=3,(wt=Tt||(t.WillSaveTextDocumentNotification=Tt={})).method="textDocument/willSave",wt.messageDirection=e.MessageDirection.clientToServer,wt.type=new e.ProtocolNotificationType(wt.method),(Ct=kt||(t.WillSaveTextDocumentWaitUntilRequest=kt={})).method="textDocument/willSaveWaitUntil",Ct.messageDirection=e.MessageDirection.clientToServer,Ct.type=new e.ProtocolRequestType(Ct.method),(St=Et||(t.DidChangeWatchedFilesNotification=Et={})).method="workspace/didChangeWatchedFiles",St.messageDirection=e.MessageDirection.clientToServer,St.type=new e.ProtocolNotificationType(St.method),(At=_t||(t.FileChangeType=_t={})).Created=1,At.Changed=2,At.Deleted=3,function(t){function e(t){const e=t;return n.objectLiteral(e)&&(r.URI.is(e.baseUri)||r.WorkspaceFolder.is(e.baseUri))&&n.string(e.pattern)}zt(e,"is"),t.is=e}(Rt||(t.RelativePattern=Rt={})),(It=Lt||(t.WatchKind=Lt={})).Create=1,It.Change=2,It.Delete=4,(Nt=Dt||(t.PublishDiagnosticsNotification=Dt={})).method="textDocument/publishDiagnostics",Nt.messageDirection=e.MessageDirection.serverToClient,Nt.type=new e.ProtocolNotificationType(Nt.method),(Ot=Mt||(t.CompletionTriggerKind=Mt={})).Invoked=1,Ot.TriggerCharacter=2,Ot.TriggerForIncompleteCompletions=3,(Pt=$t||(t.CompletionRequest=$t={})).method="textDocument/completion",Pt.messageDirection=e.MessageDirection.clientToServer,Pt.type=new e.ProtocolRequestType(Pt.method),(Ft=Bt||(t.CompletionResolveRequest=Bt={})).method="completionItem/resolve",Ft.messageDirection=e.MessageDirection.clientToServer,Ft.type=new e.ProtocolRequestType(Ft.method),(jt=Kt||(t.HoverRequest=Kt={})).method="textDocument/hover",jt.messageDirection=e.MessageDirection.clientToServer,jt.type=new e.ProtocolRequestType(jt.method),(Wt=qt||(t.SignatureHelpTriggerKind=qt={})).Invoked=1,Wt.TriggerCharacter=2,Wt.ContentChange=3,(Vt=Ut||(t.SignatureHelpRequest=Ut={})).method="textDocument/signatureHelp",Vt.messageDirection=e.MessageDirection.clientToServer,Vt.type=new e.ProtocolRequestType(Vt.method),(Zt=Ht||(t.DefinitionRequest=Ht={})).method="textDocument/definition",Zt.messageDirection=e.MessageDirection.clientToServer,Zt.type=new e.ProtocolRequestType(Zt.method),(Jt=Qt||(t.ReferencesRequest=Qt={})).method="textDocument/references",Jt.messageDirection=e.MessageDirection.clientToServer,Jt.type=new e.ProtocolRequestType(Jt.method),(ee=te||(t.DocumentHighlightRequest=te={})).method="textDocument/documentHighlight",ee.messageDirection=e.MessageDirection.clientToServer,ee.type=new e.ProtocolRequestType(ee.method),(ne=re||(t.DocumentSymbolRequest=re={})).method="textDocument/documentSymbol",ne.messageDirection=e.MessageDirection.clientToServer,ne.type=new e.ProtocolRequestType(ne.method),(ae=ie||(t.CodeActionRequest=ie={})).method="textDocument/codeAction",ae.messageDirection=e.MessageDirection.clientToServer,ae.type=new e.ProtocolRequestType(ae.method),(se=oe||(t.CodeActionResolveRequest=oe={})).method="codeAction/resolve",se.messageDirection=e.MessageDirection.clientToServer,se.type=new e.ProtocolRequestType(se.method),(ce=le||(t.WorkspaceSymbolRequest=le={})).method="workspace/symbol",ce.messageDirection=e.MessageDirection.clientToServer,ce.type=new e.ProtocolRequestType(ce.method),(ue=he||(t.WorkspaceSymbolResolveRequest=he={})).method="workspaceSymbol/resolve",ue.messageDirection=e.MessageDirection.clientToServer,ue.type=new e.ProtocolRequestType(ue.method),(pe=de||(t.CodeLensRequest=de={})).method="textDocument/codeLens",pe.messageDirection=e.MessageDirection.clientToServer,pe.type=new e.ProtocolRequestType(pe.method),(Be=Pe||(t.CodeLensResolveRequest=Pe={})).method="codeLens/resolve",Be.messageDirection=e.MessageDirection.clientToServer,Be.type=new e.ProtocolRequestType(Be.method),(ze=Fe||(t.CodeLensRefreshRequest=Fe={})).method="workspace/codeLens/refresh",ze.messageDirection=e.MessageDirection.serverToClient,ze.type=new e.ProtocolRequestType0(ze.method),(je=Ke||(t.DocumentLinkRequest=Ke={})).method="textDocument/documentLink",je.messageDirection=e.MessageDirection.clientToServer,je.type=new e.ProtocolRequestType(je.method),(We=qe||(t.DocumentLinkResolveRequest=qe={})).method="documentLink/resolve",We.messageDirection=e.MessageDirection.clientToServer,We.type=new e.ProtocolRequestType(We.method),(Ge=Ue||(t.DocumentFormattingRequest=Ue={})).method="textDocument/formatting",Ge.messageDirection=e.MessageDirection.clientToServer,Ge.type=new e.ProtocolRequestType(Ge.method),(Ve=Ye||(t.DocumentRangeFormattingRequest=Ye={})).method="textDocument/rangeFormatting",Ve.messageDirection=e.MessageDirection.clientToServer,Ve.type=new e.ProtocolRequestType(Ve.method),(Xe=He||(t.DocumentRangesFormattingRequest=He={})).method="textDocument/rangesFormatting",Xe.messageDirection=e.MessageDirection.clientToServer,Xe.type=new e.ProtocolRequestType(Xe.method),(Qe=Ze||(t.DocumentOnTypeFormattingRequest=Ze={})).method="textDocument/onTypeFormatting",Qe.messageDirection=e.MessageDirection.clientToServer,Qe.type=new e.ProtocolRequestType(Qe.method),(Je||(t.PrepareSupportDefaultBehavior=Je={})).Identifier=1,(er=tr||(t.RenameRequest=tr={})).method="textDocument/rename",er.messageDirection=e.MessageDirection.clientToServer,er.type=new e.ProtocolRequestType(er.method),(nr=rr||(t.PrepareRenameRequest=rr={})).method="textDocument/prepareRename",nr.messageDirection=e.MessageDirection.clientToServer,nr.type=new e.ProtocolRequestType(nr.method),(ar=ir||(t.ExecuteCommandRequest=ir={})).method="workspace/executeCommand",ar.messageDirection=e.MessageDirection.clientToServer,ar.type=new e.ProtocolRequestType(ar.method),(sr=or||(t.ApplyWorkspaceEditRequest=or={})).method="workspace/applyEdit",sr.messageDirection=e.MessageDirection.serverToClient,sr.type=new e.ProtocolRequestType("workspace/applyEdit")}}),Be=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var e=de();function r(t,r,n,i){return e.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,e.createMessageConnection)(t,r,n,i)}zt(r,"createProtocolConnection"),t.createProtocolConnection=r}}),Fe=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(t){var e=t&&t.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:zt(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),r=t&&t.__exportStar||function(t,r){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||e(r,t,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(de(),t),r((Xt(),Gt(Yt)),t),r(fe(),t),r(Pe(),t);var n,i,a=Be();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:zt(function(){return a.createProtocolConnection},"get")}),(i=n||(t.LSPErrorCodes=n={})).lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800}}),ze=Kt({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(t){var e=t&&t.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:zt(function(){return e[r]},"get")}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),r=t&&t.__exportStar||function(t,r){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||e(r,t,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var n=pe();function i(t,e,r,i){return(0,n.createMessageConnection)(t,e,r,i)}r(pe(),t),r(Fe(),t),zt(i,"createProtocolConnection"),t.createProtocolConnection=i}}),Ke={};jt(Ke,{AbstractAstReflection:()=>Ve,AbstractCstNode:()=>f_,AbstractLangiumParser:()=>w_,AbstractParserErrorMessageProvider:()=>C_,AbstractThreadedAsyncParser:()=>QR,AstUtils:()=>or,BiMap:()=>DA,Cancellation:()=>tA,CompositeCstNodeImpl:()=>m_,ContextCache:()=>zA,CstNodeBuilder:()=>p_,CstUtils:()=>je,DEFAULT_TOKENIZE_OPTIONS:()=>mR,DONE_RESULT:()=>rr,DatatypeSymbol:()=>b_,DefaultAstNodeDescriptionProvider:()=>aR,DefaultAstNodeLocator:()=>sR,DefaultAsyncParser:()=>ZR,DefaultCommentProvider:()=>XR,DefaultConfigurationProvider:()=>hR,DefaultDocumentBuilder:()=>dR,DefaultDocumentValidator:()=>eR,DefaultHydrator:()=>eL,DefaultIndexManager:()=>pR,DefaultJsonSerializer:()=>VA,DefaultLangiumDocumentFactory:()=>CA,DefaultLangiumDocuments:()=>EA,DefaultLangiumProfiler:()=>NL,DefaultLexer:()=>yR,DefaultLexerErrorMessageProvider:()=>gR,DefaultLinker:()=>_A,DefaultNameProvider:()=>RA,DefaultReferenceDescriptionProvider:()=>oR,DefaultReferences:()=>LA,DefaultScopeComputation:()=>NA,DefaultScopeProvider:()=>qA,DefaultServiceRegistry:()=>HA,DefaultTokenBuilder:()=>Q_,DefaultValueConverter:()=>J_,DefaultWorkspaceLock:()=>tL,DefaultWorkspaceManager:()=>fR,Deferred:()=>uA,Disposable:()=>cR,DisposableCache:()=>BA,DocumentCache:()=>KA,DocumentState:()=>TA,DocumentValidator:()=>ZA,EMPTY_SCOPE:()=>PA,EMPTY_STREAM:()=>er,EmptyFileSystem:()=>vL,EmptyFileSystemProvider:()=>yL,ErrorWithLocation:()=>Wi,GrammarAST:()=>Tr,GrammarUtils:()=>qi,IndentationAwareLexer:()=>gL,IndentationAwareTokenBuilder:()=>fL,JSDocDocumentationProvider:()=>HR,LangiumCompletionParser:()=>S_,LangiumParser:()=>k_,LangiumParserErrorMessageProvider:()=>E_,LeafCstNodeImpl:()=>g_,LexingMode:()=>uL,MapScope:()=>OA,Module:()=>VR,MultiMap:()=>IA,MultiMapScope:()=>$A,OperationCancelled:()=>oA,ParserWorker:()=>JR,ProfilingTask:()=>ML,Reduction:()=>ir,RefResolving:()=>SA,RegExpUtils:()=>Yi,RootCstNodeImpl:()=>v_,SimpleCache:()=>FA,StreamImpl:()=>Qe,StreamScope:()=>MA,TextDocument:()=>cA,TreeStreamImpl:()=>ar,URI:()=>bA,UriTrie:()=>kA,UriUtils:()=>vA,VALIDATE_EACH_NODE:()=>tR,ValidationCategory:()=>GA,ValidationRegistry:()=>JA,ValueConverter:()=>Z_,WorkspaceCache:()=>jA,assertCondition:()=>Gi,assertUnreachable:()=>Ui,createCompletionParser:()=>V_,createDefaultCoreModule:()=>rL,createDefaultSharedCoreModule:()=>nL,createGrammarConfig:()=>io,createLangiumParser:()=>H_,createParser:()=>L_,delayNextTick:()=>eA,diagnosticData:()=>XA,eagerLoad:()=>oL,getDiagnosticRange:()=>rR,indentationBuilderDefaultOptions:()=>pL,inject:()=>iL,interruptAndCheck:()=>lA,isAstNode:()=>qe,isAstNodeDescription:()=>Ge,isAstNodeWithComment:()=>WA,isCompositeCstNode:()=>He,isIMultiModeLexerDefinition:()=>bR,isJSDoc:()=>wR,isLeafCstNode:()=>Xe,isLinkingError:()=>Ye,isMultiReference:()=>Ue,isNamed:()=>AA,isOperationCancelled:()=>sA,isReference:()=>We,isRootCstNode:()=>Ze,isTokenTypeArray:()=>vR,isTokenTypeDictionary:()=>xR,loadGrammarFromJson:()=>wL,parseJSDoc:()=>TR,prepareLangiumParser:()=>X_,setInterruptionPeriod:()=>aA,startCancelableOperation:()=>iA,stream:()=>nr,toDiagnosticData:()=>iR,toDiagnosticSeverity:()=>nR});var je={};function qe(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function We(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText&&"ref"in t}function Ue(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText&&"items"in t}function Ge(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function Ye(t){return"object"==typeof t&&null!==t&&"object"==typeof t.info&&"string"==typeof t.message}jt(je,{DefaultNameRegexp:()=>Li,RangeComparison:()=>vi,compareRange:()=>Ai,findCommentNode:()=>Di,findDeclarationNodeAtOffset:()=>Ii,findLeafNodeAtOffset:()=>Mi,findLeafNodeBeforeOffset:()=>Oi,flattenCst:()=>Ci,getDatatypeNode:()=>wi,getInteriorNodes:()=>zi,getNextNode:()=>Bi,getPreviousNode:()=>Pi,getStartlineNode:()=>Fi,inRange:()=>Ri,isChildNode:()=>Ei,isCommentNode:()=>Ni,streamCst:()=>ki,toDocumentSegment:()=>_i,tokenToRange:()=>Si}),zt(qe,"isAstNode"),zt(We,"isReference"),zt(Ue,"isMultiReference"),zt(Ge,"isAstNodeDescription"),zt(Ye,"isLinkingError");var Ve=class{static{zt(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(t){const e=this.types[t.container.$type];if(!e)throw new Error(`Type ${t.container.$type||"undefined"} not found.`);const r=e.properties[t.property]?.referenceType;if(!r)throw new Error(`Property ${t.property||"undefined"} of type ${t.container.$type} is not a reference.`);return r}getTypeMetaData(t){const e=this.types[t];return e||{name:t,properties:{},superTypes:[]}}isInstance(t,e){return qe(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){if(t===e)return!0;let r=this.subtypes[t];r||(r=this.subtypes[t]={});const n=r[e];if(void 0!==n)return n;{const n=this.types[t],i=!!n&&n.superTypes.some(t=>this.isSubtype(t,e));return r[e]=i,i}}getAllSubTypes(t){const e=this.allSubtypes[t];if(e)return e;{const e=this.getAllTypes(),r=[];for(const n of e)this.isSubtype(n,t)&&r.push(n);return this.allSubtypes[t]=r,r}}};function He(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function Xe(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function Ze(t){return He(t)&&"string"==typeof t.fullText}zt(He,"isCompositeCstNode"),zt(Xe,"isLeafCstNode"),zt(Ze,"isRootCstNode");var Qe=class t{static{zt(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){const t={state:this.startFn(),next:zt(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){const t=this.iterator();return Boolean(t.next().done)}count(){const t=this.iterator();let e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){const t=[],e=this.iterator();let r;do{r=e.next(),void 0!==r.value&&t.push(r.value)}while(!r.done);return t}toSet(){return new Set(this)}toMap(t,e){const r=this.map(r=>[t?t(r):r,e?e(r):r]);return new Map(r)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(e=this.nextFn(t.first),!e.done)return e}while(!e.done);t.firstDone=!0}do{if(e=t.iterator.next(),!e.done)return e}while(!e.done);return rr})}join(t=","){const e=this.iterator();let r,n="",i=!1;do{r=e.next(),r.done||(i&&(n+=t),n+=Je(r.value)),i=!0}while(!r.done);return n}indexOf(t,e=0){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(e){return new t(this.startFn,t=>{const{done:r,value:n}=this.nextFn(t);return r?rr:{done:!1,value:e(n)}})}filter(e){return new t(this.startFn,t=>{let r;do{if(r=this.nextFn(t),!r.done&&e(r.value))return r}while(!r.done);return rr})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){const r=this.iterator();let n=e,i=r.next();for(;!i.done;)n=void 0===n?i.value:t(n,i.value),i=r.next();return n}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){const n=t.next();if(n.done)return r;const i=this.recursiveReduce(t,e,r);return void 0===i?n.value:e(i,n.value)}find(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){const e=this.iterator();let r=0,n=e.next();for(;!n.done;){if(t(n.value))return r;n=e.next(),r++}return-1}includes(t){const e=this.iterator();let r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:r,value:n}=this.nextFn(t.this);if(!r){const r=e(n);if(!tr(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return rr})}flat(e){if(void 0===e&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:e,value:n}=r.nextFn(t.this);if(!e){if(!tr(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return rr})}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(e=1){return new t(()=>{const t=this.startFn();for(let r=0;r<e;r++){if(this.nextFn(t).done)return t}return t},this.nextFn)}limit(e){return new t(()=>({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?rr:this.nextFn(t.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),t=>{let r;do{if(r=this.nextFn(t.internalState),!r.done){const n=e?e(r.value):r.value;if(!t.set.has(n))return t.set.add(n),r}}while(!r.done);return rr})}exclude(t,e){const r=new Set;for(const n of t){const t=e?e(n):n;r.add(t)}return this.filter(t=>{const n=e?e(t):t;return!r.has(n)})}};function Je(t){return"string"==typeof t?t:void 0===t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function tr(t){return!!t&&"function"==typeof t[Symbol.iterator]}zt(Je,"toString"),zt(tr,"isIterable");var er=new Qe(()=>{},()=>rr),rr=Object.freeze({done:!0,value:void 0});function nr(...t){if(1===t.length){const e=t[0];if(e instanceof Qe)return e;if(tr(e))return new Qe(()=>e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new Qe(()=>({index:0}),t=>t.index<e.length?{done:!1,value:e[t.index++]}:rr)}return t.length>1?new Qe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];tr(r)?e.iterator=r[Symbol.iterator]():r&&"number"==typeof r.length&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return rr}):er}zt(nr,"stream");var ir,ar=class extends Qe{static{zt(this,"TreeStreamImpl")}constructor(t,e,r){super(()=>({iterators:r?.includeRoot?[[t][Symbol.iterator]()]:[e(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);t.iterators.length>0;){const r=t.iterators[t.iterators.length-1].next();if(!r.done)return t.iterators.push(e(r.value)[Symbol.iterator]()),r;t.iterators.pop()}return rr})}iterator(){const t={state:this.startFn(),next:zt(()=>this.nextFn(t.state),"next"),prune:zt(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}};!function(t){function e(t){return t.reduce((t,e)=>t+e,0)}function r(t){return t.reduce((t,e)=>t*e,0)}function n(t){return t.reduce((t,e)=>Math.min(t,e))}function i(t){return t.reduce((t,e)=>Math.max(t,e))}zt(e,"sum"),t.sum=e,zt(r,"product"),t.product=r,zt(n,"min"),t.min=n,zt(i,"max"),t.max=i}(ir||(ir={}));var or={};function sr(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((n,i)=>{qe(n)&&(n.$container=t,n.$containerProperty=r,n.$containerIndex=i,e.deep&&sr(n,e))}):qe(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&sr(n,e)))}function lr(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function cr(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function hr(t){const e=ur(t).$document;if(!e)throw new Error("AST node has no document.");return e}function ur(t){for(;t.$container;)t=t.$container;return t}function dr(t){return We(t)?t.ref?[t.ref]:[]:Ue(t)?t.items.map(t=>t.ref):[]}function pr(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e?.range;return new Qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const i=t[n];if(qe(i)){if(e.keyIndex++,mr(i,r))return{done:!1,value:i}}else if(Array.isArray(i)){for(;e.arrayIndex<i.length;){const t=i[e.arrayIndex++];if(qe(t)&&mr(t,r))return{done:!1,value:t}}e.arrayIndex=0}}e.keyIndex++}return rr})}function fr(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new ar(t,t=>pr(t,e))}function gr(t,e){if(!t)throw new Error("Root node must be an AstNode.");return e?.range&&!mr(t,e.range)?new ar(t,()=>[]):new ar(t,t=>pr(t,e),{includeRoot:!0})}function mr(t,e){if(!e)return!0;const r=t.$cstNode?.range;return!!r&&Ri(r,e)}function yr(t){return new Qe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(We(n)||Ue(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(We(a)||Ue(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return rr})}function vr(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))void 0!==i.defaultValue&&void 0===n[i.name]&&(n[i.name]=br(i.defaultValue))}function br(t){return Array.isArray(t)?[...t.map(br)]:t}function xr(t,e,r){const n={$type:t.$type};r&&(r.set(t,n),r.set(n,t));for(const[i,a]of Object.entries(t))if(!i.startsWith("$"))if(qe(a))n[i]=xr(a,e,r);else if(We(a))n[i]=e(n,i,a.$refNode,a.$refText,a);else if(Array.isArray(a)){const t=[];for(const o of a)qe(o)?t.push(xr(o,e,r)):We(o)?t.push(e(n,i,o.$refNode,o.$refText,o)):t.push(o);n[i]=t}else n[i]=a;return sr(n,{deep:!0}),n}jt(or,{assignMandatoryProperties:()=>vr,copyAstNode:()=>xr,findRootNode:()=>ur,getContainerOfType:()=>lr,getDocument:()=>hr,getReferenceNodes:()=>dr,hasContainerOfType:()=>cr,linkContentToContainer:()=>sr,streamAllContents:()=>fr,streamAst:()=>gr,streamContents:()=>pr,streamReferences:()=>yr}),zt(sr,"linkContentToContainer"),zt(lr,"getContainerOfType"),zt(cr,"hasContainerOfType"),zt(hr,"getDocument"),zt(ur,"findRootNode"),zt(dr,"getReferenceNodes"),zt(pr,"streamContents"),zt(fr,"streamAllContents"),zt(gr,"streamAst"),zt(mr,"isAstNodeInRange"),zt(yr,"streamReferences"),zt(vr,"assignMandatoryProperties"),zt(br,"copyDefaultValue"),zt(xr,"copyAstNode");var Tr={};jt(Tr,{AbstractElement:()=>kr,AbstractParserRule:()=>Er,AbstractRule:()=>_r,AbstractType:()=>Rr,Action:()=>Ir,Alternatives:()=>Nr,ArrayLiteral:()=>Or,ArrayType:()=>Pr,Assignment:()=>Fr,BooleanLiteral:()=>Kr,CharacterRange:()=>qr,Condition:()=>Ur,Conjunction:()=>Yr,CrossReference:()=>Hr,Disjunction:()=>Zr,EndOfFile:()=>Jr,Grammar:()=>en,GrammarImport:()=>nn,Group:()=>on,InferredType:()=>ln,InfixRule:()=>hn,InfixRuleOperatorList:()=>dn,InfixRuleOperators:()=>fn,Interface:()=>mn,Keyword:()=>vn,LangiumGrammarAstReflection:()=>xi,LangiumGrammarTerminals:()=>wr,NamedArgument:()=>xn,NegatedToken:()=>wn,Negation:()=>Cn,NumberLiteral:()=>Sn,Parameter:()=>An,ParameterReference:()=>Ln,ParserRule:()=>Dn,ReferenceType:()=>Mn,RegexToken:()=>$n,ReturnType:()=>Bn,RuleCall:()=>zn,SimpleType:()=>jn,StringLiteral:()=>Wn,TerminalAlternatives:()=>Gn,TerminalElement:()=>Vn,TerminalGroup:()=>Xn,TerminalRule:()=>Qn,TerminalRuleCall:()=>ti,Type:()=>ri,TypeAttribute:()=>ii,TypeDefinition:()=>oi,UnionType:()=>li,UnorderedGroup:()=>hi,UntilToken:()=>di,ValueLiteral:()=>fi,Wildcard:()=>mi,isAbstractElement:()=>Cr,isAbstractParserRule:()=>Sr,isAbstractRule:()=>Ar,isAbstractType:()=>Lr,isAction:()=>Dr,isAlternatives:()=>Mr,isArrayLiteral:()=>$r,isArrayType:()=>Br,isAssignment:()=>zr,isBooleanLiteral:()=>jr,isCharacterRange:()=>Wr,isCondition:()=>Gr,isConjunction:()=>Vr,isCrossReference:()=>Xr,isDisjunction:()=>Qr,isEndOfFile:()=>tn,isGrammar:()=>rn,isGrammarImport:()=>an,isGroup:()=>sn,isInferredType:()=>cn,isInfixRule:()=>un,isInfixRuleOperatorList:()=>pn,isInfixRuleOperators:()=>gn,isInterface:()=>yn,isKeyword:()=>bn,isNamedArgument:()=>Tn,isNegatedToken:()=>kn,isNegation:()=>En,isNumberLiteral:()=>_n,isParameter:()=>Rn,isParameterReference:()=>In,isParserRule:()=>Nn,isReferenceType:()=>On,isRegexToken:()=>Pn,isReturnType:()=>Fn,isRuleCall:()=>Kn,isSimpleType:()=>qn,isStringLiteral:()=>Un,isTerminalAlternatives:()=>Yn,isTerminalElement:()=>Hn,isTerminalGroup:()=>Zn,isTerminalRule:()=>Jn,isTerminalRuleCall:()=>ei,isType:()=>ni,isTypeAttribute:()=>ai,isTypeDefinition:()=>si,isUnionType:()=>ci,isUnorderedGroup:()=>ui,isUntilToken:()=>pi,isValueLiteral:()=>gi,isWildcard:()=>yi,reflection:()=>Ti});var wr={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},kr={$type:"AbstractElement",cardinality:"cardinality"};function Cr(t){return Ti.isInstance(t,kr.$type)}zt(Cr,"isAbstractElement");var Er={$type:"AbstractParserRule"};function Sr(t){return Ti.isInstance(t,Er.$type)}zt(Sr,"isAbstractParserRule");var _r={$type:"AbstractRule"};function Ar(t){return Ti.isInstance(t,_r.$type)}zt(Ar,"isAbstractRule");var Rr={$type:"AbstractType"};function Lr(t){return Ti.isInstance(t,Rr.$type)}zt(Lr,"isAbstractType");var Ir={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Dr(t){return Ti.isInstance(t,Ir.$type)}zt(Dr,"isAction");var Nr={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Mr(t){return Ti.isInstance(t,Nr.$type)}zt(Mr,"isAlternatives");var Or={$type:"ArrayLiteral",elements:"elements"};function $r(t){return Ti.isInstance(t,Or.$type)}zt($r,"isArrayLiteral");var Pr={$type:"ArrayType",elementType:"elementType"};function Br(t){return Ti.isInstance(t,Pr.$type)}zt(Br,"isArrayType");var Fr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zr(t){return Ti.isInstance(t,Fr.$type)}zt(zr,"isAssignment");var Kr={$type:"BooleanLiteral",true:"true"};function jr(t){return Ti.isInstance(t,Kr.$type)}zt(jr,"isBooleanLiteral");var qr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Wr(t){return Ti.isInstance(t,qr.$type)}zt(Wr,"isCharacterRange");var Ur={$type:"Condition"};function Gr(t){return Ti.isInstance(t,Ur.$type)}zt(Gr,"isCondition");var Yr={$type:"Conjunction",left:"left",right:"right"};function Vr(t){return Ti.isInstance(t,Yr.$type)}zt(Vr,"isConjunction");var Hr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Xr(t){return Ti.isInstance(t,Hr.$type)}zt(Xr,"isCrossReference");var Zr={$type:"Disjunction",left:"left",right:"right"};function Qr(t){return Ti.isInstance(t,Zr.$type)}zt(Qr,"isDisjunction");var Jr={$type:"EndOfFile",cardinality:"cardinality"};function tn(t){return Ti.isInstance(t,Jr.$type)}zt(tn,"isEndOfFile");var en={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function rn(t){return Ti.isInstance(t,en.$type)}zt(rn,"isGrammar");var nn={$type:"GrammarImport",path:"path"};function an(t){return Ti.isInstance(t,nn.$type)}zt(an,"isGrammarImport");var on={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function sn(t){return Ti.isInstance(t,on.$type)}zt(sn,"isGroup");var ln={$type:"InferredType",name:"name"};function cn(t){return Ti.isInstance(t,ln.$type)}zt(cn,"isInferredType");var hn={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function un(t){return Ti.isInstance(t,hn.$type)}zt(un,"isInfixRule");var dn={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function pn(t){return Ti.isInstance(t,dn.$type)}zt(pn,"isInfixRuleOperatorList");var fn={$type:"InfixRuleOperators",precedences:"precedences"};function gn(t){return Ti.isInstance(t,fn.$type)}zt(gn,"isInfixRuleOperators");var mn={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function yn(t){return Ti.isInstance(t,mn.$type)}zt(yn,"isInterface");var vn={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function bn(t){return Ti.isInstance(t,vn.$type)}zt(bn,"isKeyword");var xn={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function Tn(t){return Ti.isInstance(t,xn.$type)}zt(Tn,"isNamedArgument");var wn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function kn(t){return Ti.isInstance(t,wn.$type)}zt(kn,"isNegatedToken");var Cn={$type:"Negation",value:"value"};function En(t){return Ti.isInstance(t,Cn.$type)}zt(En,"isNegation");var Sn={$type:"NumberLiteral",value:"value"};function _n(t){return Ti.isInstance(t,Sn.$type)}zt(_n,"isNumberLiteral");var An={$type:"Parameter",name:"name"};function Rn(t){return Ti.isInstance(t,An.$type)}zt(Rn,"isParameter");var Ln={$type:"ParameterReference",parameter:"parameter"};function In(t){return Ti.isInstance(t,Ln.$type)}zt(In,"isParameterReference");var Dn={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Nn(t){return Ti.isInstance(t,Dn.$type)}zt(Nn,"isParserRule");var Mn={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function On(t){return Ti.isInstance(t,Mn.$type)}zt(On,"isReferenceType");var $n={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Pn(t){return Ti.isInstance(t,$n.$type)}zt(Pn,"isRegexToken");var Bn={$type:"ReturnType",name:"name"};function Fn(t){return Ti.isInstance(t,Bn.$type)}zt(Fn,"isReturnType");var zn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Kn(t){return Ti.isInstance(t,zn.$type)}zt(Kn,"isRuleCall");var jn={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function qn(t){return Ti.isInstance(t,jn.$type)}zt(qn,"isSimpleType");var Wn={$type:"StringLiteral",value:"value"};function Un(t){return Ti.isInstance(t,Wn.$type)}zt(Un,"isStringLiteral");var Gn={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Yn(t){return Ti.isInstance(t,Gn.$type)}zt(Yn,"isTerminalAlternatives");var Vn={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Hn(t){return Ti.isInstance(t,Vn.$type)}zt(Hn,"isTerminalElement");var Xn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Zn(t){return Ti.isInstance(t,Xn.$type)}zt(Zn,"isTerminalGroup");var Qn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Jn(t){return Ti.isInstance(t,Qn.$type)}zt(Jn,"isTerminalRule");var ti={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function ei(t){return Ti.isInstance(t,ti.$type)}zt(ei,"isTerminalRuleCall");var ri={$type:"Type",name:"name",type:"type"};function ni(t){return Ti.isInstance(t,ri.$type)}zt(ni,"isType");var ii={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function ai(t){return Ti.isInstance(t,ii.$type)}zt(ai,"isTypeAttribute");var oi={$type:"TypeDefinition"};function si(t){return Ti.isInstance(t,oi.$type)}zt(si,"isTypeDefinition");var li={$type:"UnionType",types:"types"};function ci(t){return Ti.isInstance(t,li.$type)}zt(ci,"isUnionType");var hi={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function ui(t){return Ti.isInstance(t,hi.$type)}zt(ui,"isUnorderedGroup");var di={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function pi(t){return Ti.isInstance(t,di.$type)}zt(pi,"isUntilToken");var fi={$type:"ValueLiteral"};function gi(t){return Ti.isInstance(t,fi.$type)}zt(gi,"isValueLiteral");var mi={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function yi(t){return Ti.isInstance(t,mi.$type)}zt(yi,"isWildcard");var vi,bi,xi=class extends Ve{static{zt(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:kr.$type,properties:{cardinality:{name:kr.cardinality}},superTypes:[]},AbstractParserRule:{name:Er.$type,properties:{},superTypes:[_r.$type,Rr.$type]},AbstractRule:{name:_r.$type,properties:{},superTypes:[]},AbstractType:{name:Rr.$type,properties:{},superTypes:[]},Action:{name:Ir.$type,properties:{cardinality:{name:Ir.cardinality},feature:{name:Ir.feature},inferredType:{name:Ir.inferredType},operator:{name:Ir.operator},type:{name:Ir.type,referenceType:Rr.$type}},superTypes:[kr.$type]},Alternatives:{name:Nr.$type,properties:{cardinality:{name:Nr.cardinality},elements:{name:Nr.elements,defaultValue:[]}},superTypes:[kr.$type]},ArrayLiteral:{name:Or.$type,properties:{elements:{name:Or.elements,defaultValue:[]}},superTypes:[fi.$type]},ArrayType:{name:Pr.$type,properties:{elementType:{name:Pr.elementType}},superTypes:[oi.$type]},Assignment:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},feature:{name:Fr.feature},operator:{name:Fr.operator},predicate:{name:Fr.predicate},terminal:{name:Fr.terminal}},superTypes:[kr.$type]},BooleanLiteral:{name:Kr.$type,properties:{true:{name:Kr.true,defaultValue:!1}},superTypes:[Ur.$type,fi.$type]},CharacterRange:{name:qr.$type,properties:{cardinality:{name:qr.cardinality},left:{name:qr.left},lookahead:{name:qr.lookahead},parenthesized:{name:qr.parenthesized,defaultValue:!1},right:{name:qr.right}},superTypes:[Vn.$type]},Condition:{name:Ur.$type,properties:{},superTypes:[]},Conjunction:{name:Yr.$type,properties:{left:{name:Yr.left},right:{name:Yr.right}},superTypes:[Ur.$type]},CrossReference:{name:Hr.$type,properties:{cardinality:{name:Hr.cardinality},deprecatedSyntax:{name:Hr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Hr.isMulti,defaultValue:!1},terminal:{name:Hr.terminal},type:{name:Hr.type,referenceType:Rr.$type}},superTypes:[kr.$type]},Disjunction:{name:Zr.$type,properties:{left:{name:Zr.left},right:{name:Zr.right}},superTypes:[Ur.$type]},EndOfFile:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality}},superTypes:[kr.$type]},Grammar:{name:en.$type,properties:{imports:{name:en.imports,defaultValue:[]},interfaces:{name:en.interfaces,defaultValue:[]},isDeclared:{name:en.isDeclared,defaultValue:!1},name:{name:en.name},rules:{name:en.rules,defaultValue:[]},types:{name:en.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:nn.$type,properties:{path:{name:nn.path}},superTypes:[]},Group:{name:on.$type,properties:{cardinality:{name:on.cardinality},elements:{name:on.elements,defaultValue:[]},guardCondition:{name:on.guardCondition},predicate:{name:on.predicate}},superTypes:[kr.$type]},InferredType:{name:ln.$type,properties:{name:{name:ln.name}},superTypes:[Rr.$type]},InfixRule:{name:hn.$type,properties:{call:{name:hn.call},dataType:{name:hn.dataType},inferredType:{name:hn.inferredType},name:{name:hn.name},operators:{name:hn.operators},parameters:{name:hn.parameters,defaultValue:[]},returnType:{name:hn.returnType,referenceType:Rr.$type}},superTypes:[Er.$type]},InfixRuleOperatorList:{name:dn.$type,properties:{associativity:{name:dn.associativity},operators:{name:dn.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:fn.$type,properties:{precedences:{name:fn.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:mn.$type,properties:{attributes:{name:mn.attributes,defaultValue:[]},name:{name:mn.name},superTypes:{name:mn.superTypes,defaultValue:[],referenceType:Rr.$type}},superTypes:[Rr.$type]},Keyword:{name:vn.$type,properties:{cardinality:{name:vn.cardinality},predicate:{name:vn.predicate},value:{name:vn.value}},superTypes:[kr.$type]},NamedArgument:{name:xn.$type,properties:{calledByName:{name:xn.calledByName,defaultValue:!1},parameter:{name:xn.parameter,referenceType:An.$type},value:{name:xn.value}},superTypes:[]},NegatedToken:{name:wn.$type,properties:{cardinality:{name:wn.cardinality},lookahead:{name:wn.lookahead},parenthesized:{name:wn.parenthesized,defaultValue:!1},terminal:{name:wn.terminal}},superTypes:[Vn.$type]},Negation:{name:Cn.$type,properties:{value:{name:Cn.value}},superTypes:[Ur.$type]},NumberLiteral:{name:Sn.$type,properties:{value:{name:Sn.value}},superTypes:[fi.$type]},Parameter:{name:An.$type,properties:{name:{name:An.name}},superTypes:[]},ParameterReference:{name:Ln.$type,properties:{parameter:{name:Ln.parameter,referenceType:An.$type}},superTypes:[Ur.$type]},ParserRule:{name:Dn.$type,properties:{dataType:{name:Dn.dataType},definition:{name:Dn.definition},entry:{name:Dn.entry,defaultValue:!1},fragment:{name:Dn.fragment,defaultValue:!1},inferredType:{name:Dn.inferredType},name:{name:Dn.name},parameters:{name:Dn.parameters,defaultValue:[]},returnType:{name:Dn.returnType,referenceType:Rr.$type}},superTypes:[Er.$type]},ReferenceType:{name:Mn.$type,properties:{isMulti:{name:Mn.isMulti,defaultValue:!1},referenceType:{name:Mn.referenceType}},superTypes:[oi.$type]},RegexToken:{name:$n.$type,properties:{cardinality:{name:$n.cardinality},lookahead:{name:$n.lookahead},parenthesized:{name:$n.parenthesized,defaultValue:!1},regex:{name:$n.regex}},superTypes:[Vn.$type]},ReturnType:{name:Bn.$type,properties:{name:{name:Bn.name}},superTypes:[]},RuleCall:{name:zn.$type,properties:{arguments:{name:zn.arguments,defaultValue:[]},cardinality:{name:zn.cardinality},predicate:{name:zn.predicate},rule:{name:zn.rule,referenceType:_r.$type}},superTypes:[kr.$type]},SimpleType:{name:jn.$type,properties:{primitiveType:{name:jn.primitiveType},stringType:{name:jn.stringType},typeRef:{name:jn.typeRef,referenceType:Rr.$type}},superTypes:[oi.$type]},StringLiteral:{name:Wn.$type,properties:{value:{name:Wn.value}},superTypes:[fi.$type]},TerminalAlternatives:{name:Gn.$type,properties:{cardinality:{name:Gn.cardinality},elements:{name:Gn.elements,defaultValue:[]},lookahead:{name:Gn.lookahead},parenthesized:{name:Gn.parenthesized,defaultValue:!1}},superTypes:[Vn.$type]},TerminalElement:{name:Vn.$type,properties:{cardinality:{name:Vn.cardinality},lookahead:{name:Vn.lookahead},parenthesized:{name:Vn.parenthesized,defaultValue:!1}},superTypes:[kr.$type]},TerminalGroup:{name:Xn.$type,properties:{cardinality:{name:Xn.cardinality},elements:{name:Xn.elements,defaultValue:[]},lookahead:{name:Xn.lookahead},parenthesized:{name:Xn.parenthesized,defaultValue:!1}},superTypes:[Vn.$type]},TerminalRule:{name:Qn.$type,properties:{definition:{name:Qn.definition},fragment:{name:Qn.fragment,defaultValue:!1},hidden:{name:Qn.hidden,defaultValue:!1},name:{name:Qn.name},type:{name:Qn.type}},superTypes:[_r.$type]},TerminalRuleCall:{name:ti.$type,properties:{cardinality:{name:ti.cardinality},lookahead:{name:ti.lookahead},parenthesized:{name:ti.parenthesized,defaultValue:!1},rule:{name:ti.rule,referenceType:Qn.$type}},superTypes:[Vn.$type]},Type:{name:ri.$type,properties:{name:{name:ri.name},type:{name:ri.type}},superTypes:[Rr.$type]},TypeAttribute:{name:ii.$type,properties:{defaultValue:{name:ii.defaultValue},isOptional:{name:ii.isOptional,defaultValue:!1},name:{name:ii.name},type:{name:ii.type}},superTypes:[]},TypeDefinition:{name:oi.$type,properties:{},superTypes:[]},UnionType:{name:li.$type,properties:{types:{name:li.types,defaultValue:[]}},superTypes:[oi.$type]},UnorderedGroup:{name:hi.$type,properties:{cardinality:{name:hi.cardinality},elements:{name:hi.elements,defaultValue:[]}},superTypes:[kr.$type]},UntilToken:{name:di.$type,properties:{cardinality:{name:di.cardinality},lookahead:{name:di.lookahead},parenthesized:{name:di.parenthesized,defaultValue:!1},terminal:{name:di.terminal}},superTypes:[Vn.$type]},ValueLiteral:{name:fi.$type,properties:{},superTypes:[]},Wildcard:{name:mi.$type,properties:{cardinality:{name:mi.cardinality},lookahead:{name:mi.lookahead},parenthesized:{name:mi.parenthesized,defaultValue:!1}},superTypes:[Vn.$type]}}}},Ti=new xi;function wi(t){let e=t,r=!1;for(;e;){const t=lr(e.grammarSource,Nn);if(!t||!t.dataType)return r?e:void 0;e=e.container,r=!0}}function ki(t){return new ar(t,t=>He(t)?t.content:[],{includeRoot:!0})}function Ci(t){return ki(t).filter(Xe)}function Ei(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function Si(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function _i(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function Ai(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return vi.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return vi.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?vi.Inside:r?vi.OverlapBack:n?vi.OverlapFront:vi.Outside}function Ri(t,e){return Ai(t,e)>vi.After}zt(wi,"getDatatypeNode"),zt(ki,"streamCst"),zt(Ci,"flattenCst"),zt(Ei,"isChildNode"),zt(Si,"tokenToRange"),zt(_i,"toDocumentSegment"),(bi=vi||(vi={}))[bi.Before=0]="Before",bi[bi.After=1]="After",bi[bi.OverlapFront=2]="OverlapFront",bi[bi.OverlapBack=3]="OverlapBack",bi[bi.Inside=4]="Inside",bi[bi.Outside=5]="Outside",zt(Ai,"compareRange"),zt(Ri,"inRange");var Li=/^[\w\p{L}]$/u;function Ii(t,e,r=Li){if(t){if(e>0){const n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return Mi(t,e)}}function Di(t,e){if(t){const r=Pi(t,!0);if(r&&Ni(r,e))return r;if(Ze(t)){for(let r=t.content.findIndex(t=>!t.hidden)-1;r>=0;r--){const n=t.content[r];if(Ni(n,e))return n}}}}function Ni(t,e){return Xe(t)&&e.includes(t.tokenType.name)}function Mi(t,e){if(Xe(t))return t;if(He(t)){const r=$i(t,e,!1);if(r)return Mi(r,e)}}function Oi(t,e){if(Xe(t))return t;if(He(t)){const r=$i(t,e,!0);if(r)return Oi(r,e)}}function $i(t,e,r){let n,i=0,a=t.content.length-1;for(;i<=a;){const o=Math.floor((i+a)/2),s=t.content[o];if(s.offset<=e&&s.end>e)return s;s.end<=e?(n=r?s:void 0,i=o+1):a=o-1}return n}function Pi(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const t=r.content[n];if(e||!t.hidden)return t}t=r}}function Bi(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);const i=r.content.length-1;for(;n<i;){n++;const t=r.content[n];if(e||!t.hidden)return t}t=r}}function Fi(t){if(0===t.range.start.character)return t;const e=t.range.start.line;let r,n=t;for(;t.container;){const i=t.container,a=r??i.content.indexOf(t);if(0===a?(t=i,r=void 0):(r=a-1,t=i.content[r]),t.range.start.line!==e)break;n=t}return n}function zi(t,e){const r=Ki(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}function Ki(t,e){const r=ji(t),n=ji(e);let i;for(let a=0;a<r.length&&a<n.length;a++){const t=r[a],e=n[a];if(t.parent!==e.parent)break;i={parent:t.parent,a:t.index,b:e.index}}return i}function ji(t){const e=[];for(;t.container;){const r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}zt(Ii,"findDeclarationNodeAtOffset"),zt(Di,"findCommentNode"),zt(Ni,"isCommentNode"),zt(Mi,"findLeafNodeAtOffset"),zt(Oi,"findLeafNodeBeforeOffset"),zt($i,"binarySearch"),zt(Pi,"getPreviousNode"),zt(Bi,"getNextNode"),zt(Fi,"getStartlineNode"),zt(zi,"getInteriorNodes"),zt(Ki,"getCommonParent"),zt(ji,"getParentChain");var qi={};jt(qi,{findAssignment:()=>Da,findNameAssignment:()=>Na,findNodeForKeyword:()=>La,findNodeForProperty:()=>_a,findNodesForKeyword:()=>Ra,findNodesForKeywordInternal:()=>Ia,findNodesForProperty:()=>Sa,getActionAtElement:()=>Oa,getActionType:()=>Ua,getAllReachableRules:()=>Ta,getAllRulesUsedForCrossReferences:()=>ka,getCrossReferenceTerminal:()=>Ca,getEntryRule:()=>ba,getExplicitRuleType:()=>qa,getHiddenRules:()=>xa,getRuleType:()=>Ya,getRuleTypeName:()=>Ga,getTypeName:()=>Wa,isArrayCardinality:()=>Pa,isArrayOperator:()=>Ba,isCommentTerminal:()=>Ea,isDataType:()=>Ka,isDataTypeRule:()=>Fa,isOptionalCardinality:()=>$a,terminalRegex:()=>Va});var Wi=class extends Error{static{zt(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:${t.range.start.character}`:e)}};function Ui(t,e="Error: Got unexpected value."){throw new Error(e)}function Gi(t,e="Error: Condition is violated."){if(!t)throw new Error(e)}zt(Ui,"assertUnreachable"),zt(Gi,"assertCondition");var Yi={};function Vi(t){return t.charCodeAt(0)}function Hi(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function Xi(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e];t[e]=!0}function Zi(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function Qi(){throw Error("Internal Error - Should never get here!")}function Ji(t){return"Character"===t.type}jt(Yi,{NEWLINE_REGEXP:()=>la,escapeRegExp:()=>ma,getTerminalParts:()=>da,isMultilineComment:()=>pa,isWhitespace:()=>ga,partialMatches:()=>ya,partialRegExp:()=>va,whitespaceCharacters:()=>fa}),zt(Vi,"cc"),zt(Hi,"insertToSet"),zt(Xi,"addFlag"),zt(Zi,"ASSERT_EXISTS"),zt(Qi,"ASSERT_NEVER_REACH_HERE"),zt(Ji,"isCharacter");var ta=[];for(let T$=Vi("0");T$<=Vi("9");T$++)ta.push(T$);var ea=[Vi("_")].concat(ta);for(let T$=Vi("a");T$<=Vi("z");T$++)ea.push(T$);for(let T$=Vi("A");T$<=Vi("Z");T$++)ea.push(T$);var ra=[Vi(" "),Vi("\f"),Vi("\n"),Vi("\r"),Vi("\t"),Vi("\v"),Vi("\t"),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi(" "),Vi("\u2028"),Vi("\u2029"),Vi(" "),Vi(" "),Vi(" "),Vi("\ufeff")],na=/[0-9a-fA-F]/,ia=/[0-9]/,aa=/[1-9]/,oa=class{static{zt(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");const e=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Xi(r,"global");break;case"i":Xi(r,"ignoreCase");break;case"m":Xi(r,"multiLine");break;case"u":Xi(r,"unicode");break;case"y":Xi(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){const t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){const t=[],e=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":let e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":e="Lookbehind";break;case"!":e="NegativeLookbehind"}}Zi(e);const r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return Qi()}quantifier(t=!1){let e;const r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:r,atMost:r};break;case",":let t;this.isDigit()?(t=this.integerIncludingZero(),e={atLeast:r,atMost:t}):e={atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;Zi(e)}if(!0!==t||void 0!==e)return Zi(e)?("?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e):void 0}atom(){let t;const e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return void 0===t&&this.isPatternCharacter()&&(t=this.patternCharacter()),Zi(t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):Qi()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Vi("\n"),Vi("\r"),Vi("\u2028"),Vi("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=ta;break;case"D":t=ta,e=!0;break;case"s":t=ra;break;case"S":t=ra,e=!0;break;case"w":t=ea;break;case"W":t=ea,e=!0}return Zi(t)?{type:"Set",value:t,complement:e}:Qi()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=Vi("\f");break;case"n":t=Vi("\n");break;case"r":t=Vi("\r");break;case"t":t=Vi("\t");break;case"v":t=Vi("\v")}return Zi(t)?{type:"Character",value:t}:Qi()}controlLetterEscapeAtom(){this.consumeChar("c");const t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Vi("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Vi(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Vi(this.popChar())}}}characterClass(){const t=[];let e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){const e=this.classAtom();e.type;if(Ji(e)&&this.isRangeDash()){this.consumeChar("-");const r=this.classAtom();r.type;if(Ji(r)){if(r.value<e.value)throw Error("Range out of order in character class");t.push({from:e.value,to:r.value})}else Hi(e.value,t),t.push(Vi("-")),Hi(r.value,t)}else Hi(e.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Vi("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;if(this.consumeChar("("),"?"===this.peekChar(0))this.consumeChar("?"),this.consumeChar(":"),t=!1;else this.groupIdx++;const e=this.disjunction();this.consumeChar(")");const r={type:"Group",capturing:t,value:e};return t&&(r.idx=this.groupIdx),r}positiveInteger(){let t=this.popChar();if(!1===aa.test(t))throw Error("Expecting a positive integer");for(;ia.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(!1===ia.test(t))throw Error("Expecting an integer");for(;ia.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){const t=this.popChar();switch(t){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Vi(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return ia.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){const t=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let e="";for(let r=0;r<t;r++){const t=this.popChar();if(!1===na.test(t))throw Error("Expecting a HexDecimal digits");e+=t}return{type:"Character",value:parseInt(e,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){const t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}},sa=class{static{zt(this,"BaseRegExpVisitor")}visitChildren(t){for(const e in t){const r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Lookbehind":this.visitLookbehind(t);break;case"NegativeLookbehind":this.visitNegativeLookbehind(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitLookbehind(t){}visitNegativeLookbehind(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}},la=/\r?\n/gm,ca=new oa,ha=class extends sa{static{zt(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){const e=String.fromCharCode(t.value);if(this.multiline||"\n"!==e||(this.multiline=!0),t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=ma(e);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitSet(t){if(!this.multiline){const e=this.regex.substring(t.loc.begin,t.loc.end),r=new RegExp(e);this.multiline=Boolean("\n".match(r))}if(t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=this.regex.substring(t.loc.begin,t.loc.end);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitChildren(t){if("Group"===t.type){if(t.quantifier)return}super.visitChildren(t)}},ua=new ha;function da(t){try{"string"!=typeof t&&(t=t.source),t=`/${t}/`;const e=ca.pattern(t),r=[];for(const n of e.value.value)ua.reset(t),ua.visit(n),r.push({start:ua.startRegexp,end:ua.endRegex});return r}catch{return[]}}function pa(t){try{return"string"==typeof t&&(t=new RegExp(t)),t=t.toString(),ua.reset(t),ua.visit(ca.pattern(t)),ua.multiline}catch{return!1}}zt(da,"getTerminalParts"),zt(pa,"isMultilineComment");var fa="\f\n\r\t\v \u2028\u2029 \ufeff".split("");function ga(t){const e="string"==typeof t?new RegExp(t):t;return fa.some(t=>e.test(t))}function ma(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ya(t,e){const r=va(t),n=e.match(r);return!!n&&n[0].length>0}function va(t){"string"==typeof t&&(t=new RegExp(t));const e=t,r=t.source;let n=0;function i(){let t,a="";function o(t){a+=r.substr(n,t),n+=t}function s(t){a+="(?:"+r.substr(n,t)+"|$)",n+=t}for(zt(o,"appendRaw"),zt(s,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":s(3);break;case"x":s(4);break;case"u":e.unicode?"{"===r[n+2]?s(r.indexOf("}",n)-n+1):s(6):s(2);break;case"p":case"P":e.unicode?s(r.indexOf("}",n)-n+1):s(2);break;case"k":s(r.indexOf(">",n)-n+1);break;default:s(2)}break;case"[":t=/\[(?:\\.|.)*?\]/g,t.lastIndex=n,t=t.exec(r)||[],s(t[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":t=/\{\d+,?\d*\}/g,t.lastIndex=n,t=t.exec(r),t?o(t[0].length):s(1);break;case"(":if("?"===r[n+1])switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":t=n,n+=3,i(),a+=r.substr(t,n-t);break;case"<":switch(r[n+3]){case"=":case"!":t=n,n+=4,i(),a+=r.substr(t,n-t);break;default:o(r.indexOf(">",n)-n+1),a+=i()+"|$)"}}else o(1),a+=i()+"|$)";break;case")":return++n,a;default:s(1)}return a}return zt(i,"process"),new RegExp(i(),t.flags)}function ba(t){return t.rules.find(t=>Nn(t)&&t.entry)}function xa(t){return t.rules.filter(t=>Jn(t)&&t.hidden)}function Ta(t,e){const r=new Set,n=ba(t);if(!n)return new Set(t.rules);const i=[n].concat(xa(t));for(const o of i)wa(o,r,e);const a=new Set;for(const o of t.rules)(r.has(o.name)||Jn(o)&&o.hidden)&&a.add(o);return a}function wa(t,e,r){e.add(t.name),fr(t).forEach(t=>{if(Kn(t)||r&&ei(t)){const n=t.rule.ref;n&&!e.has(n.name)&&wa(n,e,r)}})}function ka(t){const e=new Set;return fr(t).forEach(t=>{Xr(t)&&(Nn(t.type.ref)&&e.add(t.type.ref),cn(t.type.ref)&&Nn(t.type.ref.$container)&&e.add(t.type.ref.$container))}),e}function Ca(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=Na(t.type.ref);return e?.terminal}}function Ea(t){return t.hidden&&!ga(Va(t))}function Sa(t,e){return t&&e?Aa(t,e,t.astNode,!0):[]}function _a(t,e,r){if(!t||!e)return;const n=Aa(t,e,t.astNode,!0);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function Aa(t,e,r,n){if(!n){const r=lr(t.grammarSource,zr);if(r&&r.feature===e)return[t]}return He(t)&&t.astNode===r?t.content.flatMap(t=>Aa(t,e,r,!1)):[]}function Ra(t,e){return t?Ia(t,e,t?.astNode):[]}function La(t,e,r){if(!t)return;const n=Ia(t,e,t?.astNode);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function Ia(t,e,r){if(t.astNode!==r)return[];if(bn(t.grammarSource)&&t.grammarSource.value===e)return[t];const n=ki(t).iterator();let i;const a=[];do{if(i=n.next(),!i.done){const t=i.value;t.astNode===r?bn(t.grammarSource)&&t.grammarSource.value===e&&a.push(t):n.prune()}}while(!i.done);return a}function Da(t){const e=t.astNode;for(;e===t.container?.astNode;){const e=lr(t.grammarSource,zr);if(e)return e;t=t.container}}function Na(t){let e=t;return cn(e)&&(Dr(e.$container)?e=e.$container.$container:Sr(e.$container)?e=e.$container:Ui(e.$container)),Ma(t,e,new Map)}function Ma(t,e,r){function n(e,n){let i;return lr(e,zr)||(i=Ma(n,n,r)),r.set(t,i),i}if(zt(n,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(const i of fr(e)){if(zr(i)&&"name"===i.feature.toLowerCase())return r.set(t,i),i;if(Kn(i)&&Nn(i.rule.ref))return n(i,i.rule.ref);if(qn(i)&&i.typeRef?.ref)return n(i,i.typeRef.ref)}}function Oa(t){const e=t.$container;if(sn(e)){const r=e.elements;for(let e=r.indexOf(t)-1;e>=0;e--){const t=r[e];if(Dr(t))return t;{const t=fr(r[e]).find(Dr);if(t)return t}}}return Cr(e)?Oa(e):void 0}function $a(t,e){return"?"===t||"*"===t||sn(e)&&Boolean(e.guardCondition)}function Pa(t){return"*"===t||"+"===t}function Ba(t){return"+="===t}function Fa(t){return za(t,new Set)}function za(t,e){if(e.has(t))return!0;e.add(t);for(const r of fr(t))if(Kn(r)){if(!r.rule.ref)return!1;if(Nn(r.rule.ref)&&!za(r.rule.ref,e))return!1;if(un(r.rule.ref))return!1}else{if(zr(r))return!1;if(Dr(r))return!1}return Boolean(t.definition)}function Ka(t){return ja(t.type,new Set)}function ja(t,e){if(e.has(t))return!0;if(e.add(t),Br(t))return!1;if(On(t))return!1;if(ci(t))return t.types.every(t=>ja(t,e));if(qn(t)){if(void 0!==t.primitiveType)return!0;if(void 0!==t.stringType)return!0;if(void 0!==t.typeRef){const r=t.typeRef.ref;return!!ni(r)&&ja(r.type,e)}return!1}return!1}function qa(t){if(!Jn(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}function Wa(t){if(Sr(t))return Nn(t)&&Fa(t)?t.name:qa(t)??t.name;if(yn(t)||ni(t)||Fn(t))return t.name;if(Dr(t)){const e=Ua(t);if(e)return e}else if(cn(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Ua(t){return t.inferredType?t.inferredType.name:t.type?.ref?Wa(t.type.ref):void 0}function Ga(t){return Jn(t)?t.type?.name??"string":Nn(t)&&Fa(t)?t.name:qa(t)??t.name}function Ya(t){return Jn(t)?t.type?.name??"string":qa(t)??t.name}function Va(t){const e={s:!1,i:!1,u:!1},r=Xa(t.definition,e),n=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(r,n)}zt(ga,"isWhitespace"),zt(ma,"escapeRegExp"),zt(ya,"partialMatches"),zt(va,"partialRegExp"),zt(ba,"getEntryRule"),zt(xa,"getHiddenRules"),zt(Ta,"getAllReachableRules"),zt(wa,"ruleDfs"),zt(ka,"getAllRulesUsedForCrossReferences"),zt(Ca,"getCrossReferenceTerminal"),zt(Ea,"isCommentTerminal"),zt(Sa,"findNodesForProperty"),zt(_a,"findNodeForProperty"),zt(Aa,"findNodesForPropertyInternal"),zt(Ra,"findNodesForKeyword"),zt(La,"findNodeForKeyword"),zt(Ia,"findNodesForKeywordInternal"),zt(Da,"findAssignment"),zt(Na,"findNameAssignment"),zt(Ma,"findNameAssignmentInternal"),zt(Oa,"getActionAtElement"),zt($a,"isOptionalCardinality"),zt(Pa,"isArrayCardinality"),zt(Ba,"isArrayOperator"),zt(Fa,"isDataTypeRule"),zt(za,"isDataTypeRuleInternal"),zt(Ka,"isDataType"),zt(ja,"isDataTypeInternal"),zt(qa,"getExplicitRuleType"),zt(Wa,"getTypeName"),zt(Ua,"getActionType"),zt(Ga,"getRuleTypeName"),zt(Ya,"getRuleType"),zt(Va,"terminalRegex");var Ha=/[\s\S]/.source;function Xa(t,e){if(Yn(t))return Za(t);if(Zn(t))return Qa(t);if(Wr(t))return eo(t);if(ei(t)){const e=t.rule.ref;if(!e)throw new Error("Missing rule reference.");return no(Xa(e.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}if(kn(t))return to(t);if(pi(t))return Ja(t);if(Pn(t)){const r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),no(n,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}if(yi(t))return no(Ha,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t?.$type}, ${t?.$cstNode?.text}`)}function Za(t){return no(t.elements.map(t=>Xa(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function Qa(t){return no(t.elements.map(t=>Xa(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function Ja(t){return no(`${Ha}*?${Xa(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function to(t){return no(`(?!${Xa(t.terminal)})${Ha}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function eo(t){return t.right?no(`[${ro(t.left)}-${ro(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):no(ro(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function ro(t){return ma(t.value)}function no(t,e){if(e.parenthesized||e.lookahead||!1!==e.wrap){t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`}return e.cardinality?`${t}${e.cardinality}`:t}function io(t){const e=[],r=t.Grammar;for(const n of r.rules)Jn(n)&&Ea(n)&&pa(Va(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:Li}}zt(Xa,"abstractElementToRegex"),zt(Za,"terminalAlternativesToRegex"),zt(Qa,"terminalGroupToRegex"),zt(Ja,"untilTokenToRegex"),zt(to,"negateTokenToRegex"),zt(eo,"characterRangeToRegex"),zt(ro,"keywordToRegex"),zt(no,"withCardinality"),zt(io,"createGrammarConfig");var ao="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,oo="object"==typeof self&&self&&self.Object===Object&&self,so=ao||oo||Function("return this")(),lo=so.Symbol,co=Object.prototype,ho=co.hasOwnProperty,uo=co.toString,po=lo?lo.toStringTag:void 0;function fo(t){var e=ho.call(t,po),r=t[po];try{t[po]=void 0;var n=!0}catch(a){}var i=uo.call(t);return n&&(e?t[po]=r:delete t[po]),i}zt(fo,"getRawTag");var go=fo,mo=Object.prototype.toString;function yo(t){return mo.call(t)}zt(yo,"objectToString");var vo=yo,bo=lo?lo.toStringTag:void 0;function xo(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":bo&&bo in Object(t)?go(t):vo(t)}zt(xo,"baseGetTag");var To=xo;function wo(t){return null!=t&&"object"==typeof t}zt(wo,"isObjectLike");var ko=wo;function Co(t){return"symbol"==typeof t||ko(t)&&"[object Symbol]"==To(t)}zt(Co,"isSymbol");var Eo=Co;function So(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}zt(So,"arrayMap");var _o=So,Ao=Array.isArray,Ro=lo?lo.prototype:void 0,Lo=Ro?Ro.toString:void 0;function Io(t){if("string"==typeof t)return t;if(Ao(t))return _o(t,Io)+"";if(Eo(t))return Lo?Lo.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}zt(Io,"baseToString");var Do=Io,No=/\s/;function Mo(t){for(var e=t.length;e--&&No.test(t.charAt(e)););return e}zt(Mo,"trimmedEndIndex");var Oo=Mo,$o=/^\s+/;function Po(t){return t?t.slice(0,Oo(t)+1).replace($o,""):t}zt(Po,"baseTrim");var Bo=Po;function Fo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}zt(Fo,"isObject");var zo=Fo,Ko=/^[-+]0x[0-9a-f]+$/i,jo=/^0b[01]+$/i,qo=/^0o[0-7]+$/i,Wo=parseInt;function Uo(t){if("number"==typeof t)return t;if(Eo(t))return NaN;if(zo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=zo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Bo(t);var r=jo.test(t);return r||qo.test(t)?Wo(t.slice(2),r?2:8):Ko.test(t)?NaN:+t}zt(Uo,"toNumber");var Go=Uo,Yo=1/0;function Vo(t){return t?(t=Go(t))===Yo||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}zt(Vo,"toFinite");var Ho=Vo;function Xo(t){var e=Ho(t),r=e%1;return e==e?r?e-r:e:0}zt(Xo,"toInteger");var Zo=Xo;function Qo(t){return t}zt(Qo,"identity");var Jo=Qo;function ts(t){if(!zo(t))return!1;var e=To(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}zt(ts,"isFunction");var es,rs=ts,ns=so["__core-js_shared__"],is=(es=/[^.]+$/.exec(ns&&ns.keys&&ns.keys.IE_PROTO||""))?"Symbol(src)_1."+es:"";function as(t){return!!is&&is in t}zt(as,"isMasked");var os=as,ss=Function.prototype.toString;function ls(t){if(null!=t){try{return ss.call(t)}catch(e){}try{return t+""}catch(e){}}return""}zt(ls,"toSource");var cs=ls,hs=/^\[object .+?Constructor\]$/,us=Function.prototype,ds=Object.prototype,ps=us.toString,fs=ds.hasOwnProperty,gs=RegExp("^"+ps.call(fs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ms(t){return!(!zo(t)||os(t))&&(rs(t)?gs:hs).test(cs(t))}zt(ms,"baseIsNative");var ys=ms;function vs(t,e){return null==t?void 0:t[e]}zt(vs,"getValue");var bs=vs;function xs(t,e){var r=bs(t,e);return ys(r)?r:void 0}zt(xs,"getNative");var Ts=xs,ws=Ts(so,"WeakMap"),ks=Object.create,Cs=function(){function t(){}return zt(t,"object"),function(e){if(!zo(e))return{};if(ks)return ks(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function Es(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)}zt(Es,"apply");var Ss=Es;function _s(){}zt(_s,"noop");var As=_s;function Rs(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}zt(Rs,"copyArray");var Ls=Rs,Is=Date.now;function Ds(t){var e=0,r=0;return function(){var n=Is(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}zt(Ds,"shortOut");var Ns=Ds;function Ms(t){return function(){return t}}zt(Ms,"constant");var Os=Ms,$s=function(){try{var t=Ts(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ps=Ns($s?function(t,e){return $s(t,"toString",{configurable:!0,enumerable:!1,value:Os(e),writable:!0})}:Jo);function Bs(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}zt(Bs,"arrayEach");var Fs=Bs;function zs(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}zt(zs,"baseFindIndex");var Ks=zs;function js(t){return t!=t}zt(js,"baseIsNaN");var qs=js;function Ws(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}zt(Ws,"strictIndexOf");var Us=Ws;function Gs(t,e,r){return e==e?Us(t,e,r):Ks(t,qs,r)}zt(Gs,"baseIndexOf");var Ys=Gs;function Vs(t,e){return!!(null==t?0:t.length)&&Ys(t,e,0)>-1}zt(Vs,"arrayIncludes");var Hs=Vs,Xs=/^(?:0|[1-9]\d*)$/;function Zs(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&Xs.test(t))&&t>-1&&t%1==0&&t<e}zt(Zs,"isIndex");var Qs=Zs;function Js(t,e,r){"__proto__"==e&&$s?$s(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}zt(Js,"baseAssignValue");var tl=Js;function el(t,e){return t===e||t!=t&&e!=e}zt(el,"eq");var rl=el,nl=Object.prototype.hasOwnProperty;function il(t,e,r){var n=t[e];nl.call(t,e)&&rl(n,r)&&(void 0!==r||e in t)||tl(t,e,r)}zt(il,"assignValue");var al=il;function ol(t,e,r,n){var i=!r;r||(r={});for(var a=-1,o=e.length;++a<o;){var s=e[a],l=n?n(r[s],t[s],s,r,t):void 0;void 0===l&&(l=t[s]),i?tl(r,s,l):al(r,s,l)}return r}zt(ol,"copyObject");var sl=ol,ll=Math.max;function cl(t,e,r){return e=ll(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=ll(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(o),Ss(t,this,s)}}zt(cl,"overRest");var hl=cl;function ul(t,e){return Ps(hl(t,e,Jo),t+"")}zt(ul,"baseRest");var dl=ul;function pl(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}zt(pl,"isLength");var fl=pl;function gl(t){return null!=t&&fl(t.length)&&!rs(t)}zt(gl,"isArrayLike");var ml=gl;function yl(t,e,r){if(!zo(r))return!1;var n=typeof e;return!!("number"==n?ml(r)&&Qs(e,r.length):"string"==n&&e in r)&&rl(r[e],t)}zt(yl,"isIterateeCall");var vl=yl;function bl(t){return dl(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&vl(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,a)}return e})}zt(bl,"createAssigner");var xl=bl,Tl=Object.prototype;function wl(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Tl)}zt(wl,"isPrototype");var kl=wl;function Cl(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}zt(Cl,"baseTimes");var El=Cl;function Sl(t){return ko(t)&&"[object Arguments]"==To(t)}zt(Sl,"baseIsArguments");var _l=Sl,Al=Object.prototype,Rl=Al.hasOwnProperty,Ll=Al.propertyIsEnumerable,Il=_l(function(){return arguments}())?_l:function(t){return ko(t)&&Rl.call(t,"callee")&&!Ll.call(t,"callee")},Dl=Il;function Nl(){return!1}zt(Nl,"stubFalse");var Ml=Nl,Ol="object"==typeof exports&&exports&&!exports.nodeType&&exports,$l=Ol&&"object"==typeof module&&module&&!module.nodeType&&module,Pl=$l&&$l.exports===Ol?so.Buffer:void 0,Bl=(Pl?Pl.isBuffer:void 0)||Ml,Fl={};function zl(t){return ko(t)&&fl(t.length)&&!!Fl[To(t)]}Fl["[object Float32Array]"]=Fl["[object Float64Array]"]=Fl["[object Int8Array]"]=Fl["[object Int16Array]"]=Fl["[object Int32Array]"]=Fl["[object Uint8Array]"]=Fl["[object Uint8ClampedArray]"]=Fl["[object Uint16Array]"]=Fl["[object Uint32Array]"]=!0,Fl["[object Arguments]"]=Fl["[object Array]"]=Fl["[object ArrayBuffer]"]=Fl["[object Boolean]"]=Fl["[object DataView]"]=Fl["[object Date]"]=Fl["[object Error]"]=Fl["[object Function]"]=Fl["[object Map]"]=Fl["[object Number]"]=Fl["[object Object]"]=Fl["[object RegExp]"]=Fl["[object Set]"]=Fl["[object String]"]=Fl["[object WeakMap]"]=!1,zt(zl,"baseIsTypedArray");var Kl=zl;function jl(t){return function(e){return t(e)}}zt(jl,"baseUnary");var ql=jl,Wl="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ul=Wl&&"object"==typeof module&&module&&!module.nodeType&&module,Gl=Ul&&Ul.exports===Wl&&ao.process,Yl=function(){try{var t=Ul&&Ul.require&&Ul.require("util").types;return t||Gl&&Gl.binding&&Gl.binding("util")}catch(e){}}(),Vl=Yl&&Yl.isTypedArray,Hl=Vl?ql(Vl):Kl,Xl=Object.prototype.hasOwnProperty;function Zl(t,e){var r=Ao(t),n=!r&&Dl(t),i=!r&&!n&&Bl(t),a=!r&&!n&&!i&&Hl(t),o=r||n||i||a,s=o?El(t.length,String):[],l=s.length;for(var c in t)!e&&!Xl.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Qs(c,l))||s.push(c);return s}zt(Zl,"arrayLikeKeys");var Ql=Zl;function Jl(t,e){return function(r){return t(e(r))}}zt(Jl,"overArg");var tc=Jl,ec=tc(Object.keys,Object),rc=Object.prototype.hasOwnProperty;function nc(t){if(!kl(t))return ec(t);var e=[];for(var r in Object(t))rc.call(t,r)&&"constructor"!=r&&e.push(r);return e}zt(nc,"baseKeys");var ic=nc;function ac(t){return ml(t)?Ql(t):ic(t)}zt(ac,"keys");var oc=ac,sc=Object.prototype.hasOwnProperty,lc=xl(function(t,e){if(kl(e)||ml(e))sl(e,oc(e),t);else for(var r in e)sc.call(e,r)&&al(t,r,e[r])});function cc(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}zt(cc,"nativeKeysIn");var hc=cc,uc=Object.prototype.hasOwnProperty;function dc(t){if(!zo(t))return hc(t);var e=kl(t),r=[];for(var n in t)("constructor"!=n||!e&&uc.call(t,n))&&r.push(n);return r}zt(dc,"baseKeysIn");var pc=dc;function fc(t){return ml(t)?Ql(t,!0):pc(t)}zt(fc,"keysIn");var gc=fc,mc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yc=/^\w*$/;function vc(t,e){if(Ao(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Eo(t))||(yc.test(t)||!mc.test(t)||null!=e&&t in Object(e))}zt(vc,"isKey");var bc=vc,xc=Ts(Object,"create");function Tc(){this.__data__=xc?xc(null):{},this.size=0}zt(Tc,"hashClear");var wc=Tc;function kc(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}zt(kc,"hashDelete");var Cc=kc,Ec=Object.prototype.hasOwnProperty;function Sc(t){var e=this.__data__;if(xc){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Ec.call(e,t)?e[t]:void 0}zt(Sc,"hashGet");var _c=Sc,Ac=Object.prototype.hasOwnProperty;function Rc(t){var e=this.__data__;return xc?void 0!==e[t]:Ac.call(e,t)}zt(Rc,"hashHas");var Lc=Rc;function Ic(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xc&&void 0===e?"__lodash_hash_undefined__":e,this}zt(Ic,"hashSet");var Dc=Ic;function Nc(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}zt(Nc,"Hash"),Nc.prototype.clear=wc,Nc.prototype.delete=Cc,Nc.prototype.get=_c,Nc.prototype.has=Lc,Nc.prototype.set=Dc;var Mc=Nc;function Oc(){this.__data__=[],this.size=0}zt(Oc,"listCacheClear");var $c=Oc;function Pc(t,e){for(var r=t.length;r--;)if(rl(t[r][0],e))return r;return-1}zt(Pc,"assocIndexOf");var Bc=Pc,Fc=Array.prototype.splice;function zc(t){var e=this.__data__,r=Bc(e,t);return!(r<0)&&(r==e.length-1?e.pop():Fc.call(e,r,1),--this.size,!0)}zt(zc,"listCacheDelete");var Kc=zc;function jc(t){var e=this.__data__,r=Bc(e,t);return r<0?void 0:e[r][1]}zt(jc,"listCacheGet");var qc=jc;function Wc(t){return Bc(this.__data__,t)>-1}zt(Wc,"listCacheHas");var Uc=Wc;function Gc(t,e){var r=this.__data__,n=Bc(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}zt(Gc,"listCacheSet");var Yc=Gc;function Vc(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}zt(Vc,"ListCache"),Vc.prototype.clear=$c,Vc.prototype.delete=Kc,Vc.prototype.get=qc,Vc.prototype.has=Uc,Vc.prototype.set=Yc;var Hc=Vc,Xc=Ts(so,"Map");function Zc(){this.size=0,this.__data__={hash:new Mc,map:new(Xc||Hc),string:new Mc}}zt(Zc,"mapCacheClear");var Qc=Zc;function Jc(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}zt(Jc,"isKeyable");var th=Jc;function eh(t,e){var r=t.__data__;return th(e)?r["string"==typeof e?"string":"hash"]:r.map}zt(eh,"getMapData");var rh=eh;function nh(t){var e=rh(this,t).delete(t);return this.size-=e?1:0,e}zt(nh,"mapCacheDelete");var ih=nh;function ah(t){return rh(this,t).get(t)}zt(ah,"mapCacheGet");var oh=ah;function sh(t){return rh(this,t).has(t)}zt(sh,"mapCacheHas");var lh=sh;function ch(t,e){var r=rh(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}zt(ch,"mapCacheSet");var hh=ch;function uh(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}zt(uh,"MapCache"),uh.prototype.clear=Qc,uh.prototype.delete=ih,uh.prototype.get=oh,uh.prototype.has=lh,uh.prototype.set=hh;var dh=uh;function ph(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=zt(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new(ph.Cache||dh),r}zt(ph,"memoize"),ph.Cache=dh;var fh=ph;function gh(t){var e=fh(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}zt(gh,"memoizeCapped");var mh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yh=/\\(\\)?/g,vh=gh(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(mh,function(t,r,n,i){e.push(n?i.replace(yh,"$1"):r||t)}),e});function bh(t){return null==t?"":Do(t)}zt(bh,"toString");var xh=bh;function Th(t,e){return Ao(t)?t:bc(t,e)?[t]:vh(xh(t))}zt(Th,"castPath");var wh=Th;function kh(t){if("string"==typeof t||Eo(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}zt(kh,"toKey");var Ch=kh;function Eh(t,e){for(var r=0,n=(e=wh(e,t)).length;null!=t&&r<n;)t=t[Ch(e[r++])];return r&&r==n?t:void 0}zt(Eh,"baseGet");var Sh=Eh;function _h(t,e,r){var n=null==t?void 0:Sh(t,e);return void 0===n?r:n}zt(_h,"get");var Ah=_h;function Rh(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}zt(Rh,"arrayPush");var Lh=Rh,Ih=lo?lo.isConcatSpreadable:void 0;function Dh(t){return Ao(t)||Dl(t)||!!(Ih&&t&&t[Ih])}zt(Dh,"isFlattenable");var Nh=Dh;function Mh(t,e,r,n,i){var a=-1,o=t.length;for(r||(r=Nh),i||(i=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?Mh(s,e-1,r,n,i):Lh(i,s):n||(i[i.length]=s)}return i}zt(Mh,"baseFlatten");var Oh=Mh;function $h(t){return(null==t?0:t.length)?Oh(t,1):[]}zt($h,"flatten");var Ph=$h,Bh=tc(Object.getPrototypeOf,Object);function Fh(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}zt(Fh,"baseSlice");var zh=Fh;function Kh(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}zt(Kh,"arrayReduce");var jh=Kh;function qh(){this.__data__=new Hc,this.size=0}zt(qh,"stackClear");var Wh=qh;function Uh(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}zt(Uh,"stackDelete");var Gh=Uh;function Yh(t){return this.__data__.get(t)}zt(Yh,"stackGet");var Vh=Yh;function Hh(t){return this.__data__.has(t)}zt(Hh,"stackHas");var Xh=Hh;function Zh(t,e){var r=this.__data__;if(r instanceof Hc){var n=r.__data__;if(!Xc||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new dh(n)}return r.set(t,e),this.size=r.size,this}zt(Zh,"stackSet");var Qh=Zh;function Jh(t){var e=this.__data__=new Hc(t);this.size=e.size}zt(Jh,"Stack"),Jh.prototype.clear=Wh,Jh.prototype.delete=Gh,Jh.prototype.get=Vh,Jh.prototype.has=Xh,Jh.prototype.set=Qh;var tu=Jh;function eu(t,e){return t&&sl(e,oc(e),t)}zt(eu,"baseAssign");var ru=eu;function nu(t,e){return t&&sl(e,gc(e),t)}zt(nu,"baseAssignIn");var iu=nu,au="object"==typeof exports&&exports&&!exports.nodeType&&exports,ou=au&&"object"==typeof module&&module&&!module.nodeType&&module,su=ou&&ou.exports===au?so.Buffer:void 0,lu=su?su.allocUnsafe:void 0;function cu(t,e){if(e)return t.slice();var r=t.length,n=lu?lu(r):new t.constructor(r);return t.copy(n),n}zt(cu,"cloneBuffer");var hu=cu;function uu(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}zt(uu,"arrayFilter");var du=uu;function pu(){return[]}zt(pu,"stubArray");var fu=pu,gu=Object.prototype.propertyIsEnumerable,mu=Object.getOwnPropertySymbols,yu=mu?function(t){return null==t?[]:(t=Object(t),du(mu(t),function(e){return gu.call(t,e)}))}:fu;function vu(t,e){return sl(t,yu(t),e)}zt(vu,"copySymbols");var bu=vu,xu=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Lh(e,yu(t)),t=Bh(t);return e}:fu;function Tu(t,e){return sl(t,xu(t),e)}zt(Tu,"copySymbolsIn");var wu=Tu;function ku(t,e,r){var n=e(t);return Ao(t)?n:Lh(n,r(t))}zt(ku,"baseGetAllKeys");var Cu=ku;function Eu(t){return Cu(t,oc,yu)}zt(Eu,"getAllKeys");var Su=Eu;function _u(t){return Cu(t,gc,xu)}zt(_u,"getAllKeysIn");var Au=_u,Ru=Ts(so,"DataView"),Lu=Ts(so,"Promise"),Iu=Ts(so,"Set"),Du="[object Map]",Nu="[object Promise]",Mu="[object Set]",Ou="[object WeakMap]",$u="[object DataView]",Pu=cs(Ru),Bu=cs(Xc),Fu=cs(Lu),zu=cs(Iu),Ku=cs(ws),ju=To;(Ru&&ju(new Ru(new ArrayBuffer(1)))!=$u||Xc&&ju(new Xc)!=Du||Lu&&ju(Lu.resolve())!=Nu||Iu&&ju(new Iu)!=Mu||ws&&ju(new ws)!=Ou)&&(ju=zt(function(t){var e=To(t),r="[object Object]"==e?t.constructor:void 0,n=r?cs(r):"";if(n)switch(n){case Pu:return $u;case Bu:return Du;case Fu:return Nu;case zu:return Mu;case Ku:return Ou}return e},"getTag"));var qu=ju,Wu=Object.prototype.hasOwnProperty;function Uu(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Wu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}zt(Uu,"initCloneArray");var Gu=Uu,Yu=so.Uint8Array;function Vu(t){var e=new t.constructor(t.byteLength);return new Yu(e).set(new Yu(t)),e}zt(Vu,"cloneArrayBuffer");var Hu=Vu;function Xu(t,e){var r=e?Hu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}zt(Xu,"cloneDataView");var Zu=Xu,Qu=/\w*$/;function Ju(t){var e=new t.constructor(t.source,Qu.exec(t));return e.lastIndex=t.lastIndex,e}zt(Ju,"cloneRegExp");var td=Ju,ed=lo?lo.prototype:void 0,rd=ed?ed.valueOf:void 0;function nd(t){return rd?Object(rd.call(t)):{}}zt(nd,"cloneSymbol");var id=nd;function ad(t,e){var r=e?Hu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}zt(ad,"cloneTypedArray");var od=ad;function sd(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Hu(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Zu(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return od(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return td(t);case"[object Symbol]":return id(t)}}zt(sd,"initCloneByTag");var ld=sd;function cd(t){return"function"!=typeof t.constructor||kl(t)?{}:Cs(Bh(t))}zt(cd,"initCloneObject");var hd=cd;function ud(t){return ko(t)&&"[object Map]"==qu(t)}zt(ud,"baseIsMap");var dd=ud,pd=Yl&&Yl.isMap,fd=pd?ql(pd):dd;function gd(t){return ko(t)&&"[object Set]"==qu(t)}zt(gd,"baseIsSet");var md=gd,yd=Yl&&Yl.isSet,vd=yd?ql(yd):md,bd="[object Arguments]",xd="[object Function]",Td="[object Object]",wd={};function kd(t,e,r,n,i,a){var o,s=1&e,l=2&e,c=4&e;if(r&&(o=i?r(t,n,i,a):r(t)),void 0!==o)return o;if(!zo(t))return t;var h=Ao(t);if(h){if(o=Gu(t),!s)return Ls(t,o)}else{var u=qu(t),d=u==xd||"[object GeneratorFunction]"==u;if(Bl(t))return hu(t,s);if(u==Td||u==bd||d&&!i){if(o=l||d?{}:hd(t),!s)return l?wu(t,iu(o,t)):bu(t,ru(o,t))}else{if(!wd[u])return i?t:{};o=ld(t,u,s)}}a||(a=new tu);var p=a.get(t);if(p)return p;a.set(t,o),vd(t)?t.forEach(function(n){o.add(kd(n,e,r,n,t,a))}):fd(t)&&t.forEach(function(n,i){o.set(i,kd(n,e,r,i,t,a))});var f=h?void 0:(c?l?Au:Su:l?gc:oc)(t);return Fs(f||t,function(n,i){f&&(n=t[i=n]),al(o,i,kd(n,e,r,i,t,a))}),o}wd[bd]=wd["[object Array]"]=wd["[object ArrayBuffer]"]=wd["[object DataView]"]=wd["[object Boolean]"]=wd["[object Date]"]=wd["[object Float32Array]"]=wd["[object Float64Array]"]=wd["[object Int8Array]"]=wd["[object Int16Array]"]=wd["[object Int32Array]"]=wd["[object Map]"]=wd["[object Number]"]=wd[Td]=wd["[object RegExp]"]=wd["[object Set]"]=wd["[object String]"]=wd["[object Symbol]"]=wd["[object Uint8Array]"]=wd["[object Uint8ClampedArray]"]=wd["[object Uint16Array]"]=wd["[object Uint32Array]"]=!0,wd["[object Error]"]=wd[xd]=wd["[object WeakMap]"]=!1,zt(kd,"baseClone");var Cd=kd;function Ed(t){return Cd(t,4)}zt(Ed,"clone");var Sd=Ed;function _d(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}zt(_d,"compact");var Ad=_d;function Rd(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}zt(Rd,"setCacheAdd");var Ld=Rd;function Id(t){return this.__data__.has(t)}zt(Id,"setCacheHas");var Dd=Id;function Nd(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new dh;++e<r;)this.add(t[e])}zt(Nd,"SetCache"),Nd.prototype.add=Nd.prototype.push=Ld,Nd.prototype.has=Dd;var Md=Nd;function Od(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}zt(Od,"arraySome");var $d=Od;function Pd(t,e){return t.has(e)}zt(Pd,"cacheHas");var Bd=Pd;function Fd(t,e,r,n,i,a){var o=1&r,s=t.length,l=e.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(t),h=a.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=2&r?new Md:void 0;for(a.set(t,e),a.set(e,t);++u<s;){var f=t[u],g=e[u];if(n)var m=o?n(g,f,u,e,t,a):n(f,g,u,t,e,a);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!$d(e,function(t,e){if(!Bd(p,e)&&(f===t||i(f,t,r,n,a)))return p.push(e)})){d=!1;break}}else if(f!==g&&!i(f,g,r,n,a)){d=!1;break}}return a.delete(t),a.delete(e),d}zt(Fd,"equalArrays");var zd=Fd;function Kd(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}zt(Kd,"mapToArray");var jd=Kd;function qd(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}zt(qd,"setToArray");var Wd=qd,Ud=lo?lo.prototype:void 0,Gd=Ud?Ud.valueOf:void 0;function Yd(t,e,r,n,i,a,o){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new Yu(t),new Yu(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return rl(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=jd;case"[object Set]":var l=1&n;if(s||(s=Wd),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;n|=2,o.set(t,e);var h=zd(s(t),s(e),n,i,a,o);return o.delete(t),h;case"[object Symbol]":if(Gd)return Gd.call(t)==Gd.call(e)}return!1}zt(Yd,"equalByTag");var Vd=Yd,Hd=Object.prototype.hasOwnProperty;function Xd(t,e,r,n,i,a){var o=1&r,s=Su(t),l=s.length;if(l!=Su(e).length&&!o)return!1;for(var c=l;c--;){var h=s[c];if(!(o?h in e:Hd.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var f=o;++c<l;){var g=t[h=s[c]],m=e[h];if(n)var y=o?n(m,g,h,e,t,a):n(g,m,h,t,e,a);if(!(void 0===y?g===m||i(g,m,r,n,a):y)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var v=t.constructor,b=e.constructor;v==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(t),a.delete(e),p}zt(Xd,"equalObjects");var Zd=Xd,Qd="[object Arguments]",Jd="[object Array]",tp="[object Object]",ep=Object.prototype.hasOwnProperty;function rp(t,e,r,n,i,a){var o=Ao(t),s=Ao(e),l=o?Jd:qu(t),c=s?Jd:qu(e),h=(l=l==Qd?tp:l)==tp,u=(c=c==Qd?tp:c)==tp,d=l==c;if(d&&Bl(t)){if(!Bl(e))return!1;o=!0,h=!1}if(d&&!h)return a||(a=new tu),o||Hl(t)?zd(t,e,r,n,i,a):Vd(t,e,l,r,n,i,a);if(!(1&r)){var p=h&&ep.call(t,"__wrapped__"),f=u&&ep.call(e,"__wrapped__");if(p||f){var g=p?t.value():t,m=f?e.value():e;return a||(a=new tu),i(g,m,r,n,a)}}return!!d&&(a||(a=new tu),Zd(t,e,r,n,i,a))}zt(rp,"baseIsEqualDeep");var np=rp;function ip(t,e,r,n,i){return t===e||(null==t||null==e||!ko(t)&&!ko(e)?t!=t&&e!=e:np(t,e,r,n,ip,i))}zt(ip,"baseIsEqual");var ap=ip;function op(t,e,r,n){var i=r.length,a=i,o=!n;if(null==t)return!a;for(t=Object(t);i--;){var s=r[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var l=(s=r[i])[0],c=t[l],h=s[1];if(o&&s[2]){if(void 0===c&&!(l in t))return!1}else{var u=new tu;if(n)var d=n(c,h,l,t,e,u);if(!(void 0===d?ap(h,c,3,n,u):d))return!1}}return!0}zt(op,"baseIsMatch");var sp=op;function lp(t){return t==t&&!zo(t)}zt(lp,"isStrictComparable");var cp=lp;function hp(t){for(var e=oc(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,cp(i)]}return e}zt(hp,"getMatchData");var up=hp;function dp(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}zt(dp,"matchesStrictComparable");var pp=dp;function fp(t){var e=up(t);return 1==e.length&&e[0][2]?pp(e[0][0],e[0][1]):function(r){return r===t||sp(r,t,e)}}zt(fp,"baseMatches");var gp=fp;function mp(t,e){return null!=t&&e in Object(t)}zt(mp,"baseHasIn");var yp=mp;function vp(t,e,r){for(var n=-1,i=(e=wh(e,t)).length,a=!1;++n<i;){var o=Ch(e[n]);if(!(a=null!=t&&r(t,o)))break;t=t[o]}return a||++n!=i?a:!!(i=null==t?0:t.length)&&fl(i)&&Qs(o,i)&&(Ao(t)||Dl(t))}zt(vp,"hasPath");var bp=vp;function xp(t,e){return null!=t&&bp(t,e,yp)}zt(xp,"hasIn");var Tp=xp;function wp(t,e){return bc(t)&&cp(e)?pp(Ch(t),e):function(r){var n=Ah(r,t);return void 0===n&&n===e?Tp(r,t):ap(e,n,3)}}zt(wp,"baseMatchesProperty");var kp=wp;function Cp(t){return function(e){return null==e?void 0:e[t]}}zt(Cp,"baseProperty");var Ep=Cp;function Sp(t){return function(e){return Sh(e,t)}}zt(Sp,"basePropertyDeep");var _p=Sp;function Ap(t){return bc(t)?Ep(Ch(t)):_p(t)}zt(Ap,"property");var Rp=Ap;function Lp(t){return"function"==typeof t?t:null==t?Jo:"object"==typeof t?Ao(t)?kp(t[0],t[1]):gp(t):Rp(t)}zt(Lp,"baseIteratee");var Ip=Lp;function Dp(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i<a;){var o=t[i];e(n,o,r(o),t)}return n}zt(Dp,"arrayAggregator");var Np=Dp;function Mp(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var l=o[t?s:++i];if(!1===r(a[l],l,a))break}return e}}zt(Mp,"createBaseFor");var Op=Mp();function $p(t,e){return t&&Op(t,e,oc)}zt($p,"baseForOwn");var Pp=$p;function Bp(t,e){return function(r,n){if(null==r)return r;if(!ml(r))return t(r,n);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&!1!==n(o[a],a,o););return r}}zt(Bp,"createBaseEach");var Fp=Bp(Pp);function zp(t,e,r,n){return Fp(t,function(t,i,a){e(n,t,r(t),a)}),n}zt(zp,"baseAggregator");var Kp=zp;function jp(t,e){return function(r,n){var i=Ao(r)?Np:Kp,a=e?e():{};return i(r,t,Ip(n,2),a)}}zt(jp,"createAggregator");var qp=jp,Wp=Object.prototype,Up=Wp.hasOwnProperty,Gp=dl(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&vl(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],o=gc(a),s=-1,l=o.length;++s<l;){var c=o[s],h=t[c];(void 0===h||rl(h,Wp[c])&&!Up.call(t,c))&&(t[c]=a[c])}return t});function Yp(t){return ko(t)&&ml(t)}zt(Yp,"isArrayLikeObject");var Vp=Yp;function Hp(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}zt(Hp,"arrayIncludesWith");var Xp=Hp;function Zp(t,e,r,n){var i=-1,a=Hs,o=!0,s=t.length,l=[],c=e.length;if(!s)return l;r&&(e=_o(e,ql(r))),n?(a=Xp,o=!1):e.length>=200&&(a=Bd,o=!1,e=new Md(e));t:for(;++i<s;){var h=t[i],u=null==r?h:r(h);if(h=n||0!==h?h:0,o&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;l.push(h)}else a(e,u,n)||l.push(h)}return l}zt(Zp,"baseDifference");var Qp=Zp,Jp=dl(function(t,e){return Vp(t)?Qp(t,Oh(e,1,Vp,!0)):[]});function tf(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}zt(tf,"last");var ef=tf;function rf(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:Zo(e),zh(t,e<0?0:e,n)):[]}zt(rf,"drop");var nf=rf;function af(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:Zo(e),zh(t,0,(e=n-e)<0?0:e)):[]}zt(af,"dropRight");var of=af;function sf(t){return"function"==typeof t?t:Jo}zt(sf,"castFunction");var lf=sf;function cf(t,e){return(Ao(t)?Fs:Fp)(t,lf(e))}zt(cf,"forEach");var hf=cf;function uf(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}zt(uf,"arrayEvery");var df=uf;function pf(t,e){var r=!0;return Fp(t,function(t,n,i){return r=!!e(t,n,i)}),r}zt(pf,"baseEvery");var ff=pf;function gf(t,e,r){var n=Ao(t)?df:ff;return r&&vl(t,e,r)&&(e=void 0),n(t,Ip(e,3))}zt(gf,"every");var mf=gf;function yf(t,e){var r=[];return Fp(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}zt(yf,"baseFilter");var vf=yf;function bf(t,e){return(Ao(t)?du:vf)(t,Ip(e,3))}zt(bf,"filter");var xf=bf;function Tf(t){return function(e,r,n){var i=Object(e);if(!ml(e)){var a=Ip(r,3);e=oc(e),r=zt(function(t){return a(i[t],t,i)},"predicate")}var o=t(e,r,n);return o>-1?i[a?e[o]:o]:void 0}}zt(Tf,"createFind");var wf=Tf,kf=Math.max;function Cf(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:Zo(r);return i<0&&(i=kf(n+i,0)),Ks(t,Ip(e,3),i)}zt(Cf,"findIndex");var Ef=wf(Cf);function Sf(t){return t&&t.length?t[0]:void 0}zt(Sf,"head");var _f=Sf;function Af(t,e){var r=-1,n=ml(t)?Array(t.length):[];return Fp(t,function(t,i,a){n[++r]=e(t,i,a)}),n}zt(Af,"baseMap");var Rf=Af;function Lf(t,e){return(Ao(t)?_o:Rf)(t,Ip(e,3))}zt(Lf,"map");var If=Lf;function Df(t,e){return Oh(If(t,e),1)}zt(Df,"flatMap");var Nf=Df,Mf=Object.prototype.hasOwnProperty,Of=qp(function(t,e,r){Mf.call(t,r)?t[r].push(e):tl(t,r,[e])}),$f=Object.prototype.hasOwnProperty;function Pf(t,e){return null!=t&&$f.call(t,e)}zt(Pf,"baseHas");var Bf=Pf;function Ff(t,e){return null!=t&&bp(t,e,Bf)}zt(Ff,"has");var zf=Ff;function Kf(t){return"string"==typeof t||!Ao(t)&&ko(t)&&"[object String]"==To(t)}zt(Kf,"isString");var jf=Kf;function qf(t,e){return _o(e,function(e){return t[e]})}zt(qf,"baseValues");var Wf=qf;function Uf(t){return null==t?[]:Wf(t,oc(t))}zt(Uf,"values");var Gf=Uf,Yf=Math.max;function Vf(t,e,r,n){t=ml(t)?t:Gf(t),r=r&&!n?Zo(r):0;var i=t.length;return r<0&&(r=Yf(i+r,0)),jf(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Ys(t,e,r)>-1}zt(Vf,"includes");var Hf=Vf,Xf=Math.max;function Zf(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:Zo(r);return i<0&&(i=Xf(n+i,0)),Ys(t,e,i)}zt(Zf,"indexOf");var Qf=Zf,Jf=Object.prototype.hasOwnProperty;function tg(t){if(null==t)return!0;if(ml(t)&&(Ao(t)||"string"==typeof t||"function"==typeof t.splice||Bl(t)||Hl(t)||Dl(t)))return!t.length;var e=qu(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(kl(t))return!ic(t).length;for(var r in t)if(Jf.call(t,r))return!1;return!0}zt(tg,"isEmpty");var eg=tg;function rg(t){return ko(t)&&"[object RegExp]"==To(t)}zt(rg,"baseIsRegExp");var ng=rg,ig=Yl&&Yl.isRegExp,ag=ig?ql(ig):ng;function og(t){return void 0===t}zt(og,"isUndefined");var sg=og;function lg(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}zt(lg,"negate");var cg=lg;function hg(t,e,r,n){if(!zo(t))return t;for(var i=-1,a=(e=wh(e,t)).length,o=a-1,s=t;null!=s&&++i<a;){var l=Ch(e[i]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=o){var h=s[l];void 0===(c=n?n(h,l,s):void 0)&&(c=zo(h)?h:Qs(e[i+1])?[]:{})}al(s,l,c),s=s[l]}return t}zt(hg,"baseSet");var ug=hg;function dg(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var o=e[n],s=Sh(t,o);r(s,o)&&ug(a,wh(o,t),s)}return a}zt(dg,"basePickBy");var pg=dg;function fg(t,e){if(null==t)return{};var r=_o(Au(t),function(t){return[t]});return e=Ip(e),pg(t,r,function(t,r){return e(t,r[0])})}zt(fg,"pickBy");var gg=fg;function mg(t,e,r,n,i){return i(t,function(t,i,a){r=n?(n=!1,t):e(r,t,i,a)}),r}zt(mg,"baseReduce");var yg=mg;function vg(t,e,r){var n=Ao(t)?jh:yg,i=arguments.length<3;return n(t,Ip(e,4),r,i,Fp)}zt(vg,"reduce");var bg=vg;function xg(t,e){return(Ao(t)?du:vf)(t,cg(Ip(e,3)))}zt(xg,"reject");var Tg=xg;function wg(t,e){var r;return Fp(t,function(t,n,i){return!(r=e(t,n,i))}),!!r}zt(wg,"baseSome");var kg=wg;function Cg(t,e,r){var n=Ao(t)?$d:kg;return r&&vl(t,e,r)&&(e=void 0),n(t,Ip(e,3))}zt(Cg,"some");var Eg=Cg,Sg=Iu&&1/Wd(new Iu([,-0]))[1]==1/0?function(t){return new Iu(t)}:As;function _g(t,e,r){var n=-1,i=Hs,a=t.length,o=!0,s=[],l=s;if(r)o=!1,i=Xp;else if(a>=200){var c=e?null:Sg(t);if(c)return Wd(c);o=!1,i=Bd,l=new Md}else l=e?[]:s;t:for(;++n<a;){var h=t[n],u=e?e(h):h;if(h=r||0!==h?h:0,o&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),s.push(h)}else i(l,u,r)||(l!==s&&l.push(u),s.push(h))}return s}zt(_g,"baseUniq");var Ag=_g;function Rg(t){return t&&t.length?Ag(t):[]}zt(Rg,"uniq");var Lg=Rg;function Ig(t){console&&console.error&&console.error(`Error: ${t}`)}function Dg(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Ng(t){const e=(new Date).getTime(),r=t();return{time:(new Date).getTime()-e,value:r}}function Mg(t){function e(){}zt(e,"FakeConstructor"),e.prototype=t;const r=new e;function n(){return typeof r.bar}return zt(n,"fakeAccess"),n(),n(),t}function Og(t){return $g(t)?t.LABEL:t.name}function $g(t){return jf(t.LABEL)&&""!==t.LABEL}zt(Ig,"PRINT_ERROR"),zt(Dg,"PRINT_WARNING"),zt(Ng,"timer"),zt(Mg,"toFastProperties"),zt(Og,"tokenLabel"),zt($g,"hasTokenLabel");var Pg=class{static{zt(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),hf(this.definition,e=>{e.accept(t)})}},Bg=class extends Pg{static{zt(this,"NonTerminal")}constructor(t){super([]),this.idx=1,lc(this,gg(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Fg=class extends Pg{static{zt(this,"Rule")}constructor(t){super(t.definition),this.orgText="",lc(this,gg(t,t=>void 0!==t))}},zg=class extends Pg{static{zt(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,lc(this,gg(t,t=>void 0!==t))}},Kg=class extends Pg{static{zt(this,"Option")}constructor(t){super(t.definition),this.idx=1,lc(this,gg(t,t=>void 0!==t))}},jg=class extends Pg{static{zt(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,lc(this,gg(t,t=>void 0!==t))}},qg=class extends Pg{static{zt(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,lc(this,gg(t,t=>void 0!==t))}},Wg=class extends Pg{static{zt(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,lc(this,gg(t,t=>void 0!==t))}},Ug=class extends Pg{static{zt(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,lc(this,gg(t,t=>void 0!==t))}},Gg=class extends Pg{static{zt(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,lc(this,gg(t,t=>void 0!==t))}},Yg=class{static{zt(this,"Terminal")}constructor(t){this.idx=1,lc(this,gg(t,t=>void 0!==t))}accept(t){t.visit(this)}};function Vg(t){return If(t,Hg)}function Hg(t){function e(t){return If(t,Hg)}if(zt(e,"convertDefinition"),t instanceof Bg){const e={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return jf(t.label)&&(e.label=t.label),e}if(t instanceof zg)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Kg)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof jg)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof qg)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Hg(new Yg({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Ug)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Hg(new Yg({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Wg)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Gg)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Yg){const e={type:"Terminal",name:t.terminalType.name,label:Og(t.terminalType),idx:t.idx};jf(t.label)&&(e.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(e.pattern=ag(r)?r.source:r),e}if(t instanceof Fg)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}zt(Vg,"serializeGrammar"),zt(Hg,"serializeProduction");var Xg=class{static{zt(this,"GAstVisitor")}visit(t){const e=t;switch(e.constructor){case Bg:return this.visitNonTerminal(e);case zg:return this.visitAlternative(e);case Kg:return this.visitOption(e);case jg:return this.visitRepetitionMandatory(e);case qg:return this.visitRepetitionMandatoryWithSeparator(e);case Ug:return this.visitRepetitionWithSeparator(e);case Wg:return this.visitRepetition(e);case Gg:return this.visitAlternation(e);case Yg:return this.visitTerminal(e);case Fg:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function Zg(t){return t instanceof zg||t instanceof Kg||t instanceof Wg||t instanceof jg||t instanceof qg||t instanceof Ug||t instanceof Yg||t instanceof Fg}function Qg(t,e=[]){return!!(t instanceof Kg||t instanceof Wg||t instanceof Ug)||(t instanceof Gg?Eg(t.definition,t=>Qg(t,e)):!(t instanceof Bg&&Hf(e,t))&&(t instanceof Pg&&(t instanceof Bg&&e.push(t),mf(t.definition,t=>Qg(t,e)))))}function Jg(t){return t instanceof Gg}function tm(t){if(t instanceof Bg)return"SUBRULE";if(t instanceof Kg)return"OPTION";if(t instanceof Gg)return"OR";if(t instanceof jg)return"AT_LEAST_ONE";if(t instanceof qg)return"AT_LEAST_ONE_SEP";if(t instanceof Ug)return"MANY_SEP";if(t instanceof Wg)return"MANY";if(t instanceof Yg)return"CONSUME";throw Error("non exhaustive match")}zt(Zg,"isSequenceProd"),zt(Qg,"isOptionalProd"),zt(Jg,"isBranchingProd"),zt(tm,"getProductionDslName");var em=class{static{zt(this,"RestWalker")}walk(t,e=[]){hf(t.definition,(r,n)=>{const i=nf(t.definition,n+1);if(r instanceof Bg)this.walkProdRef(r,i,e);else if(r instanceof Yg)this.walkTerminal(r,i,e);else if(r instanceof zg)this.walkFlat(r,i,e);else if(r instanceof Kg)this.walkOption(r,i,e);else if(r instanceof jg)this.walkAtLeastOne(r,i,e);else if(r instanceof qg)this.walkAtLeastOneSep(r,i,e);else if(r instanceof Ug)this.walkManySep(r,i,e);else if(r instanceof Wg)this.walkMany(r,i,e);else{if(!(r instanceof Gg))throw Error("non exhaustive match");this.walkOr(r,i,e)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){const n=e.concat(r);this.walk(t,n)}walkOption(t,e,r){const n=e.concat(r);this.walk(t,n)}walkAtLeastOne(t,e,r){const n=[new Kg({definition:t.definition})].concat(e,r);this.walk(t,n)}walkAtLeastOneSep(t,e,r){const n=rm(t,e,r);this.walk(t,n)}walkMany(t,e,r){const n=[new Kg({definition:t.definition})].concat(e,r);this.walk(t,n)}walkManySep(t,e,r){const n=rm(t,e,r);this.walk(t,n)}walkOr(t,e,r){const n=e.concat(r);hf(t.definition,t=>{const e=new zg({definition:[t]});this.walk(e,n)})}};function rm(t,e,r){return[new Kg({definition:[new Yg({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}function nm(t){if(t instanceof Bg)return nm(t.referencedRule);if(t instanceof Yg)return om(t);if(Zg(t))return im(t);if(Jg(t))return am(t);throw Error("non exhaustive match")}function im(t){let e=[];const r=t.definition;let n,i=0,a=r.length>i,o=!0;for(;a&&o;)n=r[i],o=Qg(n),e=e.concat(nm(n)),i+=1,a=r.length>i;return Lg(e)}function am(t){const e=If(t.definition,t=>nm(t));return Lg(Ph(e))}function om(t){return[t.terminalType]}zt(rm,"restForRepetitionWithSeparator"),zt(nm,"first"),zt(im,"firstForSequence"),zt(am,"firstForBranching"),zt(om,"firstForTerminal");var sm="_~IN~_",lm=class extends em{static{zt(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){const n=hm(t.referencedRule,t.idx)+this.topProd.name,i=e.concat(r),a=nm(new zg({definition:i}));this.follows[n]=a}};function cm(t){const e={};return hf(t,t=>{const r=new lm(t).startWalking();lc(e,r)}),e}function hm(t,e){return t.name+e+sm}zt(cm,"computeAllProdsFollows"),zt(hm,"buildBetweenProdsFollowPrefix");var um={},dm=new oa;function pm(t){const e=t.toString();if(um.hasOwnProperty(e))return um[e];{const t=dm.pattern(e);return um[e]=t,t}}function fm(){um={}}zt(pm,"getRegExpAst"),zt(fm,"clearRegExpParserCache");var gm="Complement Sets are not supported for first char optimization",mm='Unable to use "first char" lexer optimizations:\n';function ym(t,e=!1){try{const e=pm(t);return vm(e.value,{},e.flags.ignoreCase)}catch(r){if(r.message===gm)e&&Dg(`${mm}\tUnable to optimize: < ${t.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Ig(`${mm}\n\tFailed parsing: < ${t.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function vm(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)vm(t.value[i],e,r);break;case"Alternative":const n=t.value;for(let t=0;t<n.length;t++){const i=n[t];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const a=i;switch(a.type){case"Character":bm(a.value,e,r);break;case"Set":if(!0===a.complement)throw Error(gm);hf(a.value,t=>{if("number"==typeof t)bm(t,e,r);else{const n=t;if(!0===r)for(let t=n.from;t<=n.to;t++)bm(t,e,r);else{for(let t=n.from;t<=n.to&&t<ay;t++)bm(t,e,r);if(n.to>=ay){const t=n.from>=ay?n.from:ay,r=n.to,i=sy(t),a=sy(r);for(let n=i;n<=a;n++)e[n]=n}}}});break;case"Group":vm(a.value,e,r);break;default:throw Error("Non Exhaustive Match")}const o=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===wm(a)||"Group"!==a.type&&!1===o)break}break;default:throw Error("non exhaustive match!")}return Gf(e)}function bm(t,e,r){const n=sy(t);e[n]=n,!0===r&&xm(t,e)}function xm(t,e){const r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){const t=sy(n.charCodeAt(0));e[t]=t}else{const t=r.toLowerCase();if(t!==r){const r=sy(t.charCodeAt(0));e[r]=r}}}function Tm(t,e){return Ef(t.value,t=>{if("number"==typeof t)return Hf(e,t);{const r=t;return void 0!==Ef(e,t=>r.from<=t&&t<=r.to)}})}function wm(t){const e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(Ao(t.value)?mf(t.value,wm):wm(t.value))}zt(ym,"getOptimizedStartCodesIndices"),zt(vm,"firstCharOptimizedIndices"),zt(bm,"addOptimizedIdxToResult"),zt(xm,"handleIgnoreCase"),zt(Tm,"findCode"),zt(wm,"isWholeOptional");var km=class extends sa{static{zt(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t);case"Lookbehind":return void this.visitLookbehind(t);case"NegativeLookbehind":return void this.visitNegativeLookbehind(t)}super.visitChildren(t)}}visitCharacter(t){Hf(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===Tm(t,this.targetCharCodes)&&(this.found=!0):void 0!==Tm(t,this.targetCharCodes)&&(this.found=!0)}};function Cm(t,e){if(e instanceof RegExp){const r=pm(e),n=new km(t);return n.visit(r),n.found}return void 0!==Ef(e,e=>Hf(t,e.charCodeAt(0)))}zt(Cm,"canMatchCharCode");var Em="PATTERN",Sm="defaultMode",_m="modes",Am="boolean"==typeof new RegExp("(?:)").sticky;function Rm(t,e){const r=(e=Gp(e,{useSticky:Am,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:zt((t,e)=>e(),"tracer")})).tracer;let n;r("initCharCodeToOptimizedIndexMap",()=>{ly()}),r("Reject Lexer.NA",()=>{n=Tg(t,t=>t[Em]===Ay.NA)});let i,a,o,s,l,c,h,u,d,p,f,g=!1;r("Transform Patterns",()=>{g=!1,i=If(n,t=>{const r=t[Em];if(ag(r)){const t=r.source;return 1!==t.length||"^"===t||"$"===t||"."===t||r.ignoreCase?2!==t.length||"\\"!==t[0]||Hf(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?e.useSticky?Vm(r):Ym(r):t[1]:t}if(rs(r))return g=!0,{exec:r};if("object"==typeof r)return g=!0,r;if("string"==typeof r){if(1===r.length)return r;{const t=r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),n=new RegExp(t);return e.useSticky?Vm(n):Ym(n)}}throw Error("non exhaustive match")})}),r("misc mapping",()=>{a=If(n,t=>t.tokenTypeIdx),o=If(n,t=>{const e=t.GROUP;if(e!==Ay.SKIPPED){if(jf(e))return e;if(sg(e))return!1;throw Error("non exhaustive match")}}),s=If(n,t=>{const e=t.LONGER_ALT;if(e){return Ao(e)?If(e,t=>Qf(n,t)):[Qf(n,e)]}}),l=If(n,t=>t.PUSH_MODE),c=If(n,t=>zf(t,"POP_MODE"))}),r("Line Terminator Handling",()=>{const t=ny(e.lineTerminatorCharacters);h=If(n,t=>!1),"onlyOffset"!==e.positionTracking&&(h=If(n,e=>zf(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===ey(e,t)&&Cm(t,e.PATTERN)))}),r("Misc Mapping #2",()=>{u=If(n,Qm),d=If(i,Jm),p=bg(n,(t,e)=>{const r=e.GROUP;return jf(r)&&r!==Ay.SKIPPED&&(t[r]=[]),t},{}),f=If(i,(t,e)=>({pattern:i[e],longerAlt:s[e],canLineTerminator:h[e],isCustom:u[e],short:d[e],group:o[e],push:l[e],pop:c[e],tokenTypeIdx:a[e],tokenType:n[e]}))});let m=!0,y=[];return e.safeMode||r("First Char Optimization",()=>{y=bg(n,(t,r,n)=>{if("string"==typeof r.PATTERN){const e=sy(r.PATTERN.charCodeAt(0));iy(t,e,f[n])}else if(Ao(r.START_CHARS_HINT)){let e;hf(r.START_CHARS_HINT,r=>{const i=sy("string"==typeof r?r.charCodeAt(0):r);e!==i&&(e=i,iy(t,i,f[n]))})}else if(ag(r.PATTERN))if(r.PATTERN.unicode)m=!1,e.ensureOptimizations&&Ig(`${mm}\tUnable to analyze < ${r.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=ym(r.PATTERN,e.ensureOptimizations);eg(i)&&(m=!1),hf(i,e=>{iy(t,e,f[n])})}else e.ensureOptimizations&&Ig(`${mm}\tTokenType: <${r.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1;return t},[])}),{emptyGroups:p,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:g,canBeOptimized:m}}function Lm(t,e){let r=[];const n=Dm(t);r=r.concat(n.errors);const i=Nm(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(Im(a)),r=r.concat(Km(a)),r=r.concat(jm(a,e)),r=r.concat(qm(a)),r}function Im(t){let e=[];const r=xf(t,t=>ag(t[Em]));return e=e.concat(Om(r)),e=e.concat(Bm(r)),e=e.concat(Fm(r)),e=e.concat(zm(r)),e=e.concat($m(r)),e}function Dm(t){const e=xf(t,t=>!zf(t,Em));return{errors:If(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Cy.MISSING_PATTERN,tokenTypes:[t]})),valid:Jp(t,e)}}function Nm(t){const e=xf(t,t=>{const e=t[Em];return!(ag(e)||rs(e)||zf(e,"exec")||jf(e))});return{errors:If(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Cy.INVALID_PATTERN,tokenTypes:[t]})),valid:Jp(t,e)}}zt(Rm,"analyzeTokenTypes"),zt(Lm,"validatePatterns"),zt(Im,"validateRegExpPattern"),zt(Dm,"findMissingPatterns"),zt(Nm,"findInvalidPatterns");var Mm=/[^\\][$]/;function Om(t){class e extends sa{static{zt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}const r=xf(t,t=>{const r=t.PATTERN;try{const t=pm(r),n=new e;return n.visit(t),n.found}catch(n){return Mm.test(r.source)}});return If(r,t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Cy.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function $m(t){const e=xf(t,t=>t.PATTERN.test(""));return If(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Cy.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}zt(Om,"findEndOfInputAnchor"),zt($m,"findEmptyMatchRegExps");var Pm=/[^\\[][\^]|^\^/;function Bm(t){class e extends sa{static{zt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}const r=xf(t,t=>{const r=t.PATTERN;try{const t=pm(r),n=new e;return n.visit(t),n.found}catch(n){return Pm.test(r.source)}});return If(r,t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Cy.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Fm(t){const e=xf(t,t=>{const e=t[Em];return e instanceof RegExp&&(e.multiline||e.global)});return If(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Cy.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function zm(t){const e=[];let r=If(t,r=>bg(t,(t,n)=>(r.PATTERN.source!==n.PATTERN.source||Hf(e,n)||n.PATTERN===Ay.NA||(e.push(n),t.push(n)),t),[]));r=Ad(r);const n=xf(r,t=>t.length>1);return If(n,t=>{const e=If(t,t=>t.name);return{message:`The same RegExp pattern ->${_f(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Cy.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function Km(t){const e=xf(t,t=>{if(!zf(t,"GROUP"))return!1;const e=t.GROUP;return e!==Ay.SKIPPED&&e!==Ay.NA&&!jf(e)});return If(e,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Cy.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function jm(t,e){const r=xf(t,t=>void 0!==t.PUSH_MODE&&!Hf(e,t.PUSH_MODE));return If(r,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:Cy.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function qm(t){const e=[],r=bg(t,(t,e,r)=>{const n=e.PATTERN;return n===Ay.NA||(jf(n)?t.push({str:n,idx:r,tokenType:e}):ag(n)&&Um(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return hf(t,(t,n)=>{hf(r,({str:r,idx:i,tokenType:a})=>{if(n<i&&Wm(r,t.PATTERN)){const r=`Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${t.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:r,type:Cy.UNREACHABLE_PATTERN,tokenTypes:[t,a]})}})}),e}function Wm(t,e){if(ag(e)){if(Gm(e))return!1;const r=e.exec(t);return null!==r&&0===r.index}if(rs(e))return e(t,0,[],{});if(zf(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function Um(t){return void 0===Ef([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function Gm(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source)}function Ym(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Vm(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Hm(t,e,r){const n=[];return zf(t,Sm)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Sm+"> property in its definition\n",type:Cy.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),zf(t,_m)||n.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:Cy.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),zf(t,_m)&&zf(t,Sm)&&!zf(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Sm}: <${t.defaultMode}>which does not exist\n`,type:Cy.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),zf(t,_m)&&hf(t.modes,(t,e)=>{hf(t,(r,i)=>{if(sg(r))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${e}> at index: <${i}>\n`,type:Cy.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(zf(r,"LONGER_ALT")){const i=Ao(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];hf(i,i=>{sg(i)||Hf(t,i)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${r.name}> outside of mode <${e}>\n`,type:Cy.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function Xm(t,e,r){const n=[];let i=!1;const a=Ad(Ph(Gf(t.modes))),o=Tg(a,t=>t[Em]===Ay.NA),s=ny(r);return e&&hf(o,t=>{const e=ey(t,s);if(!1!==e){const r={message:ry(t,e),type:e.issue,tokenType:t};n.push(r)}else zf(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):Cm(s,t.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Cy.NO_LINE_BREAKS_FLAGS}),n}function Zm(t){const e={},r=oc(t);return hf(r,r=>{const n=t[r];if(!Ao(n))throw Error("non exhaustive match");e[r]=[]}),e}function Qm(t){const e=t.PATTERN;if(ag(e))return!1;if(rs(e))return!0;if(zf(e,"exec"))return!0;if(jf(e))return!1;throw Error("non exhaustive match")}function Jm(t){return!(!jf(t)||1!==t.length)&&t.charCodeAt(0)}zt(Bm,"findStartOfInputAnchor"),zt(Fm,"findUnsupportedFlags"),zt(zm,"findDuplicatePatterns"),zt(Km,"findInvalidGroupType"),zt(jm,"findModesThatDoNotExist"),zt(qm,"findUnreachablePatterns"),zt(Wm,"tryToMatchStrToPattern"),zt(Um,"noMetaChar"),zt(Gm,"usesLookAheadOrBehind"),zt(Ym,"addStartOfInput"),zt(Vm,"addStickyFlag"),zt(Hm,"performRuntimeChecks"),zt(Xm,"performWarningRuntimeChecks"),zt(Zm,"cloneEmptyGroups"),zt(Qm,"isCustomPattern"),zt(Jm,"isShortPattern");var ty={test:zt(function(t){const e=t.length;for(let r=this.lastIndex;r<e;r++){const e=t.charCodeAt(r);if(10===e)return this.lastIndex=r+1,!0;if(13===e)return 10===t.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function ey(t,e){if(zf(t,"LINE_BREAKS"))return!1;if(ag(t.PATTERN)){try{Cm(e,t.PATTERN)}catch(r){return{issue:Cy.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}if(jf(t.PATTERN))return!1;if(Qm(t))return{issue:Cy.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function ry(t,e){if(e.issue===Cy.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${t.name}> Token Type\n\t Root cause: ${e.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Cy.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${t.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function ny(t){return If(t,t=>jf(t)?t.charCodeAt(0):t)}function iy(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}zt(ey,"checkLineBreaksIssues"),zt(ry,"buildLineBreakIssueMessage"),zt(ny,"getCharCodes"),zt(iy,"addToMapOfArrays");var ay=256,oy=[];function sy(t){return t<ay?t:oy[t]}function ly(){if(eg(oy)){oy=new Array(65536);for(let t=0;t<65536;t++)oy[t]=t>255?255+~~(t/255):t}}function cy(t,e){const r=t.tokenTypeIdx;return r===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[r]}function hy(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}zt(sy,"charCodeToOptimizedIndex"),zt(ly,"initCharCodeToOptimizedIndexMap"),zt(cy,"tokenStructuredMatcher"),zt(hy,"tokenStructuredMatcherNoCategories");var uy=1,dy={};function py(t){const e=fy(t);gy(e),yy(e),my(e),hf(e,t=>{t.isParent=t.categoryMatches.length>0})}function fy(t){let e=Sd(t),r=t,n=!0;for(;n;){r=Ad(Ph(If(r,t=>t.CATEGORIES)));const t=Jp(r,e);e=e.concat(t),eg(t)?n=!1:r=t}return e}function gy(t){hf(t,t=>{by(t)||(dy[uy]=t,t.tokenTypeIdx=uy++),xy(t)&&!Ao(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),xy(t)||(t.CATEGORIES=[]),Ty(t)||(t.categoryMatches=[]),wy(t)||(t.categoryMatchesMap={})})}function my(t){hf(t,t=>{t.categoryMatches=[],hf(t.categoryMatchesMap,(e,r)=>{t.categoryMatches.push(dy[r].tokenTypeIdx)})})}function yy(t){hf(t,t=>{vy([],t)})}function vy(t,e){hf(t,t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0}),hf(e.CATEGORIES,r=>{const n=t.concat(e);Hf(n,r)||vy(n,r)})}function by(t){return zf(t,"tokenTypeIdx")}function xy(t){return zf(t,"CATEGORIES")}function Ty(t){return zf(t,"categoryMatches")}function wy(t){return zf(t,"categoryMatchesMap")}function ky(t){return zf(t,"tokenTypeIdx")}zt(py,"augmentTokenTypes"),zt(fy,"expandCategories"),zt(gy,"assignTokenDefaultProps"),zt(my,"assignCategoriesTokensProp"),zt(yy,"assignCategoriesMapProp"),zt(vy,"singleAssignCategoriesToksMap"),zt(by,"hasShortKeyProperty"),zt(xy,"hasCategoriesProperty"),zt(Ty,"hasExtendingTokensTypesProperty"),zt(wy,"hasExtendingTokensTypesMapProperty"),zt(ky,"isTokenType");var Cy,Ey,Sy={buildUnableToPopLexerModeMessage:t=>`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(t,e,r,n,i,a)=>`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`};(Ey=Cy||(Cy={}))[Ey.MISSING_PATTERN=0]="MISSING_PATTERN",Ey[Ey.INVALID_PATTERN=1]="INVALID_PATTERN",Ey[Ey.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",Ey[Ey.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",Ey[Ey.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",Ey[Ey.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",Ey[Ey.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",Ey[Ey.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",Ey[Ey.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",Ey[Ey.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",Ey[Ey.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",Ey[Ey.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",Ey[Ey.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",Ey[Ey.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",Ey[Ey.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",Ey[Ey.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",Ey[Ey.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",Ey[Ey.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";var _y={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Sy,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(_y);var Ay=class{static{zt(this,"Lexer")}constructor(t,e=_y){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${r}--\x3e <${t}>`);const{time:n,value:i}=Ng(e),a=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${r}<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i}return e()},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=lc({},_y,e);const r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,n=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===_y.lineTerminatorsPattern)this.config.lineTerminatorsPattern=ty;else if(this.config.lineTerminatorCharacters===_y.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Ao(t)?r={modes:{defaultMode:Sd(t)},defaultMode:Sm}:(n=!1,r=Sd(t))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Hm(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Xm(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes?r.modes:{},hf(r.modes,(t,e)=>{r.modes[e]=Tg(t,t=>sg(t))});const i=oc(r.modes);if(hf(r.modes,(t,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Lm(t,i))}),eg(this.lexerDefinitionErrors)){let n;py(t),this.TRACE_INIT("analyzeTokenTypes",()=>{n=Rm(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=n.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=n.charCodeToPatternIdxToConfig,this.emptyGroups=lc({},this.emptyGroups,n.emptyGroups),this.hasCustom=n.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=n.canBeOptimized}})}),this.defaultMode=r.defaultMode,!eg(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const t=If(this.lexerDefinitionErrors,t=>t.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+t)}hf(this.lexerDefinitionWarning,t=>{Dg(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Am?(this.chopInput=Jo,this.match=this.matchWithTest):(this.updateLastIndex=As,this.match=this.matchWithExec),n&&(this.handleModes=As),!1===this.trackStartLines&&(this.computeNewColumn=Jo),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=As),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const t=bg(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(e.ensureOptimizations&&!eg(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{fm()}),this.TRACE_INIT("toFastProperties",()=>{Mg(this)})})}tokenize(t,e=this.defaultMode){if(!eg(this.lexerDefinitionErrors)){const t=If(this.lexerDefinitionErrors,t=>t.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+t)}return this.tokenizeInternal(t,e)}tokenizeInternal(t,e){let r,n,i,a,o,s,l,c,h,u,d,p,f,g,m;const y=t,v=y.length;let b=0,x=0;const T=this.hasCustom?0:Math.floor(t.length/10),w=new Array(T),k=[];let C=this.trackStartLines?1:void 0,E=this.trackStartLines?1:void 0;const S=Zm(this.emptyGroups),_=this.trackStartLines,A=this.config.lineTerminatorsPattern;let R=0,L=[],I=[];const D=[],N=[];let M;function O(){return L}function $(t){const e=sy(t),r=I[e];return void 0===r?N:r}Object.freeze(N),zt(O,"getPossiblePatternsSlow"),zt($,"getPossiblePatternsOptimized");const P=zt(t=>{if(1===D.length&&void 0===t.tokenType.PUSH_MODE){const e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);k.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})}else{D.pop();const t=ef(D);L=this.patternIdxToConfig[t],I=this.charCodeToPatternIdxToConfig[t],R=L.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;M=I&&e?$:O}},"pop_mode");function B(t){D.push(t),I=this.charCodeToPatternIdxToConfig[t],L=this.patternIdxToConfig[t],R=L.length,R=L.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;M=I&&e?$:O}let F;zt(B,"push_mode"),B.call(this,e);const z=this.config.recoveryEnabled;for(;b<v;){s=null;const e=y.charCodeAt(b),T=M(e),I=T.length;for(r=0;r<I;r++){F=T[r];const n=F.pattern;l=null;const h=F.short;if(!1!==h?e===h&&(s=n):!0===F.isCustom?(m=n.exec(y,b,w,S),null!==m?(s=m[0],void 0!==m.payload&&(l=m.payload)):s=null):(this.updateLastIndex(n,b),s=this.match(n,t,b)),null!==s){if(o=F.longerAlt,void 0!==o){const e=o.length;for(i=0;i<e;i++){const e=L[o[i]],r=e.pattern;if(c=null,!0===e.isCustom?(m=r.exec(y,b,w,S),null!==m?(a=m[0],void 0!==m.payload&&(c=m.payload)):a=null):(this.updateLastIndex(r,b),a=this.match(r,t,b)),a&&a.length>s.length){s=a,l=c,F=e;break}}}break}}if(null!==s){if(h=s.length,u=F.group,void 0!==u&&(d=F.tokenTypeIdx,p=this.createTokenInstance(s,b,d,F.tokenType,C,E,h),this.handlePayload(p,l),!1===u?x=this.addToken(w,x,p):S[u].push(p)),t=this.chopInput(t,h),b+=h,E=this.computeNewColumn(E,h),!0===_&&!0===F.canLineTerminator){let t,e,r=0;A.lastIndex=0;do{t=A.test(s),!0===t&&(e=A.lastIndex-1,r++)}while(!0===t);0!==r&&(C+=r,E=h-e,this.updateTokenEndLineColumnLocation(p,u,e,r,C,E,h))}this.handleModes(F,P,B,p)}else{const e=b,r=C,i=E;let a=!1===z;for(;!1===a&&b<v;)for(t=this.chopInput(t,1),b++,n=0;n<R;n++){const e=L[n],r=e.pattern,i=e.short;if(!1!==i?y.charCodeAt(b)===i&&(a=!0):!0===e.isCustom?a=null!==r.exec(y,b,w,S):(this.updateLastIndex(r,b),a=null!==r.exec(t)),!0===a)break}if(f=b-e,E=this.computeNewColumn(E,f),g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,e,f,r,i,ef(D)),k.push({offset:e,line:r,column:i,length:f,message:g}),!1===z)break}}return this.hasCustom||(w.length=x),{tokens:w,groups:S,errors:k}}handleModes(t,e,r,n){if(!0===t.pop){const i=t.push;e(n),void 0!==i&&r.call(this,i)}else void 0!==t.push&&r.call(this,t.push)}chopInput(t,e){return t.substring(e)}updateLastIndex(t,e){t.lastIndex=e}updateTokenEndLineColumnLocation(t,e,r,n,i,a,o){let s,l;void 0!==e&&(s=r===o-1,l=s?-1:0,1===n&&!0===s||(t.endLine=i+l,t.endColumn=a-1-l))}computeNewColumn(t,e){return t+e}createOffsetOnlyToken(t,e,r,n){return{image:t,startOffset:e,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(t,e,r,n,i,a){return{image:t,startOffset:e,startLine:i,startColumn:a,tokenTypeIdx:r,tokenType:n}}createFullToken(t,e,r,n,i,a,o){return{image:t,startOffset:e,endOffset:e+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(t,e,r){return t.push(r),e}addTokenUsingMemberAccess(t,e,r){return t[e]=r,++e}handlePayloadNoCustom(t,e){}handlePayloadWithCustom(t,e){null!==e&&(t.payload=e)}matchWithTest(t,e,r){return!0===t.test(e)?e.substring(r,t.lastIndex):null}matchWithExec(t,e){const r=t.exec(e);return null!==r?r[0]:null}};function Ry(t){return Ly(t)?t.LABEL:t.name}function Ly(t){return jf(t.LABEL)&&""!==t.LABEL}Ay.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",Ay.NA=/NOT_APPLICABLE/,zt(Ry,"tokenLabel"),zt(Ly,"hasTokenLabel");var Iy="categories",Dy="label",Ny="group",My="push_mode",Oy="pop_mode",$y="longer_alt",Py="line_breaks",By="start_chars_hint";function Fy(t){return zy(t)}function zy(t){const e=t.pattern,r={};if(r.name=t.name,sg(e)||(r.PATTERN=e),zf(t,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";return zf(t,Iy)&&(r.CATEGORIES=t[Iy]),py([r]),zf(t,Dy)&&(r.LABEL=t[Dy]),zf(t,Ny)&&(r.GROUP=t[Ny]),zf(t,Oy)&&(r.POP_MODE=t[Oy]),zf(t,My)&&(r.PUSH_MODE=t[My]),zf(t,$y)&&(r.LONGER_ALT=t[$y]),zf(t,Py)&&(r.LINE_BREAKS=t[Py]),zf(t,By)&&(r.START_CHARS_HINT=t[By]),r}zt(Fy,"createToken"),zt(zy,"createTokenInternal");var Ky=Fy({name:"EOF",pattern:Ay.NA});function jy(t,e,r,n,i,a,o,s){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function qy(t,e){return cy(t,e)}py([Ky]),zt(jy,"createTokenInstance"),zt(qy,"tokenMatcher");var Wy={buildMismatchTokenMessage:({expected:t,actual:e,previous:r,ruleName:n})=>`Expecting ${Ly(t)?`--\x3e ${Ry(t)} <--`:`token of type --\x3e ${t.name} <--`} but found --\x3e '${e.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:t,ruleName:e})=>"Redundant input, expecting EOF but found: "+t.image,buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){const a="Expecting: ",o="\nbut found: '"+_f(e).image+"'";if(n)return a+n+o;{const e=bg(t,(t,e)=>t.concat(e),[]),r=If(e,t=>`[${If(t,t=>Ry(t)).join(", ")}]`);return a+`one of these possible Token sequences:\n${If(r,(t,e)=>` ${e+1}. ${t}`).join("\n")}`+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){const i="Expecting: ",a="\nbut found: '"+_f(e).image+"'";if(r)return i+r+a;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${If(t,t=>`[${If(t,t=>Ry(t)).join(",")}]`).join(" ,")}>`+a}};Object.freeze(Wy);var Uy={buildRuleNotFoundError:(t,e)=>"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"},Gy={buildDuplicateFoundError(t,e){function r(t){return t instanceof Yg?t.terminalType.name:t instanceof Bg?t.nonTerminalName:""}zt(r,"getExtraProductionArgument");const n=t.name,i=_f(e),a=i.idx,o=tm(i),s=r(i);let l=`->${o}${a>0?a:""}<- ${s?`with argument: ->${s}<-`:""}\n appears more than once (${e.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:t=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(t){const e=If(t.prefixPath,t=>Ry(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${r}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(t){const e=If(t.prefixPath,t=>Ry(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n},buildEmptyRepetitionError(t){let e=tm(t.repetition);0!==t.repetition.idx&&(e+=t.repetition.idx);return`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:t=>"deprecated",buildEmptyAlternationError:t=>`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:t=>`An Alternation cannot have more than 256 alternatives:\n<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\n has ${t.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(t){const e=t.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${e}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${e} --\x3e ${If(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:t=>"deprecated",buildDuplicateRuleNameError(t){let e;e=t.topLevelRule instanceof Fg?t.topLevelRule.name:t.topLevelRule;return`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function Yy(t,e){const r=new Xy(t,e);return r.resolveRefs(),r.errors}zt(Yy,"resolveGrammar");var Vy,Hy,Xy=class extends Xg{static{zt(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){hf(Gf(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){const e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{const e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:e,type:Vb.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}},Zy=class extends em{static{zt(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Sd(this.path.ruleStack).reverse(),this.occurrenceStack=Sd(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,r){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){const n=e.concat(r);this.updateExpectedNext(),this.walk(t.referencedRule,n)}}updateExpectedNext(){eg(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Qy=class extends Zy{static{zt(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,r){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){const t=e.concat(r),n=new zg({definition:t});this.possibleTokTypes=nm(n),this.found=!0}}},Jy=class extends em{static{zt(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},tv=class extends Jy{static{zt(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){if(t.idx===this.occurrence){const t=_f(e.concat(r));this.result.isEndOfRule=void 0===t,t instanceof Yg&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkMany(t,e,r)}},ev=class extends Jy{static{zt(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){if(t.idx===this.occurrence){const t=_f(e.concat(r));this.result.isEndOfRule=void 0===t,t instanceof Yg&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkManySep(t,e,r)}},rv=class extends Jy{static{zt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){if(t.idx===this.occurrence){const t=_f(e.concat(r));this.result.isEndOfRule=void 0===t,t instanceof Yg&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOne(t,e,r)}},nv=class extends Jy{static{zt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){if(t.idx===this.occurrence){const t=_f(e.concat(r));this.result.isEndOfRule=void 0===t,t instanceof Yg&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOneSep(t,e,r)}};function iv(t,e,r=[]){r=Sd(r);let n=[],i=0;function a(e){return e.concat(nf(t,i+1))}function o(t){const i=iv(a(t),e,r);return n.concat(i)}for(zt(a,"remainingPathWith"),zt(o,"getAlternativesForProd");r.length<e&&i<t.length;){const e=t[i];if(e instanceof zg)return o(e.definition);if(e instanceof Bg)return o(e.definition);if(e instanceof Kg)n=o(e.definition);else{if(e instanceof jg){return o(e.definition.concat([new Wg({definition:e.definition})]))}if(e instanceof qg){return o([new zg({definition:e.definition}),new Wg({definition:[new Yg({terminalType:e.separator})].concat(e.definition)})])}if(e instanceof Ug){const t=e.definition.concat([new Wg({definition:[new Yg({terminalType:e.separator})].concat(e.definition)})]);n=o(t)}else if(e instanceof Wg){const t=e.definition.concat([new Wg({definition:e.definition})]);n=o(t)}else{if(e instanceof Gg)return hf(e.definition,t=>{!1===eg(t.definition)&&(n=o(t.definition))}),n;if(!(e instanceof Yg))throw Error("non exhaustive match");r.push(e.terminalType)}}i++}return n.push({partialPath:r,suffixDef:nf(t,i)}),n}function av(t,e,r,n){const i="EXIT_NONE_TERMINAL",a=[i],o="EXIT_ALTERNATIVE";let s=!1;const l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!eg(u);){const t=u.pop();if(t===o){s&&ef(u).idx<=c&&u.pop();continue}const n=t.def,d=t.idx,p=t.ruleStack,f=t.occurrenceStack;if(eg(n))continue;const g=n[0];if(g===i){const t={idx:d,def:nf(n),ruleStack:of(p),occurrenceStack:of(f)};u.push(t)}else if(g instanceof Yg)if(d<l-1){const t=d+1;if(r(e[t],g.terminalType)){const e={idx:t,def:nf(n),ruleStack:p,occurrenceStack:f};u.push(e)}}else{if(d!==l-1)throw Error("non exhaustive match");h.push({nextTokenType:g.terminalType,nextTokenOccurrence:g.idx,ruleStack:p,occurrenceStack:f}),s=!0}else if(g instanceof Bg){const t=Sd(p);t.push(g.nonTerminalName);const e=Sd(f);e.push(g.idx);const r={idx:d,def:g.definition.concat(a,nf(n)),ruleStack:t,occurrenceStack:e};u.push(r)}else if(g instanceof Kg){const t={idx:d,def:nf(n),ruleStack:p,occurrenceStack:f};u.push(t),u.push(o);const e={idx:d,def:g.definition.concat(nf(n)),ruleStack:p,occurrenceStack:f};u.push(e)}else if(g instanceof jg){const t=new Wg({definition:g.definition,idx:g.idx}),e={idx:d,def:g.definition.concat([t],nf(n)),ruleStack:p,occurrenceStack:f};u.push(e)}else if(g instanceof qg){const t=new Yg({terminalType:g.separator}),e=new Wg({definition:[t].concat(g.definition),idx:g.idx}),r={idx:d,def:g.definition.concat([e],nf(n)),ruleStack:p,occurrenceStack:f};u.push(r)}else if(g instanceof Ug){const t={idx:d,def:nf(n),ruleStack:p,occurrenceStack:f};u.push(t),u.push(o);const e=new Yg({terminalType:g.separator}),r=new Wg({definition:[e].concat(g.definition),idx:g.idx}),i={idx:d,def:g.definition.concat([r],nf(n)),ruleStack:p,occurrenceStack:f};u.push(i)}else if(g instanceof Wg){const t={idx:d,def:nf(n),ruleStack:p,occurrenceStack:f};u.push(t),u.push(o);const e=new Wg({definition:g.definition,idx:g.idx}),r={idx:d,def:g.definition.concat([e],nf(n)),ruleStack:p,occurrenceStack:f};u.push(r)}else if(g instanceof Gg)for(let e=g.definition.length-1;e>=0;e--){const t={idx:d,def:g.definition[e].definition.concat(nf(n)),ruleStack:p,occurrenceStack:f};u.push(t),u.push(o)}else if(g instanceof zg)u.push({idx:d,def:g.definition.concat(nf(n)),ruleStack:p,occurrenceStack:f});else{if(!(g instanceof Fg))throw Error("non exhaustive match");u.push(ov(g,d,p,f))}}return h}function ov(t,e,r,n){const i=Sd(r);i.push(t.name);const a=Sd(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}function sv(t){if(t instanceof Kg||"Option"===t)return Vy.OPTION;if(t instanceof Wg||"Repetition"===t)return Vy.REPETITION;if(t instanceof jg||"RepetitionMandatory"===t)return Vy.REPETITION_MANDATORY;if(t instanceof qg||"RepetitionMandatoryWithSeparator"===t)return Vy.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Ug||"RepetitionWithSeparator"===t)return Vy.REPETITION_WITH_SEPARATOR;if(t instanceof Gg||"Alternation"===t)return Vy.ALTERNATION;throw Error("non exhaustive match")}function lv(t){const{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=sv(n);return a===Vy.ALTERNATION?bv(e,r,i):xv(e,r,a,i)}function cv(t,e,r,n,i,a){const o=bv(t,e,r);return a(o,n,kv(o)?hy:cy,i)}function hv(t,e,r,n,i,a){const o=xv(t,e,i,r),s=kv(o)?hy:cy;return a(o[0],s,n)}function uv(t,e,r,n){const i=t.length,a=mf(t,t=>mf(t,t=>1===t.length));if(e)return function(e){const n=If(e,t=>t.GATE);for(let a=0;a<i;a++){const e=t[a],i=e.length,o=n[a];if(void 0===o||!1!==o.call(this))t:for(let t=0;t<i;t++){const n=e[t],i=n.length;for(let t=0;t<i;t++){const e=this.LA(t+1);if(!1===r(e,n[t]))continue t}return a}}};if(a&&!n){const e=If(t,t=>Ph(t)),r=bg(e,(t,e,r)=>(hf(e,e=>{zf(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),hf(e.categoryMatches,e=>{zf(t,e)||(t[e]=r)})}),t),{});return function(){const t=this.LA(1);return r[t.tokenTypeIdx]}}return function(){for(let e=0;e<i;e++){const n=t[e],i=n.length;t:for(let t=0;t<i;t++){const i=n[t],a=i.length;for(let t=0;t<a;t++){const e=this.LA(t+1);if(!1===r(e,i[t]))continue t}return e}}}}function dv(t,e,r){const n=mf(t,t=>1===t.length),i=t.length;if(n&&!r){const e=Ph(t);if(1===e.length&&eg(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=bg(e,(t,e,r)=>(t[e.tokenTypeIdx]=!0,hf(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){t:for(let r=0;r<i;r++){const n=t[r],i=n.length;for(let t=0;t<i;t++){const r=this.LA(t+1);if(!1===e(r,n[t]))continue t}return!0}return!1}}zt(iv,"possiblePathsFrom"),zt(av,"nextPossibleTokensAfter"),zt(ov,"expandTopLevelRule"),(Hy=Vy||(Vy={}))[Hy.OPTION=0]="OPTION",Hy[Hy.REPETITION=1]="REPETITION",Hy[Hy.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",Hy[Hy.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",Hy[Hy.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",Hy[Hy.ALTERNATION=5]="ALTERNATION",zt(sv,"getProdType"),zt(lv,"getLookaheadPaths"),zt(cv,"buildLookaheadFuncForOr"),zt(hv,"buildLookaheadFuncForOptionalProd"),zt(uv,"buildAlternativesLookAheadFunc"),zt(dv,"buildSingleAlternativeLookaheadFunction");var pv=class extends em{static{zt(this,"RestDefinitionFinderWalker")}constructor(t,e,r){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,r,n){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(n),!0)}walkOption(t,e,r){this.checkIsTarget(t,Vy.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,Vy.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,Vy.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,Vy.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,Vy.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},fv=class extends Xg{static{zt(this,"InsideDefinitionFinderVisitor")}constructor(t,e,r){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=r,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Vy.OPTION)}visitRepetition(t){this.checkIsTarget(t,Vy.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Vy.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Vy.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Vy.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Vy.ALTERNATION)}};function gv(t){const e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}function mv(t){let e=[""];for(let r=0;r<t.length;r++){const n=t[r],i=[];for(let t=0;t<e.length;t++){const r=e[t];i.push(r+"_"+n.tokenTypeIdx);for(let t=0;t<n.categoryMatches.length;t++){const e="_"+n.categoryMatches[t];i.push(r+e)}}e=i}return e}function yv(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;const i=t[n];for(let t=0;t<e.length;t++){if(!0===i[e[t]])return!1}}return!0}function vv(t,e){const r=If(t,t=>iv([t],1)),n=gv(r.length),i=If(r,t=>{const e={};return hf(t,t=>{const r=mv(t.partialPath);hf(r,t=>{e[t]=!0})}),e});let a=r;for(let o=1;o<=e;o++){const t=a;a=gv(t.length);for(let r=0;r<t.length;r++){const s=t[r];for(let t=0;t<s.length;t++){const l=s[t].partialPath,c=s[t].suffixDef,h=mv(l);if(yv(i,h,r)||eg(c)||l.length===e){const t=n[r];if(!1===Tv(t,l)){t.push(l);for(let t=0;t<h.length;t++){const e=h[t];i[r][e]=!0}}}else{const t=iv(c,o+1,l);a[r]=a[r].concat(t),hf(t,t=>{const e=mv(t.partialPath);hf(e,t=>{i[r][t]=!0})})}}}}return n}function bv(t,e,r,n){const i=new fv(t,Vy.ALTERNATION,n);return e.accept(i),vv(i.result,r)}function xv(t,e,r,n){const i=new fv(t,r);e.accept(i);const a=i.result,o=new pv(e,t,r).startWalking();return vv([new zg({definition:a}),new zg({definition:o})],n)}function Tv(t,e){t:for(let r=0;r<t.length;r++){const n=t[r];if(n.length===e.length){for(let t=0;t<n.length;t++){const r=e[t],i=n[t];if(!1===(r===i||void 0!==i.categoryMatchesMap[r.tokenTypeIdx]))continue t}return!0}}return!1}function wv(t,e){return t.length<e.length&&mf(t,(t,r)=>{const n=e[r];return t===n||n.categoryMatchesMap[t.tokenTypeIdx]})}function kv(t){return mf(t,t=>mf(t,t=>mf(t,t=>eg(t.categoryMatches))))}function Cv(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return If(e,t=>Object.assign({type:Vb.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Ev(t,e,r,n){const i=Nf(t,t=>Sv(t,r)),a=jv(t,e,r),o=Nf(t,t=>Bv(t,r)),s=Nf(t,e=>Lv(e,t,n,r));return i.concat(a,o,s)}function Sv(t,e){const r=new Rv;t.accept(r);const n=r.allProductions,i=Of(n,_v),a=gg(i,t=>t.length>1);return If(Gf(a),r=>{const n=_f(r),i=e.buildDuplicateFoundError(t,r),a=tm(n),o={message:i,type:Vb.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:a,occurrence:n.idx},s=Av(n);return s&&(o.parameter=s),o})}function _v(t){return`${tm(t)}_#_${t.idx}_#_${Av(t)}`}function Av(t){return t instanceof Yg?t.terminalType.name:t instanceof Bg?t.nonTerminalName:""}zt(gv,"initializeArrayOfArrays"),zt(mv,"pathToHashKeys"),zt(yv,"isUniquePrefixHash"),zt(vv,"lookAheadSequenceFromAlternatives"),zt(bv,"getLookaheadPathsForOr"),zt(xv,"getLookaheadPathsForOptionalProd"),zt(Tv,"containsPath"),zt(wv,"isStrictPrefixOfPath"),zt(kv,"areTokenCategoriesNotUsed"),zt(Cv,"validateLookahead"),zt(Ev,"validateGrammar"),zt(Sv,"validateDuplicateProductions"),zt(_v,"identifyProductionForDuplicates"),zt(Av,"getExtraProductionArgument");var Rv=class extends Xg{static{zt(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};function Lv(t,e,r,n){const i=[];if(bg(e,(e,r)=>r.name===t.name?e+1:e,0)>1){const e=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:e,type:Vb.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function Iv(t,e,r){const n=[];let i;return Hf(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Vb.INVALID_RULE_OVERRIDE,ruleName:t})),n}function Dv(t,e,r,n=[]){const i=[],a=Nv(e.definition);if(eg(a))return[];{const e=t.name;Hf(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Vb.LEFT_RECURSION,ruleName:e});const o=Jp(a,n.concat([t])),s=Nf(o,e=>{const i=Sd(n);return i.push(e),Dv(t,e,r,i)});return i.concat(s)}}function Nv(t){let e=[];if(eg(t))return e;const r=_f(t);if(r instanceof Bg)e.push(r.referencedRule);else if(r instanceof zg||r instanceof Kg||r instanceof jg||r instanceof qg||r instanceof Ug||r instanceof Wg)e=e.concat(Nv(r.definition));else if(r instanceof Gg)e=Ph(If(r.definition,t=>Nv(t.definition)));else if(!(r instanceof Yg))throw Error("non exhaustive match");const n=Qg(r),i=t.length>1;if(n&&i){const r=nf(t);return e.concat(Nv(r))}return e}zt(Lv,"validateRuleDoesNotAlreadyExist"),zt(Iv,"validateRuleIsOverridden"),zt(Dv,"validateNoLeftRecursion"),zt(Nv,"getFirstNoneTerminal");var Mv=class extends Xg{static{zt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function Ov(t,e){const r=new Mv;t.accept(r);const n=r.alternations;return Nf(n,r=>{const n=of(r.definition);return Nf(n,(n,i)=>{const a=av([n],[],cy,1);return eg(a)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:r,emptyChoiceIdx:i}),type:Vb.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:r.idx,alternative:i+1}]:[]})})}function $v(t,e,r){const n=new Mv;t.accept(n);let i=n.alternations;i=Tg(i,t=>!0===t.ignoreAmbiguities);return Nf(i,n=>{const i=n.idx,a=n.maxLookahead||e,o=bv(i,t,a,n),s=zv(o,n,t,r),l=Kv(o,n,t,r);return s.concat(l)})}zt(Ov,"validateEmptyOrAlternative"),zt($v,"validateAmbiguousAlternationAlternatives");var Pv=class extends Xg{static{zt(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};function Bv(t,e){const r=new Mv;t.accept(r);const n=r.alternations;return Nf(n,r=>r.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:r}),type:Vb.TOO_MANY_ALTS,ruleName:t.name,occurrence:r.idx}]:[])}function Fv(t,e,r){const n=[];return hf(t,t=>{const i=new Pv;t.accept(i);const a=i.allProductions;hf(a,i=>{const a=sv(i),o=i.maxLookahead||e,s=xv(i.idx,t,a,o)[0];if(eg(Ph(s))){const e=r.buildEmptyRepetitionError({topLevelRule:t,repetition:i});n.push({message:e,type:Vb.NO_NON_EMPTY_LOOKAHEAD,ruleName:t.name})}})}),n}function zv(t,e,r,n){const i=[],a=bg(t,(r,n,a)=>(!0===e.definition[a].ignoreAmbiguities||hf(n,n=>{const o=[a];hf(t,(t,r)=>{a!==r&&Tv(t,n)&&!0!==e.definition[r].ignoreAmbiguities&&o.push(r)}),o.length>1&&!Tv(i,n)&&(i.push(n),r.push({alts:o,path:n}))}),r),[]);return If(a,t=>{const i=If(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:Vb.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:t.alts}})}function Kv(t,e,r,n){const i=bg(t,(t,e,r)=>{const n=If(e,t=>({idx:r,path:t}));return t.concat(n)},[]);return Ad(Nf(i,t=>{if(!0===e.definition[t.idx].ignoreAmbiguities)return[];const a=t.idx,o=t.path,s=xf(i,t=>!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx<a&&wv(t.path,o));return If(s,t=>{const i=[t.idx+1,a+1],o=0===e.idx?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:i,prefixPath:t.path}),type:Vb.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:o,alternatives:i}})}))}function jv(t,e,r){const n=[],i=If(e,t=>t.name);return hf(t,t=>{const e=t.name;if(Hf(i,e)){const i=r.buildNamespaceConflictError(t);n.push({message:i,type:Vb.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e})}}),n}function qv(t){const e=Gp(t,{errMsgProvider:Uy}),r={};return hf(t.rules,t=>{r[t.name]=t}),Yy(r,e.errMsgProvider)}function Wv(t){return Ev((t=Gp(t,{errMsgProvider:Gy})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}zt(Bv,"validateTooManyAlts"),zt(Fv,"validateSomeNonEmptyLookaheadPath"),zt(zv,"checkAlternativesAmbiguities"),zt(Kv,"checkPrefixAlternativesAmbiguities"),zt(jv,"checkTerminalAndNoneTerminalsNameSpace"),zt(qv,"resolveGrammar"),zt(Wv,"validateGrammar");var Uv="MismatchedTokenException",Gv="NoViableAltException",Yv="EarlyExitException",Vv="NotAllInputParsedException",Hv=[Uv,Gv,Yv,Vv];function Xv(t){return Hf(Hv,t.name)}Object.freeze(Hv),zt(Xv,"isRecognitionException");var Zv=class extends Error{static{zt(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Qv=class extends Zv{static{zt(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name=Uv}},Jv=class extends Zv{static{zt(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name=Gv}},tb=class extends Zv{static{zt(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name=Vv}},eb=class extends Zv{static{zt(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name=Yv}},rb={},nb="InRuleRecoveryException",ib=class extends Error{static{zt(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=nb}},ab=class{static{zt(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=zf(t,"recoveryEnabled")?t.recoveryEnabled:Xb.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ob)}getTokenToInsert(t){const e=jy(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,n){const i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[];let s=!1;const l=this.LA(1);let c=this.LA(1);const h=zt(()=>{const t=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:t,ruleName:this.getCurrRuleFullName()}),r=new Qv(e,l,this.LA(0));r.resyncedTokens=of(o),this.SAVE_ERROR(r)},"generateErrorMessage");for(;!s;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?s=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,o))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!1!==r&&(!this.tokenMatcher(this.LA(1),t)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e))))}getFollowsForInRuleRecovery(t,e){const r=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e)){return this.getTokenToInsert(t)}if(this.canRecoverWithSingleTokenDeletion(t)){const t=this.SKIP_TOKEN();return this.consumeToken(),t}throw new ib("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(eg(e))return!1;const r=this.LA(1);return void 0!==Ef(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){if(!this.canTokenTypeBeDeletedInRecovery(t))return!1;return this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){const e=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(e);return Hf(r,t)}findReSyncTokenType(){const t=this.flattenFollowSet();let e=this.LA(1),r=2;for(;;){const n=Ef(t,t=>qy(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return rb;const t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const t=this.RULE_STACK,e=this.RULE_OCCURRENCE_STACK;return If(t,(r,n)=>0===n?rb:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:e[n],inRule:this.shortRuleNameToFullName(t[n-1])})}flattenFollowSet(){const t=If(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ph(t)}getFollowSetFromFollowKey(t){if(t===rb)return[Ky];const e=t.ruleName+t.idxInCallingRule+sm+t.inRule;return this.resyncFollows[e]}addToResyncTokens(t,e){return this.tokenMatcher(t,Ky)||e.push(t),e}reSyncTo(t){const e=[];let r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return of(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,o){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Sd(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return If(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function ob(t,e,r,n,i,a,o){const s=this.getKeyForAutomaticLookahead(n,i);let l=this.firstAfterRepMap[s];if(void 0===l){const t=this.getCurrRuleFullName();l=new a(this.getGAstProductions()[t],i).startWalking(),this.firstAfterRepMap[s]=l}let c=l.token,h=l.occurrence;const u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=Ky,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,o)&&this.tryInRepetitionRecovery(t,e,r,c)}zt(ob,"attemptInRepetitionRecovery");var sb=1024,lb=1280,cb=1536;function hb(t,e,r){return r|e|t}zt(hb,"getKeyForAutomaticLookahead");var ub=class{static{zt(this,"LLkLookaheadStrategy")}constructor(t){var e;this.maxLookahead=null!==(e=null==t?void 0:t.maxLookahead)&&void 0!==e?e:Xb.maxLookahead}validate(t){const e=this.validateNoLeftRecursion(t.rules);if(eg(e)){const r=this.validateEmptyOrAlternatives(t.rules),n=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...e,...r,...n,...i]}return e}validateNoLeftRecursion(t){return Nf(t,t=>Dv(t,t,Gy))}validateEmptyOrAlternatives(t){return Nf(t,t=>Ov(t,Gy))}validateAmbiguousAlternationAlternatives(t,e){return Nf(t,t=>$v(t,e,Gy))}validateSomeNonEmptyLookaheadPath(t,e){return Fv(t,e,Gy)}buildLookaheadForAlternation(t){return cv(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,uv)}buildLookaheadForOptional(t){return hv(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,sv(t.prodType),dv)}},db=class{static{zt(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=zf(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Xb.dynamicTokensEnabled,this.maxLookahead=zf(t,"maxLookahead")?t.maxLookahead:Xb.maxLookahead,this.lookaheadStrategy=zf(t,"lookaheadStrategy")?t.lookaheadStrategy:new ub({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){hf(t,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:e,repetition:r,option:n,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=gb(t);hf(e,e=>{const r=0===e.idx?"":e.idx;this.TRACE_INIT(`${tm(e)}${r}`,()=>{const r=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:e.idx,rule:t,maxLookahead:e.maxLookahead||this.maxLookahead,hasPredicates:e.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),n=hb(this.fullRuleNameToShort[t.name],256,e.idx);this.setLaFuncCache(n,r)})}),hf(r,e=>{this.computeLookaheadFunc(t,e.idx,768,"Repetition",e.maxLookahead,tm(e))}),hf(n,e=>{this.computeLookaheadFunc(t,e.idx,512,"Option",e.maxLookahead,tm(e))}),hf(i,e=>{this.computeLookaheadFunc(t,e.idx,sb,"RepetitionMandatory",e.maxLookahead,tm(e))}),hf(a,e=>{this.computeLookaheadFunc(t,e.idx,cb,"RepetitionMandatoryWithSeparator",e.maxLookahead,tm(e))}),hf(o,e=>{this.computeLookaheadFunc(t,e.idx,lb,"RepetitionWithSeparator",e.maxLookahead,tm(e))})})})}computeLookaheadFunc(t,e,r,n,i,a){this.TRACE_INIT(`${a}${0===e?"":e}`,()=>{const a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:e,rule:t,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),o=hb(this.fullRuleNameToShort[t.name],r,e);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(t,e){return hb(this.getLastExplicitRuleShortName(),t,e)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},pb=class extends Xg{static{zt(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},fb=new pb;function gb(t){fb.reset(),t.accept(fb);const e=fb.dslMethods;return fb.reset(),e}function mb(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset)}function yb(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function vb(t,e,r){void 0===t.children[r]?t.children[r]=[e]:t.children[r].push(e)}function bb(t,e,r){void 0===t.children[e]?t.children[e]=[r]:t.children[e].push(r)}zt(gb,"collectMethods"),zt(mb,"setNodeLocationOnlyOffset"),zt(yb,"setNodeLocationFull"),zt(vb,"addTerminalToCst"),zt(bb,"addNoneTerminalToCst");var xb,Tb;function wb(t,e){Object.defineProperty(t,"name",{enumerable:!1,configurable:!0,writable:!1,value:e})}function kb(t,e){const r=oc(t),n=r.length;for(let i=0;i<n;i++){const n=t[r[i]],a=n.length;for(let t=0;t<a;t++){const r=n[t];void 0===r.tokenTypeIdx&&this[r.name](r.children,e)}}}function Cb(t,e){const r=zt(function(){},"derivedConstructor");wb(r,t+"BaseSemantics");const n={visit:zt(function(t,e){if(Ao(t)&&(t=t[0]),!sg(t))return this[t.name](t.children,e)},"visit"),validateVisitor:zt(function(){const t=Sb(this,e);if(!eg(t)){const e=If(t,t=>t.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${e.join("\n\n").replace(/\n/g,"\n\t")}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function Eb(t,e,r){const n=zt(function(){},"derivedConstructor");wb(n,t+"BaseSemanticsWithDefaults");const i=Object.create(r.prototype);return hf(e,t=>{i[t]=kb}),n.prototype=i,n.prototype.constructor=n,n}function Sb(t,e){return _b(t,e)}function _b(t,e){const r=xf(e,e=>!1===rs(t[e])),n=If(r,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:xb.MISSING_METHOD,methodName:e}));return Ad(n)}zt(wb,"defineNameProp"),zt(kb,"defaultVisit"),zt(Cb,"createBaseSemanticVisitorConstructor"),zt(Eb,"createBaseVisitorConstructorWithDefaults"),(Tb=xb||(xb={}))[Tb.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",Tb[Tb.MISSING_METHOD=1]="MISSING_METHOD",zt(Sb,"validateVisitor"),zt(_b,"validateMissingCstMethods");var Ab=class{static{zt(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=zf(t,"nodeLocationTracking")?t.nodeLocationTracking:Xb.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yb,this.setNodeLocationFromNode=yb,this.cstPostRule=As,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=As,this.setNodeLocationFromNode=As,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=mb,this.setNodeLocationFromNode=mb,this.cstPostRule=As,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=As,this.setNodeLocationFromNode=As,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=As,this.setNodeLocationFromNode=As,this.cstPostRule=As,this.setInitialNodeLocation=As}else this.cstInvocationStateUpdate=As,this.cstFinallyStateUpdate=As,this.cstPostTerminal=As,this.cstPostNonTerminal=As,this.cstPostRule=As}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){const e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){const e={name:t,children:Object.create(null)};this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){const e=this.LA(0),r=t.location;r.startOffset<=e.startOffset==!0?(r.endOffset=e.endOffset,r.endLine=e.endLine,r.endColumn=e.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(t){const e=this.LA(0),r=t.location;r.startOffset<=e.startOffset==!0?r.endOffset=e.endOffset:r.startOffset=NaN}cstPostTerminal(t,e){const r=this.CST_STACK[this.CST_STACK.length-1];vb(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){const r=this.CST_STACK[this.CST_STACK.length-1];bb(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){if(sg(this.baseCstVisitorConstructor)){const t=Cb(this.className,oc(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(sg(this.baseCstVisitorWithDefaultsConstructor)){const t=Eb(this.className,oc(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){const t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}},Rb=class{static{zt(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Yb}LA(t){const e=this.currIdx+t;return e<0||this.tokVectorLength<=e?Yb:this.tokVector[e]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},Lb=class{static{zt(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=Zb){if(Hf(this.definedRulesNames,t)){const e={message:Gy.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Vb.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(e)}this.definedRulesNames.push(t);const n=this.defineRule(t,e,r);return this[t]=n,n}OVERRIDE_RULE(t,e,r=Zb){const n=Iv(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);const i=this.defineRule(t,e,r);return this[t]=i,i}BACKTRACK(t,e){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return t.apply(this,e),!0}catch(n){if(Xv(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Vg(Gf(this.gastProductionsCache))}},Ib=class{static{zt(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=hy,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},zf(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Ao(t)){if(eg(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Ao(t))this.tokensMap=bg(t,(t,e)=>(t[e.name]=e,t),{});else if(zf(t,"modes")&&mf(Ph(Gf(t.modes)),ky)){const e=Ph(Gf(t.modes)),r=Lg(e);this.tokensMap=bg(r,(t,e)=>(t[e.name]=e,t),{})}else{if(!zo(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Sd(t)}this.tokensMap.EOF=Ky;const r=zf(t,"modes")?Ph(Gf(t.modes)):Gf(t),n=mf(r,t=>eg(t.categoryMatches));this.tokenMatcher=n?hy:cy,py(Gf(this.tokensMap))}defineRule(t,e,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const n=zf(r,"resyncEnabled")?r.resyncEnabled:Zb.resyncEnabled,i=zf(r,"recoveryValueFunc")?r.recoveryValueFunc:Zb.recoveryValueFunc,a=this.ruleShortNameIdx<<12;let o;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a,o=!0===this.outputCst?zt(function(...r){try{this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,r);const n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}catch(o){return this.invokeRuleCatch(o,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):zt(function(...r){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),e.apply(this,r)}catch(o){return this.invokeRuleCatch(o,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst");return Object.assign(o,{ruleName:t,originalGrammarAction:e})}invokeRuleCatch(t,e,r){const n=1===this.RULE_STACK.length,i=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Xv(t)){const e=t;if(i){const n=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(n)){if(e.resyncedTokens=this.reSyncTo(n),this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];return t.recoveredNode=!0,t}return r(t)}if(this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];t.recoveredNode=!0,e.partialCstResult=t}throw e}if(n)return this.moveToTerminatedState(),r(t);throw e}throw t}optionInternal(t,e){const r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=zt(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=t;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(t,e){const r=this.getKeyForAutomaticLookahead(sb,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,e,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=zt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0!==i.call(this))throw this.raiseEarlyExitException(t,Vy.REPETITION_MANDATORY,e.ERR_MSG);{let t=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===t;)t=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],i,sb,t,rv)}atLeastOneSepFirstInternal(t,e){const r=this.getKeyForAutomaticLookahead(cb,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){const n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,Vy.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);{n.call(this);const e=zt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,nv],e,cb,t,nv)}}manyInternal(t,e){const r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,e,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=zt(()=>t.call(this)&&e.call(this),"lookaheadFunction")}}else n=e;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],i,768,t,tv,a)}manySepFirstInternal(t,e){const r=this.getKeyForAutomaticLookahead(lb,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){const n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);const e=zt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,ev],e,lb,t,ev)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,cb,t,i)}doSingleRepetition(t){const e=this.getLexerPosition();t.call(this);return this.getLexerPosition()>e}orInternal(t,e){const r=this.getKeyForAutomaticLookahead(256,e),n=Ao(t)?t:t.DEF,i=this.getLaFuncFromCache(r).call(this,n);if(void 0!==i){return n[i].ALT.call(this)}this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new tb(e,t))}}subruleInternal(t,e,r){let n;try{const i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,n=t.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),n}catch(i){throw this.subruleInternalError(i,r,t.ruleName)}}subruleInternalError(t,e,r){throw Xv(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let n;try{const e=this.LA(1);!0===this.tokenMatcher(e,t)?(this.consumeToken(),n=e):this.consumeInternalError(t,e,r)}catch(i){n=this.consumeInternalRecovery(t,e,i)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,n),n}consumeInternalError(t,e,r){let n;const i=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Qv(n,e,i))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;{const i=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,i)}catch(n){throw n.name===nb?r:n}}}saveRecogState(){const t=this.errors,e=Sd(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Ky)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},Db=class{static{zt(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=zf(t,"errorMessageProvider")?t.errorMessageProvider:Xb.errorMessageProvider}SAVE_ERROR(t){if(Xv(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Sd(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Sd(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){const n=this.getCurrRuleFullName(),i=xv(t,this.getGAstProductions()[n],e,this.maxLookahead)[0],a=[];for(let s=1;s<=this.maxLookahead;s++)a.push(this.LA(s));const o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:a,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new eb(o,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){const r=this.getCurrRuleFullName(),n=bv(t,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let s=1;s<=this.maxLookahead;s++)i.push(this.LA(s));const a=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:i,previous:a,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Jv(o,this.LA(1),a))}},Nb=class{static{zt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){const r=this.gastProductionsCache[t];if(sg(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return av([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){const e=_f(t.ruleStack),r=this.getGAstProductions()[e];return new Qy(r,t).startWalking()}},Mb={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Mb);var Ob=!0,$b=Math.pow(2,8)-1,Pb=Fy({name:"RECORDING_PHASE_TOKEN",pattern:Ay.NA});py([Pb]);var Bb=jy(Pb,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Bb);var Fb={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}},zb=class{static{zt(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){const e=t>0?t:"";this[`CONSUME${e}`]=function(e,r){return this.consumeInternalRecord(e,t,r)},this[`SUBRULE${e}`]=function(e,r){return this.subruleInternalRecord(e,t,r)},this[`OPTION${e}`]=function(e){return this.optionInternalRecord(e,t)},this[`OR${e}`]=function(e){return this.orInternalRecord(e,t)},this[`MANY${e}`]=function(e){this.manyInternalRecord(t,e)},this[`MANY_SEP${e}`]=function(e){this.manySepFirstInternalRecord(t,e)},this[`AT_LEAST_ONE${e}`]=function(e){this.atLeastOneInternalRecord(t,e)},this[`AT_LEAST_ONE_SEP${e}`]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}}this.consume=function(t,e,r){return this.consumeInternalRecord(e,t,r)},this.subrule=function(t,e,r){return this.subruleInternalRecord(e,t,r)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const t=this;for(let e=0;e<10;e++){const r=e>0?e:"";delete t[`CONSUME${r}`],delete t[`SUBRULE${r}`],delete t[`OPTION${r}`],delete t[`OR${r}`],delete t[`MANY${r}`],delete t[`MANY_SEP${r}`],delete t[`AT_LEAST_ONE${r}`],delete t[`AT_LEAST_ONE_SEP${r}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,e){return()=>!0}LA_RECORD(t){return Yb}topLevelRuleRecord(t,e){try{const r=new Fg({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(n){throw r}throw r}}optionInternalRecord(t,e){return Kb.call(this,Kg,t,e)}atLeastOneInternalRecord(t,e){Kb.call(this,jg,e,t)}atLeastOneSepFirstInternalRecord(t,e){Kb.call(this,qg,e,t,Ob)}manyInternalRecord(t,e){Kb.call(this,Wg,e,t)}manySepFirstInternalRecord(t,e){Kb.call(this,Ug,e,t,Ob)}orInternalRecord(t,e){return jb.call(this,t,e)}subruleInternalRecord(t,e,r){if(Wb(e),!t||!1===zf(t,"ruleName")){const r=new Error(`<SUBRULE${qb(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=ef(this.recordingProdStack),i=t.ruleName,a=new Bg({idx:e,nonTerminalName:i,label:null==r?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(a),this.outputCst?Fb:Mb}consumeInternalRecord(t,e,r){if(Wb(e),!by(t)){const r=new Error(`<CONSUME${qb(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=ef(this.recordingProdStack),i=new Yg({idx:e,terminalType:t,label:null==r?void 0:r.LABEL});return n.definition.push(i),Bb}};function Kb(t,e,r,n=!1){Wb(r);const i=ef(this.recordingProdStack),a=rs(e)?e:e.DEF,o=new t({definition:[],idx:r});return n&&(o.separator=e.SEP),zf(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),Mb}function jb(t,e){Wb(e);const r=ef(this.recordingProdStack),n=!1===Ao(t),i=!1===n?t:t.DEF,a=new Gg({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});zf(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);const o=Eg(i,t=>rs(t.GATE));return a.hasPredicates=o,r.definition.push(a),hf(i,t=>{const e=new zg({definition:[]});a.definition.push(e),zf(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:zf(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),Mb}function qb(t){return 0===t?"":`${t}`}function Wb(t){if(t<0||t>$b){const e=new Error(`Invalid DSL Method idx value: <${t}>\n\tIdx value must be a none negative value smaller than ${$b+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}zt(Kb,"recordProd"),zt(jb,"recordOrProd"),zt(qb,"getIdxSuffix"),zt(Wb,"assertMethodIdxIsValid");var Ub=class{static{zt(this,"PerformanceTracer")}initPerformanceTracer(t){if(zf(t,"traceInitPerf")){const e=t.traceInitPerf,r="number"==typeof e;this.traceInitMaxIdent=r?e:1/0,this.traceInitPerf=r?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Xb.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${r}--\x3e <${t}>`);const{time:n,value:i}=Ng(e),a=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${r}<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i}return e()}};function Gb(t,e){e.forEach(e=>{const r=e.prototype;Object.getOwnPropertyNames(r).forEach(n=>{if("constructor"===n)return;const i=Object.getOwnPropertyDescriptor(r,n);i&&(i.get||i.set)?Object.defineProperty(t.prototype,n,i):t.prototype[n]=e.prototype[n]})})}zt(Gb,"applyMixins");var Yb=jy(Ky,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Yb);var Vb,Hb,Xb=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Wy,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Zb=Object.freeze({recoveryValueFunc:zt(()=>{},"recoveryValueFunc"),resyncEnabled:!0});function Qb(t=void 0){return function(){return t}}(Hb=Vb||(Vb={}))[Hb.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",Hb[Hb.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",Hb[Hb.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",Hb[Hb.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",Hb[Hb.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",Hb[Hb.LEFT_RECURSION=5]="LEFT_RECURSION",Hb[Hb.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",Hb[Hb.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",Hb[Hb.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",Hb[Hb.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",Hb[Hb.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",Hb[Hb.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",Hb[Hb.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",Hb[Hb.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",zt(Qb,"EMPTY_ALT");var Jb=class t{static{zt(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{Mg(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),hf(this.definedRulesNames,t=>{const e=this[t].originalGrammarAction;let r;this.TRACE_INIT(`${t} Rule`,()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=qv({rules:Gf(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(eg(n)&&!1===this.skipValidations){const t=Wv({rules:Gf(this.gastProductionsCache),tokenTypes:Gf(this.tokensMap),errMsgProvider:Gy,grammarName:r}),e=Cv({lookaheadStrategy:this.lookaheadStrategy,rules:Gf(this.gastProductionsCache),tokenTypes:Gf(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(t,e)}}),eg(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const t=cm(Gf(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null===(e=(t=this.lookaheadStrategy).initialize)||void 0===e||e.call(t,{rules:Gf(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Gf(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!eg(this.definitionErrors))throw e=If(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)})}constructor(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(e),r.initLexerAdapter(),r.initLooksAhead(e),r.initRecognizerEngine(t,e),r.initRecoverable(e),r.initTreeBuilder(e),r.initContentAssist(),r.initGastRecorder(e),r.initPerformanceTracer(e),zf(e,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=zf(e,"skipValidations")?e.skipValidations:Xb.skipValidations}};Jb.DEFER_DEFINITION_ERRORS_HANDLING=!1,Gb(Jb,[ab,db,Ab,Rb,Ib,Lb,Db,Nb,zb,Ub]);var tx=class extends Jb{static{zt(this,"EmbeddedActionsParser")}constructor(t,e=Xb){const r=Sd(e);r.outputCst=!1,super(t,r)}};function ex(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}zt(ex,"arrayMap");var rx=ex;function nx(){this.__data__=[],this.size=0}zt(nx,"listCacheClear");var ix=nx;function ax(t,e){return t===e||t!=t&&e!=e}zt(ax,"eq");var ox=ax;function sx(t,e){for(var r=t.length;r--;)if(ox(t[r][0],e))return r;return-1}zt(sx,"assocIndexOf");var lx=sx,cx=Array.prototype.splice;function hx(t){var e=this.__data__,r=lx(e,t);return!(r<0)&&(r==e.length-1?e.pop():cx.call(e,r,1),--this.size,!0)}zt(hx,"listCacheDelete");var ux=hx;function dx(t){var e=this.__data__,r=lx(e,t);return r<0?void 0:e[r][1]}zt(dx,"listCacheGet");var px=dx;function fx(t){return lx(this.__data__,t)>-1}zt(fx,"listCacheHas");var gx=fx;function mx(t,e){var r=this.__data__,n=lx(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}zt(mx,"listCacheSet");var yx=mx;function vx(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}zt(vx,"ListCache"),vx.prototype.clear=ix,vx.prototype.delete=ux,vx.prototype.get=px,vx.prototype.has=gx,vx.prototype.set=yx;var bx=vx;function xx(){this.__data__=new bx,this.size=0}zt(xx,"stackClear");var Tx=xx;function wx(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}zt(wx,"stackDelete");var kx=wx;function Cx(t){return this.__data__.get(t)}zt(Cx,"stackGet");var Ex=Cx;function Sx(t){return this.__data__.has(t)}zt(Sx,"stackHas");var _x=Sx,Ax="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,Rx="object"==typeof self&&self&&self.Object===Object&&self,Lx=Ax||Rx||Function("return this")(),Ix=Lx.Symbol,Dx=Object.prototype,Nx=Dx.hasOwnProperty,Mx=Dx.toString,Ox=Ix?Ix.toStringTag:void 0;function $x(t){var e=Nx.call(t,Ox),r=t[Ox];try{t[Ox]=void 0;var n=!0}catch(a){}var i=Mx.call(t);return n&&(e?t[Ox]=r:delete t[Ox]),i}zt($x,"getRawTag");var Px=$x,Bx=Object.prototype.toString;function Fx(t){return Bx.call(t)}zt(Fx,"objectToString");var zx=Fx,Kx=Ix?Ix.toStringTag:void 0;function jx(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Kx&&Kx in Object(t)?Px(t):zx(t)}zt(jx,"baseGetTag");var qx=jx;function Wx(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}zt(Wx,"isObject");var Ux=Wx;function Gx(t){if(!Ux(t))return!1;var e=qx(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}zt(Gx,"isFunction");var Yx=Gx,Vx=Lx["__core-js_shared__"],Hx=function(){var t=/[^.]+$/.exec(Vx&&Vx.keys&&Vx.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Xx(t){return!!Hx&&Hx in t}zt(Xx,"isMasked");var Zx=Xx,Qx=Function.prototype.toString;function Jx(t){if(null!=t){try{return Qx.call(t)}catch(e){}try{return t+""}catch(e){}}return""}zt(Jx,"toSource");var tT=Jx,eT=/^\[object .+?Constructor\]$/,rT=Function.prototype,nT=Object.prototype,iT=rT.toString,aT=nT.hasOwnProperty,oT=RegExp("^"+iT.call(aT).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sT(t){return!(!Ux(t)||Zx(t))&&(Yx(t)?oT:eT).test(tT(t))}zt(sT,"baseIsNative");var lT=sT;function cT(t,e){return null==t?void 0:t[e]}zt(cT,"getValue");var hT=cT;function uT(t,e){var r=hT(t,e);return lT(r)?r:void 0}zt(uT,"getNative");var dT=uT,pT=dT(Lx,"Map"),fT=dT(Object,"create");function gT(){this.__data__=fT?fT(null):{},this.size=0}zt(gT,"hashClear");var mT=gT;function yT(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}zt(yT,"hashDelete");var vT=yT,bT=Object.prototype.hasOwnProperty;function xT(t){var e=this.__data__;if(fT){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return bT.call(e,t)?e[t]:void 0}zt(xT,"hashGet");var TT=xT,wT=Object.prototype.hasOwnProperty;function kT(t){var e=this.__data__;return fT?void 0!==e[t]:wT.call(e,t)}zt(kT,"hashHas");var CT=kT;function ET(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=fT&&void 0===e?"__lodash_hash_undefined__":e,this}zt(ET,"hashSet");var ST=ET;function _T(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}zt(_T,"Hash"),_T.prototype.clear=mT,_T.prototype.delete=vT,_T.prototype.get=TT,_T.prototype.has=CT,_T.prototype.set=ST;var AT=_T;function RT(){this.size=0,this.__data__={hash:new AT,map:new(pT||bx),string:new AT}}zt(RT,"mapCacheClear");var LT=RT;function IT(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}zt(IT,"isKeyable");var DT=IT;function NT(t,e){var r=t.__data__;return DT(e)?r["string"==typeof e?"string":"hash"]:r.map}zt(NT,"getMapData");var MT=NT;function OT(t){var e=MT(this,t).delete(t);return this.size-=e?1:0,e}zt(OT,"mapCacheDelete");var $T=OT;function PT(t){return MT(this,t).get(t)}zt(PT,"mapCacheGet");var BT=PT;function FT(t){return MT(this,t).has(t)}zt(FT,"mapCacheHas");var zT=FT;function KT(t,e){var r=MT(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}zt(KT,"mapCacheSet");var jT=KT;function qT(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}zt(qT,"MapCache"),qT.prototype.clear=LT,qT.prototype.delete=$T,qT.prototype.get=BT,qT.prototype.has=zT,qT.prototype.set=jT;var WT=qT;function UT(t,e){var r=this.__data__;if(r instanceof bx){var n=r.__data__;if(!pT||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new WT(n)}return r.set(t,e),this.size=r.size,this}zt(UT,"stackSet");var GT=UT;function YT(t){var e=this.__data__=new bx(t);this.size=e.size}zt(YT,"Stack"),YT.prototype.clear=Tx,YT.prototype.delete=kx,YT.prototype.get=Ex,YT.prototype.has=_x,YT.prototype.set=GT;var VT=YT;function HT(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}zt(HT,"setCacheAdd");var XT=HT;function ZT(t){return this.__data__.has(t)}zt(ZT,"setCacheHas");var QT=ZT;function JT(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new WT;++e<r;)this.add(t[e])}zt(JT,"SetCache"),JT.prototype.add=JT.prototype.push=XT,JT.prototype.has=QT;var tw=JT;function ew(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}zt(ew,"arraySome");var rw=ew;function nw(t,e){return t.has(e)}zt(nw,"cacheHas");var iw=nw;function aw(t,e,r,n,i,a){var o=1&r,s=t.length,l=e.length;if(s!=l&&!(o&&l>s))return!1;var c=a.get(t),h=a.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=2&r?new tw:void 0;for(a.set(t,e),a.set(e,t);++u<s;){var f=t[u],g=e[u];if(n)var m=o?n(g,f,u,e,t,a):n(f,g,u,t,e,a);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!rw(e,function(t,e){if(!iw(p,e)&&(f===t||i(f,t,r,n,a)))return p.push(e)})){d=!1;break}}else if(f!==g&&!i(f,g,r,n,a)){d=!1;break}}return a.delete(t),a.delete(e),d}zt(aw,"equalArrays");var ow=aw,sw=Lx.Uint8Array;function lw(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}zt(lw,"mapToArray");var cw=lw;function hw(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}zt(hw,"setToArray");var uw=hw,dw=Ix?Ix.prototype:void 0,pw=dw?dw.valueOf:void 0;function fw(t,e,r,n,i,a,o){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new sw(t),new sw(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ox(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=cw;case"[object Set]":var l=1&n;if(s||(s=uw),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;n|=2,o.set(t,e);var h=ow(s(t),s(e),n,i,a,o);return o.delete(t),h;case"[object Symbol]":if(pw)return pw.call(t)==pw.call(e)}return!1}zt(fw,"equalByTag");var gw=fw;function mw(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}zt(mw,"arrayPush");var yw=mw,vw=Array.isArray;function bw(t,e,r){var n=e(t);return vw(t)?n:yw(n,r(t))}zt(bw,"baseGetAllKeys");var xw=bw;function Tw(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}zt(Tw,"arrayFilter");var ww=Tw;function kw(){return[]}zt(kw,"stubArray");var Cw=kw,Ew=Object.prototype.propertyIsEnumerable,Sw=Object.getOwnPropertySymbols,_w=Sw?function(t){return null==t?[]:(t=Object(t),ww(Sw(t),function(e){return Ew.call(t,e)}))}:Cw;function Aw(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}zt(Aw,"baseTimes");var Rw=Aw;function Lw(t){return null!=t&&"object"==typeof t}zt(Lw,"isObjectLike");var Iw=Lw;function Dw(t){return Iw(t)&&"[object Arguments]"==qx(t)}zt(Dw,"baseIsArguments");var Nw=Dw,Mw=Object.prototype,Ow=Mw.hasOwnProperty,$w=Mw.propertyIsEnumerable,Pw=Nw(function(){return arguments}())?Nw:function(t){return Iw(t)&&Ow.call(t,"callee")&&!$w.call(t,"callee")},Bw=Pw;function Fw(){return!1}zt(Fw,"stubFalse");var zw=Fw,Kw="object"==typeof exports&&exports&&!exports.nodeType&&exports,jw=Kw&&"object"==typeof module&&module&&!module.nodeType&&module,qw=jw&&jw.exports===Kw?Lx.Buffer:void 0,Ww=(qw?qw.isBuffer:void 0)||zw,Uw=/^(?:0|[1-9]\d*)$/;function Gw(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&Uw.test(t))&&t>-1&&t%1==0&&t<e}zt(Gw,"isIndex");var Yw=Gw;function Vw(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}zt(Vw,"isLength");var Hw=Vw,Xw={};function Zw(t){return Iw(t)&&Hw(t.length)&&!!Xw[qx(t)]}Xw["[object Float32Array]"]=Xw["[object Float64Array]"]=Xw["[object Int8Array]"]=Xw["[object Int16Array]"]=Xw["[object Int32Array]"]=Xw["[object Uint8Array]"]=Xw["[object Uint8ClampedArray]"]=Xw["[object Uint16Array]"]=Xw["[object Uint32Array]"]=!0,Xw["[object Arguments]"]=Xw["[object Array]"]=Xw["[object ArrayBuffer]"]=Xw["[object Boolean]"]=Xw["[object DataView]"]=Xw["[object Date]"]=Xw["[object Error]"]=Xw["[object Function]"]=Xw["[object Map]"]=Xw["[object Number]"]=Xw["[object Object]"]=Xw["[object RegExp]"]=Xw["[object Set]"]=Xw["[object String]"]=Xw["[object WeakMap]"]=!1,zt(Zw,"baseIsTypedArray");var Qw=Zw;function Jw(t){return function(e){return t(e)}}zt(Jw,"baseUnary");var tk=Jw,ek="object"==typeof exports&&exports&&!exports.nodeType&&exports,rk=ek&&"object"==typeof module&&module&&!module.nodeType&&module,nk=rk&&rk.exports===ek&&Ax.process,ik=function(){try{var t=rk&&rk.require&&rk.require("util").types;return t||nk&&nk.binding&&nk.binding("util")}catch(e){}}(),ak=ik&&ik.isTypedArray,ok=ak?tk(ak):Qw,sk=Object.prototype.hasOwnProperty;function lk(t,e){var r=vw(t),n=!r&&Bw(t),i=!r&&!n&&Ww(t),a=!r&&!n&&!i&&ok(t),o=r||n||i||a,s=o?Rw(t.length,String):[],l=s.length;for(var c in t)!e&&!sk.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Yw(c,l))||s.push(c);return s}zt(lk,"arrayLikeKeys");var ck=lk,hk=Object.prototype;function uk(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||hk)}zt(uk,"isPrototype");var dk=uk;function pk(t,e){return function(r){return t(e(r))}}zt(pk,"overArg");var fk=pk(Object.keys,Object),gk=Object.prototype.hasOwnProperty;function mk(t){if(!dk(t))return fk(t);var e=[];for(var r in Object(t))gk.call(t,r)&&"constructor"!=r&&e.push(r);return e}zt(mk,"baseKeys");var yk=mk;function vk(t){return null!=t&&Hw(t.length)&&!Yx(t)}zt(vk,"isArrayLike");var bk=vk;function xk(t){return bk(t)?ck(t):yk(t)}zt(xk,"keys");var Tk=xk;function wk(t){return xw(t,Tk,_w)}zt(wk,"getAllKeys");var kk=wk,Ck=Object.prototype.hasOwnProperty;function Ek(t,e,r,n,i,a){var o=1&r,s=kk(t),l=s.length;if(l!=kk(e).length&&!o)return!1;for(var c=l;c--;){var h=s[c];if(!(o?h in e:Ck.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var f=o;++c<l;){var g=t[h=s[c]],m=e[h];if(n)var y=o?n(m,g,h,e,t,a):n(g,m,h,t,e,a);if(!(void 0===y?g===m||i(g,m,r,n,a):y)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var v=t.constructor,b=e.constructor;v==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(t),a.delete(e),p}zt(Ek,"equalObjects");var Sk=Ek,_k=dT(Lx,"DataView"),Ak=dT(Lx,"Promise"),Rk=dT(Lx,"Set"),Lk=dT(Lx,"WeakMap"),Ik="[object Map]",Dk="[object Promise]",Nk="[object Set]",Mk="[object WeakMap]",Ok="[object DataView]",$k=tT(_k),Pk=tT(pT),Bk=tT(Ak),Fk=tT(Rk),zk=tT(Lk),Kk=qx;(_k&&Kk(new _k(new ArrayBuffer(1)))!=Ok||pT&&Kk(new pT)!=Ik||Ak&&Kk(Ak.resolve())!=Dk||Rk&&Kk(new Rk)!=Nk||Lk&&Kk(new Lk)!=Mk)&&(Kk=zt(function(t){var e=qx(t),r="[object Object]"==e?t.constructor:void 0,n=r?tT(r):"";if(n)switch(n){case $k:return Ok;case Pk:return Ik;case Bk:return Dk;case Fk:return Nk;case zk:return Mk}return e},"getTag"));var jk=Kk,qk="[object Arguments]",Wk="[object Array]",Uk="[object Object]",Gk=Object.prototype.hasOwnProperty;function Yk(t,e,r,n,i,a){var o=vw(t),s=vw(e),l=o?Wk:jk(t),c=s?Wk:jk(e),h=(l=l==qk?Uk:l)==Uk,u=(c=c==qk?Uk:c)==Uk,d=l==c;if(d&&Ww(t)){if(!Ww(e))return!1;o=!0,h=!1}if(d&&!h)return a||(a=new VT),o||ok(t)?ow(t,e,r,n,i,a):gw(t,e,l,r,n,i,a);if(!(1&r)){var p=h&&Gk.call(t,"__wrapped__"),f=u&&Gk.call(e,"__wrapped__");if(p||f){var g=p?t.value():t,m=f?e.value():e;return a||(a=new VT),i(g,m,r,n,a)}}return!!d&&(a||(a=new VT),Sk(t,e,r,n,i,a))}zt(Yk,"baseIsEqualDeep");var Vk=Yk;function Hk(t,e,r,n,i){return t===e||(null==t||null==e||!Iw(t)&&!Iw(e)?t!=t&&e!=e:Vk(t,e,r,n,Hk,i))}zt(Hk,"baseIsEqual");var Xk=Hk;function Zk(t,e,r,n){var i=r.length,a=i,o=!n;if(null==t)return!a;for(t=Object(t);i--;){var s=r[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var l=(s=r[i])[0],c=t[l],h=s[1];if(o&&s[2]){if(void 0===c&&!(l in t))return!1}else{var u=new VT;if(n)var d=n(c,h,l,t,e,u);if(!(void 0===d?Xk(h,c,3,n,u):d))return!1}}return!0}zt(Zk,"baseIsMatch");var Qk=Zk;function Jk(t){return t==t&&!Ux(t)}zt(Jk,"isStrictComparable");var tC=Jk;function eC(t){for(var e=Tk(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,tC(i)]}return e}zt(eC,"getMatchData");var rC=eC;function nC(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}zt(nC,"matchesStrictComparable");var iC=nC;function aC(t){var e=rC(t);return 1==e.length&&e[0][2]?iC(e[0][0],e[0][1]):function(r){return r===t||Qk(r,t,e)}}zt(aC,"baseMatches");var oC=aC;function sC(t){return"symbol"==typeof t||Iw(t)&&"[object Symbol]"==qx(t)}zt(sC,"isSymbol");var lC=sC,cC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hC=/^\w*$/;function uC(t,e){if(vw(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!lC(t))||(hC.test(t)||!cC.test(t)||null!=e&&t in Object(e))}zt(uC,"isKey");var dC=uC;function pC(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=zt(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new(pC.Cache||WT),r}zt(pC,"memoize"),pC.Cache=WT;var fC=pC;function gC(t){var e=fC(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}zt(gC,"memoizeCapped");var mC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yC=/\\(\\)?/g,vC=gC(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(mC,function(t,r,n,i){e.push(n?i.replace(yC,"$1"):r||t)}),e}),bC=Ix?Ix.prototype:void 0,xC=bC?bC.toString:void 0;function TC(t){if("string"==typeof t)return t;if(vw(t))return rx(t,TC)+"";if(lC(t))return xC?xC.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}zt(TC,"baseToString");var wC=TC;function kC(t){return null==t?"":wC(t)}zt(kC,"toString");var CC=kC;function EC(t,e){return vw(t)?t:dC(t,e)?[t]:vC(CC(t))}zt(EC,"castPath");var SC=EC;function _C(t){if("string"==typeof t||lC(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}zt(_C,"toKey");var AC=_C;function RC(t,e){for(var r=0,n=(e=SC(e,t)).length;null!=t&&r<n;)t=t[AC(e[r++])];return r&&r==n?t:void 0}zt(RC,"baseGet");var LC=RC;function IC(t,e,r){var n=null==t?void 0:LC(t,e);return void 0===n?r:n}zt(IC,"get");var DC=IC;function NC(t,e){return null!=t&&e in Object(t)}zt(NC,"baseHasIn");var MC=NC;function OC(t,e,r){for(var n=-1,i=(e=SC(e,t)).length,a=!1;++n<i;){var o=AC(e[n]);if(!(a=null!=t&&r(t,o)))break;t=t[o]}return a||++n!=i?a:!!(i=null==t?0:t.length)&&Hw(i)&&Yw(o,i)&&(vw(t)||Bw(t))}zt(OC,"hasPath");var $C=OC;function PC(t,e){return null!=t&&$C(t,e,MC)}zt(PC,"hasIn");var BC=PC;function FC(t,e){return dC(t)&&tC(e)?iC(AC(t),e):function(r){var n=DC(r,t);return void 0===n&&n===e?BC(r,t):Xk(e,n,3)}}zt(FC,"baseMatchesProperty");var zC=FC;function KC(t){return t}zt(KC,"identity");var jC=KC;function qC(t){return function(e){return null==e?void 0:e[t]}}zt(qC,"baseProperty");var WC=qC;function UC(t){return function(e){return LC(e,t)}}zt(UC,"basePropertyDeep");var GC=UC;function YC(t){return dC(t)?WC(AC(t)):GC(t)}zt(YC,"property");var VC=YC;function HC(t){return"function"==typeof t?t:null==t?jC:"object"==typeof t?vw(t)?zC(t[0],t[1]):oC(t):VC(t)}zt(HC,"baseIteratee");var XC=HC;function ZC(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var l=o[t?s:++i];if(!1===r(a[l],l,a))break}return e}}zt(ZC,"createBaseFor");var QC=ZC();function JC(t,e){return t&&QC(t,e,Tk)}zt(JC,"baseForOwn");var tE=JC;function eE(t,e){return function(r,n){if(null==r)return r;if(!bk(r))return t(r,n);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&!1!==n(o[a],a,o););return r}}zt(eE,"createBaseEach");var rE=eE(tE);function nE(t,e){var r=-1,n=bk(t)?Array(t.length):[];return rE(t,function(t,i,a){n[++r]=e(t,i,a)}),n}zt(nE,"baseMap");var iE=nE;function aE(t,e){return(vw(t)?rx:iE)(t,XC(e,3))}zt(aE,"map");var oE=aE;function sE(t,e){var r=[];return rE(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}zt(sE,"baseFilter");var lE=sE;function cE(t,e){return(vw(t)?ww:lE)(t,XC(e,3))}zt(cE,"filter");var hE=cE;function uE(t,e,r){return`${t.name}_${e}_${r}`}zt(uE,"buildATNKey");var dE=class{static{zt(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},pE=class extends dE{static{zt(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},fE=class extends dE{static{zt(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},gE=class extends dE{static{zt(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}};function mE(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};yE(e,t);const r=t.length;for(let n=0;n<r;n++){const r=t[n],i=EE(e,r,r);void 0!==i&&OE(e,r,i)}return e}function yE(t,e){const r=e.length;for(let n=0;n<r;n++){const r=e[n],i=PE(t,r,void 0,{type:2}),a=PE(t,r,void 0,{type:7});i.stop=a,t.ruleToStartState.set(r,i),t.ruleToStopState.set(r,a)}}function vE(t,e,r){return r instanceof Yg?NE(t,e,r.terminalType,r):r instanceof Bg?ME(t,e,r):r instanceof Gg?kE(t,e,r):r instanceof Kg?CE(t,e,r):r instanceof Wg?bE(t,e,r):r instanceof Ug?xE(t,e,r):r instanceof jg?TE(t,e,r):r instanceof qg?wE(t,e,r):EE(t,e,r)}function bE(t,e,r){const n=PE(t,e,r,{type:5});RE(t,n);return _E(t,e,r,LE(t,e,n,r,EE(t,e,r)))}function xE(t,e,r){const n=PE(t,e,r,{type:5});RE(t,n);return _E(t,e,r,LE(t,e,n,r,EE(t,e,r)),NE(t,e,r.separator,r))}function TE(t,e,r){const n=PE(t,e,r,{type:4});RE(t,n);return SE(t,e,r,LE(t,e,n,r,EE(t,e,r)))}function wE(t,e,r){const n=PE(t,e,r,{type:4});RE(t,n);return SE(t,e,r,LE(t,e,n,r,EE(t,e,r)),NE(t,e,r.separator,r))}function kE(t,e,r){const n=PE(t,e,r,{type:1});RE(t,n);const i=oE(r.definition,r=>vE(t,e,r));return LE(t,e,n,r,...i)}function CE(t,e,r){const n=PE(t,e,r,{type:1});RE(t,n);return AE(t,e,r,LE(t,e,n,r,EE(t,e,r)))}function EE(t,e,r){const n=hE(oE(r.definition,r=>vE(t,e,r)),t=>void 0!==t);return 1===n.length?n[0]:0===n.length?void 0:DE(t,n)}function SE(t,e,r,n,i){const a=n.left,o=n.right,s=PE(t,e,r,{type:11});RE(t,s);const l=PE(t,e,r,{type:12});return a.loopback=s,l.loopback=s,t.decisionMap[uE(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s,$E(o,s),void 0===i?($E(s,a),$E(s,l)):($E(s,l),$E(s,i.left),$E(i.right,a)),{left:a,right:l}}function _E(t,e,r,n,i){const a=n.left,o=n.right,s=PE(t,e,r,{type:10});RE(t,s);const l=PE(t,e,r,{type:12}),c=PE(t,e,r,{type:9});return s.loopback=c,l.loopback=c,$E(s,a),$E(s,l),$E(o,c),void 0!==i?($E(c,l),$E(c,i.left),$E(i.right,a)):$E(c,s),t.decisionMap[uE(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,{left:s,right:l}}function AE(t,e,r,n){const i=n.left;return $E(i,n.right),t.decisionMap[uE(e,"Option",r.idx)]=i,n}function RE(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function LE(t,e,r,n,...i){const a=PE(t,e,n,{type:8,start:r});r.end=a;for(const s of i)void 0!==s?($E(r,s.left),$E(s.right,a)):$E(r,a);const o={left:r,right:a};return t.decisionMap[uE(e,IE(n),n.idx)]=r,o}function IE(t){if(t instanceof Gg)return"Alternation";if(t instanceof Kg)return"Option";if(t instanceof Wg)return"Repetition";if(t instanceof Ug)return"RepetitionWithSeparator";if(t instanceof jg)return"RepetitionMandatory";if(t instanceof qg)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function DE(t,e){const r=e.length;for(let a=0;a<r-1;a++){const r=e[a];let n;1===r.left.transitions.length&&(n=r.left.transitions[0]);const i=n instanceof gE,o=n,s=e[a+1].left;1===r.left.type&&1===r.right.type&&void 0!==n&&(i&&o.followState===r.right||n.target===r.right)?(i?o.followState=s:n.target=s,FE(t,r.right)):$E(r.right,s)}const n=e[0],i=e[r-1];return{left:n.left,right:i.right}}function NE(t,e,r,n){const i=PE(t,e,n,{type:1}),a=PE(t,e,n,{type:1});return BE(i,new pE(a,r)),{left:i,right:a}}function ME(t,e,r){const n=r.referencedRule,i=t.ruleToStartState.get(n),a=PE(t,e,r,{type:1}),o=PE(t,e,r,{type:1});return BE(a,new gE(i,n,o)),{left:a,right:o}}function OE(t,e,r){const n=t.ruleToStartState.get(e);$E(n,r.left);const i=t.ruleToStopState.get(e);$E(r.right,i);return{left:n,right:i}}function $E(t,e){BE(t,new fE(e))}function PE(t,e,r,n){const i=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(i),i}function BE(t,e){0===t.transitions.length&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function FE(t,e){t.states.splice(t.states.indexOf(e),1)}zt(mE,"createATN"),zt(yE,"createRuleStartAndStopATNStates"),zt(vE,"atom"),zt(bE,"repetition"),zt(xE,"repetitionSep"),zt(TE,"repetitionMandatory"),zt(wE,"repetitionMandatorySep"),zt(kE,"alternation"),zt(CE,"option"),zt(EE,"block"),zt(SE,"plus"),zt(_E,"star"),zt(AE,"optional"),zt(RE,"defineDecisionState"),zt(LE,"makeAlts"),zt(IE,"getProdType"),zt(DE,"makeBlock"),zt(NE,"tokenRef"),zt(ME,"ruleRef"),zt(OE,"buildRuleHandle"),zt($E,"epsilon"),zt(PE,"newState"),zt(BE,"addTransition"),zt(FE,"removeState");var zE={},KE=class{static{zt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){const e=jE(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return oE(this.configs,t=>t.alt)}get key(){let t="";for(const e in this.map)t+=e+":";return t}};function jE(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(t=>t.stateNumber.toString()).join("_")}`}function qE(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],o=e(a);if(null!=o&&(void 0===s?o==o&&!lC(o):r(o,s)))var s=o,l=a}return l}zt(jE,"getATNConfigKey"),zt(qE,"baseExtremum");var WE=qE;function UE(t,e){return t<e}zt(UE,"baseLt");var GE=UE;function YE(t){return t&&t.length?WE(t,jC,GE):void 0}zt(YE,"min");var VE=YE,HE=Ix?Ix.isConcatSpreadable:void 0;function XE(t){return vw(t)||Bw(t)||!!(HE&&t&&t[HE])}zt(XE,"isFlattenable");var ZE=XE;function QE(t,e,r,n,i){var a=-1,o=t.length;for(r||(r=ZE),i||(i=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?QE(s,e-1,r,n,i):yw(i,s):n||(i[i.length]=s)}return i}zt(QE,"baseFlatten");var JE=QE;function tS(t,e){return JE(oE(t,e),1)}zt(tS,"flatMap");var eS=tS;function rS(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}zt(rS,"baseFindIndex");var nS=rS;function iS(t){return t!=t}zt(iS,"baseIsNaN");var aS=iS;function oS(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}zt(oS,"strictIndexOf");var sS=oS;function lS(t,e,r){return e==e?sS(t,e,r):nS(t,aS,r)}zt(lS,"baseIndexOf");var cS=lS;function hS(t,e){return!!(null==t?0:t.length)&&cS(t,e,0)>-1}zt(hS,"arrayIncludes");var uS=hS;function dS(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}zt(dS,"arrayIncludesWith");var pS=dS;function fS(){}zt(fS,"noop");var gS=fS,mS=Rk&&1/uw(new Rk([,-0]))[1]==1/0?function(t){return new Rk(t)}:gS;function yS(t,e,r){var n=-1,i=uS,a=t.length,o=!0,s=[],l=s;if(r)o=!1,i=pS;else if(a>=200){var c=e?null:mS(t);if(c)return uw(c);o=!1,i=iw,l=new tw}else l=e?[]:s;t:for(;++n<a;){var h=t[n],u=e?e(h):h;if(h=r||0!==h?h:0,o&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),s.push(h)}else i(l,u,r)||(l!==s&&l.push(u),s.push(h))}return s}zt(yS,"baseUniq");var vS=yS;function bS(t,e){return t&&t.length?vS(t,XC(e,2)):[]}zt(bS,"uniqBy");var xS=bS;function TS(t){return(null==t?0:t.length)?JE(t,1):[]}zt(TS,"flatten");var wS=TS;function kS(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}zt(kS,"arrayEach");var CS=kS;function ES(t){return"function"==typeof t?t:jC}zt(ES,"castFunction");var SS=ES;function _S(t,e){return(vw(t)?CS:rE)(t,SS(e))}zt(_S,"forEach");var AS=_S,RS=Object.prototype.hasOwnProperty;function LS(t){if(null==t)return!0;if(bk(t)&&(vw(t)||"string"==typeof t||"function"==typeof t.splice||Ww(t)||ok(t)||Bw(t)))return!t.length;var e=jk(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(dk(t))return!yk(t).length;for(var r in t)if(RS.call(t,r))return!1;return!0}zt(LS,"isEmpty");var IS=LS;function DS(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}zt(DS,"arrayReduce");var NS=DS;function MS(t,e,r,n,i){return i(t,function(t,i,a){r=n?(n=!1,t):e(r,t,i,a)}),r}zt(MS,"baseReduce");var OS=MS;function $S(t,e,r){var n=vw(t)?NS:OS,i=arguments.length<3;return n(t,XC(e,4),r,i,rE)}zt($S,"reduce");var PS=$S;function BS(t,e){const r={};return n=>{const i=n.toString();let a=r[i];return void 0!==a||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a}}zt(BS,"createDFACache");var FS=class{static{zt(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let t="";const e=this.predicates.length;for(let r=0;r<e;r++)t+=!0===this.predicates[r]?"1":"0";return t}},zS=new FS,KS=class extends ub{static{zt(this,"LLStarLookaheadStrategy")}constructor(t){var e;super(),this.logging=null!==(e=null==t?void 0:t.logging)&&void 0!==e?e:t=>console.log(t)}initialize(t){this.atn=mE(t.rules),this.dfas=qS(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){const{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,o=this.logging,s=uE(r,"Alternation",e),l=this.atn.decisionMap[s].decision,c=oE(lv({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>oE(t,t=>t[0]));if(jS(c,!1)&&!i){const t=PS(c,(t,e,r)=>(AS(e,e=>{e&&(t[e.tokenTypeIdx]=r,AS(e.categoryMatches,e=>{t[e]=r}))}),t),{});return n?function(e){var r;const n=this.LA(1),i=t[n.tokenTypeIdx];if(void 0!==e&&void 0!==i){const t=null===(r=e[i])||void 0===r?void 0:r.GATE;if(void 0!==t&&!1===t.call(this))return}return i}:function(){const e=this.LA(1);return t[e.tokenTypeIdx]}}return n?function(t){const e=new FS,r=void 0===t?0:t.length;for(let i=0;i<r;i++){const r=null==t?void 0:t[i].GATE;e.set(i,void 0===r||r.call(this))}const n=WS.call(this,a,l,e,o);return"number"==typeof n?n:void 0}:function(){const t=WS.call(this,a,l,zS,o);return"number"==typeof t?t:void 0}}buildLookaheadForOptional(t){const{prodOccurrence:e,rule:r,prodType:n,dynamicTokensEnabled:i}=t,a=this.dfas,o=this.logging,s=uE(r,n,e),l=this.atn.decisionMap[s].decision,c=oE(lv({maxLookahead:1,occurrence:e,prodType:n,rule:r}),t=>oE(t,t=>t[0]));if(jS(c)&&c[0][0]&&!i){const t=c[0],e=wS(t);if(1===e.length&&IS(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=PS(e,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,AS(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){const t=WS.call(this,a,l,zS,o);return"object"!=typeof t&&0===t}}};function jS(t,e=!0){const r=new Set;for(const n of t){const t=new Set;for(const i of n){if(void 0===i){if(e)break;return!1}const n=[i.tokenTypeIdx].concat(i.categoryMatches);for(const e of n)if(r.has(e)){if(!t.has(e))return!1}else r.add(e),t.add(e)}}return!0}function qS(t){const e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=BS(t.decisionStates[n],n);return r}function WS(t,e,r,n){const i=t[e](r);let a=i.start;if(void 0===a){a=n_(i,e_(i_(i.atnStartState))),i.start=a}return US.apply(this,[i,a,r,n])}function US(t,e,r,n){let i=e,a=1;const o=[];let s=this.LA(a++);for(;;){let e=ZS(i,s);if(void 0===e&&(e=GS.apply(this,[t,i,s,a,r,n])),e===zE)return XS(o,i,s);if(!0===e.isAcceptState)return e.prediction;i=e,o.push(s),s=this.LA(a++)}}function GS(t,e,r,n,i,a){const o=QS(e.configs,r,i);if(0===o.size)return r_(t,e,r,zE),zE;let s=e_(o);const l=t_(o,i);if(void 0!==l)s.isAcceptState=!0,s.prediction=l,s.configs.uniqueAlt=l;else if(c_(o)){const e=VE(o.alts);s.isAcceptState=!0,s.prediction=e,s.configs.uniqueAlt=e,YS.apply(this,[t,n,o.alts,a])}return s=r_(t,e,r,s),s}function YS(t,e,r,n){const i=[];for(let o=1;o<=e;o++)i.push(this.LA(o).tokenType);const a=t.atnStartState;n(VS({topLevelRule:a.rule,ambiguityIndices:r,production:a.production,prefixPath:i}))}function VS(t){const e=oE(t.prefixPath,t=>Ry(t)).join(", "),r=0===t.production.idx?"":t.production.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${HS(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n}function HS(t){if(t instanceof Bg)return"SUBRULE";if(t instanceof Kg)return"OPTION";if(t instanceof Gg)return"OR";if(t instanceof jg)return"AT_LEAST_ONE";if(t instanceof qg)return"AT_LEAST_ONE_SEP";if(t instanceof Ug)return"MANY_SEP";if(t instanceof Wg)return"MANY";if(t instanceof Yg)return"CONSUME";throw Error("non exhaustive match")}function XS(t,e,r){const n=eS(e.configs.elements,t=>t.state.transitions);return{actualToken:r,possibleTokenTypes:xS(n.filter(t=>t instanceof pE).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function ZS(t,e){return t.edges[e.tokenTypeIdx]}function QS(t,e,r){const n=new KE,i=[];for(const o of t.elements){if(!1===r.is(o.alt))continue;if(7===o.state.type){i.push(o);continue}const t=o.state.transitions.length;for(let r=0;r<t;r++){const t=JS(o.state.transitions[r],e);void 0!==t&&n.add({state:t,alt:o.alt,stack:o.stack})}}let a;if(0===i.length&&1===n.size&&(a=n),void 0===a){a=new KE;for(const t of n.elements)a_(t,a)}if(i.length>0&&!s_(a))for(const o of i)a.add(o);return a}function JS(t,e){if(t instanceof pE&&qy(e,t.tokenType))return t.target}function t_(t,e){let r;for(const n of t.elements)if(!0===e.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function e_(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function r_(t,e,r,n){return n=n_(t,n),e.edges[r.tokenTypeIdx]=n,n}function n_(t,e){if(e===zE)return e;const r=e.configs.key,n=t.states[r];return void 0!==n?n:(e.configs.finalize(),t.states[r]=e,e)}function i_(t){const e=new KE,r=t.transitions.length;for(let n=0;n<r;n++){a_({state:t.transitions[n].target,alt:n,stack:[]},e)}return e}function a_(t,e){const r=t.state;if(7===r.type){if(t.stack.length>0){const r=[...t.stack];a_({state:r.pop(),alt:t.alt,stack:r},e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);const n=r.transitions.length;for(let i=0;i<n;i++){const n=o_(t,r.transitions[i]);void 0!==n&&a_(n,e)}}function o_(t,e){if(e instanceof fE)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof gE){const r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r}}}function s_(t){for(const e of t.elements)if(7===e.state.type)return!0;return!1}function l_(t){for(const e of t.elements)if(7!==e.state.type)return!1;return!0}function c_(t){if(l_(t))return!0;const e=h_(t.elements);return u_(e)&&!d_(e)}function h_(t){const e=new Map;for(const r of t){const t=jE(r,!1);let n=e.get(t);void 0===n&&(n={},e.set(t,n)),n[r.alt]=!0}return e}function u_(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function d_(t){for(const e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}zt(jS,"isLL1Sequence"),zt(qS,"initATNSimulator"),zt(WS,"adaptivePredict"),zt(US,"performLookahead"),zt(GS,"computeLookaheadTarget"),zt(YS,"reportLookaheadAmbiguity"),zt(VS,"buildAmbiguityError"),zt(HS,"getProductionDslName"),zt(XS,"buildAdaptivePredictError"),zt(ZS,"getExistingTargetState"),zt(QS,"computeReachSet"),zt(JS,"getReachableTarget"),zt(t_,"getUniqueAlt"),zt(e_,"newDFAState"),zt(r_,"addDFAEdge"),zt(n_,"addDFAState"),zt(i_,"computeStartState"),zt(a_,"closure"),zt(o_,"getEpsilonTarget"),zt(s_,"hasConfigInRuleStopState"),zt(l_,"allConfigsInRuleStopStates"),zt(c_,"hasConflictTerminatingPrediction"),zt(h_,"getConflictingAltSets"),zt(u_,"hasConflictingAltSet"),zt(d_,"hasStateAssociatedWithOneAlt"),Xt();var p_=class{static{zt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(t){return this.rootNode=new v_(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){const e=new m_;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){const r=new g_(t.startOffset,t.image.length,Si(t),t.tokenType,!e);return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),r}removeNode(t){const e=t.container;if(e){const r=e.content.indexOf(t);r>=0&&e.content.splice(r,1)}}addHiddenNodes(t){const e=[];for(const i of t){const t=new g_(i.startOffset,i.image.length,Si(i),i.tokenType,!0);t.root=this.rootNode,e.push(t)}let r=this.current,n=!1;if(r.content.length>0)r.content.push(...e);else{for(;r.container;){const t=r.container.content.indexOf(r);if(t>0){r.container.content.splice(t,0,...e),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...e)}}construct(t){const e=this.current;"string"!=typeof t.$type||t.$infix||(this.current.astNode=t),t.$cstNode=e;const r=this.nodeStack.pop();0===r?.content.length&&this.removeNode(r)}},f_=class{static{zt(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){const t="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!t)throw new Error("This node has no associated AST element");return t}set astNode(t){this._astNode=t}get text(){return this.root.fullText.substring(this.offset,this.end)}},g_=class extends f_{static{zt(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,e,r,n,i=!1){super(),this._hidden=i,this._offset=t,this._tokenType=n,this._length=e,this._range=r}},m_=class extends f_{static{zt(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new y_(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const t=this.firstNonHiddenNode,e=this.lastNonHiddenNode;if(t&&e){if(void 0===this._rangeCache){const{range:r}=t,{range:n}=e;this._rangeCache={start:r.start,end:n.end.line<r.start.line?r.start:n.end}}return this._rangeCache}return{start:s.create(0,0),end:s.create(0,0)}}get firstNonHiddenNode(){for(const t of this.content)if(!t.hidden)return t;return this.content[0]}get lastNonHiddenNode(){for(let t=this.content.length-1;t>=0;t--){const e=this.content[t];if(!e.hidden)return e}return this.content[this.content.length-1]}},y_=class t extends Array{static{zt(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,e,...r){return this.addParents(r),super.splice(t,e,...r)}addParents(t){for(const e of t)e.container=this.parent}},v_=class extends m_{static{zt(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=t??""}},b_=Symbol("Datatype");function x_(t){return t.$type===b_}zt(x_,"isDataTypeNode");var T_=zt(t=>t.endsWith("")?t:t+"","withRuleSuffix"),w_=class{static{zt(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;const e=this.lexer.definition,r="production"===t.LanguageMetaData.mode;t.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new R_(e,{...t.parser.ParserConfig,skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider},t.shared.profilers.LangiumProfiler.createTask("parsing",t.LanguageMetaData.languageId)):this.wrapper=new A_(e,{...t.parser.ParserConfig,skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider})}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},k_=class extends w_{static{zt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new p_,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){const r=this.computeRuleType(t);let n;un(t)&&(n=t.name,this.registerPrecedenceMap(t));const i=this.wrapper.DEFINE_RULE(T_(t.name),this.startImplementation(r,n,e).bind(this));return this.allRules.set(t.name,i),Nn(t)&&t.entry&&(this.mainRule=i),i}registerPrecedenceMap(t){const e=t.name,r=new Map;for(let n=0;n<t.operators.precedences.length;n++){const e=t.operators.precedences[n];for(const t of e.operators)r.set(t.value,{precedence:n,rightAssoc:"right"===e.associativity})}this.operatorPrecedence.set(e,r)}computeRuleType(t){return un(t)?Wa(t):t.fragment?void 0:Fa(t)?b_:Wa(t)}parse(t,e={}){this.nodeBuilder.buildRootNode(t);const r=this.lexerResult=this.lexer.tokenize(t);this.wrapper.input=r.tokens;const n=e.rule?this.allRules.get(e.rule):this.mainRule;if(!n)throw new Error(e.rule?`No rule found with name '${e.rule}'`:"No main rule available.");const i=this.doParse(n);return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,sr(i,{deep:!0}),{value:i,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}doParse(t){let e=this.wrapper.rule(t);if(this.stack.length>0&&(e=this.construct()),void 0===e)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return e}startImplementation(t,e,r){return n=>{const i=!this.isRecording()&&void 0!==t;if(i){const r={$type:t};this.stack.push(r),t===b_?r.value="":void 0!==e&&(r.$infixName=e)}return r(n),i?this.construct():void 0}}extractHiddenTokens(t){const e=this.lexerResult.hidden;if(!e.length)return[];const r=t.startOffset;for(let n=0;n<e.length;n++){if(e[n].startOffset>r)return e.splice(0,n)}return e.splice(0,e.length)}consume(t,e,r){const n=this.wrapper.wrapConsume(t,e);if(!this.isRecording()&&this.isValidToken(n)){const t=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(t);const e=this.nodeBuilder.buildLeafNode(n,r),{assignment:i,crossRef:a}=this.getAssignment(r),o=this.current;if(i){const t=bn(r)?n.image:this.converter.convert(n.image,e);this.assign(i.operator,i.feature,t,e,a)}else if(x_(o)){let t=n.image;bn(r)||(t=this.converter.convert(t,e).toString()),o.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,n,i){let a,o;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n));try{o=this.wrapper.wrapSubrule(t,e,i)}finally{this.isRecording()||(void 0!==o||r||(o=this.construct()),void 0!==o&&a&&a.length>0&&this.performSubruleAssignment(o,n,a))}}performSubruleAssignment(t,e,r){const{assignment:n,crossRef:i}=this.getAssignment(e);if(n)this.assign(n.operator,n.feature,t,r,i);else if(!n){const e=this.current;if(x_(e))e.value+=t.toString();else if("object"==typeof t&&t){const r=this.assignWithoutOverride(t,e);this.stack.pop(),this.stack.push(r)}}}action(t,e){if(!this.isRecording()){let r=this.current;if(e.feature&&e.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode);this.nodeBuilder.buildCompositeNode(e).content.push(r.$cstNode);const n={$type:t};this.stack.push(n),this.assign(e.operator,e.feature,r,r.$cstNode)}else r.$type=t}}construct(){if(this.isRecording())return;const t=this.stack.pop();return this.nodeBuilder.construct(t),"$infixName"in t?this.constructInfix(t,this.operatorPrecedence.get(t.$infixName)):x_(t)?this.converter.convert(t.value,t.$cstNode):(vr(this.astReflection,t),t)}constructInfix(t,e){const r=t.parts;if(!Array.isArray(r)||0===r.length)return;const n=t.operators;if(!Array.isArray(n)||r.length<2)return r[0];let i=0,a=-1;for(let f=0;f<n.length;f++){const t=n[f],r=e.get(t)??{precedence:1/0,rightAssoc:!1};r.precedence>a?(a=r.precedence,i=f):r.precedence===a&&(r.rightAssoc||(i=f))}const o=n.slice(0,i),s=n.slice(i+1),l=r.slice(0,i+1),c=r.slice(i+1),h={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:l,operators:o},u={$infixName:t.$infixName,$type:t.$type,$cstNode:t.$cstNode,parts:c,operators:s},d=this.constructInfix(h,e),p=this.constructInfix(u,e);return{$type:t.$type,$cstNode:t.$cstNode,left:d,operator:n[i],right:p}}getAssignment(t){if(!this.assignmentMap.has(t)){const e=lr(t,zr);this.assignmentMap.set(t,{assignment:e,crossRef:e&&Xr(e.terminal)?e.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(t)}assign(t,e,r,n,i){const a=this.current;let o;switch(o="single"===i&&"string"==typeof r?this.linker.buildReference(a,e,n,r):"multi"===i&&"string"==typeof r?this.linker.buildMultiReference(a,e,n,r):r,t){case"=":a[e]=o;break;case"?=":a[e]=!0;break;case"+=":Array.isArray(a[e])||(a[e]=[]),a[e].push(o)}}assignWithoutOverride(t,e){for(const[n,i]of Object.entries(e)){const e=t[n];void 0===e?t[n]=i:Array.isArray(e)&&Array.isArray(i)&&(i.push(...e),t[n]=i)}const r=t.$cstNode;return r&&(r.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}},C_=class{static{zt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(t){return Wy.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return Wy.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return Wy.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return Wy.buildEarlyExitMessage(t)}},E_=class extends C_{static{zt(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${e.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}},S_=class extends w_{static{zt(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){this.resetState();const e=this.lexer.tokenize(t,{mode:"partial"});return this.tokens=e.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,e){const r=this.wrapper.DEFINE_RULE(T_(t.name),this.startImplementation(e).bind(this));return this.allRules.set(t.name,r),t.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(t){return e=>{const r=this.keepStackSize();try{t(e)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const t=this.elementStack.length;return this.stackSize=t,t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,n,i){this.before(n),this.wrapper.wrapSubrule(t,e,i),this.after(n)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){if(!this.isRecording()){const e=this.elementStack.lastIndexOf(t);e>=0&&this.elementStack.splice(e)}}get currIdx(){return this.wrapper.currIdx}},__={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new E_},A_=class extends tx{static{zt(this,"ChevrotainWrapper")}constructor(t,e){super(t,{...__,lookaheadStrategy:e&&"maxLookahead"in e?new ub({maxLookahead:e.maxLookahead}):new KS({logging:e.skipValidations?()=>{}:void 0}),...e})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e,r){return this.RULE(t,e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e,void 0)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}rule(t){return t.call(this,{})}},R_=class extends A_{static{zt(this,"ProfilerWrapper")}constructor(t,e,r){super(t,e),this.task=r}rule(t){this.task.start(),this.task.startSubTask(this.ruleName(t));try{return super.rule(t)}finally{this.task.stopSubTask(this.ruleName(t)),this.task.stop()}}ruleName(t){return t.ruleName}subrule(t,e,r){this.task.startSubTask(this.ruleName(e));try{return super.subrule(t,e,r)}finally{this.task.stopSubTask(this.ruleName(e))}}};function L_(t,e,r){return I_({parser:e,tokens:r,ruleNames:new Map},t),e}function I_(t,e){const r=Ta(e,!1),n=nr(e.rules).filter(Nn).filter(t=>r.has(t));for(const a of n){const e={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(a,N_(e,a.definition))}const i=nr(e.rules).filter(un).filter(t=>r.has(t));for(const a of i)t.parser.rule(a,D_(t,a))}function D_(t,e){const r=e.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(Jn(r))throw new Error("Cannot use terminal rule in infix expression");const n=e.operators.precedences.flatMap(t=>t.operators),i={$type:"Group",elements:[]},a={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},o={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(a,o);const s={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},l={...a,$container:o};o.elements.push(s,l);const c=n.map(e=>t.tokens[e.value]).map((e,r)=>({ALT:zt(()=>t.parser.consume(r,e,s),"ALT")}));let h;return e=>{h??(h=U_(t,r)),t.parser.subrule(0,h,!1,a,e),t.parser.many(0,{DEF:zt(()=>{t.parser.alternatives(0,c),t.parser.subrule(1,h,!1,l,e)},"DEF")})}}function N_(t,e,r=!1){let n;if(bn(e))n=q_(t,e);else if(Dr(e))n=M_(t,e);else if(zr(e))n=N_(t,e.terminal);else if(Xr(e))n=j_(t,e);else if(Kn(e))n=O_(t,e);else if(Mr(e))n=B_(t,e);else if(ui(e))n=F_(t,e);else if(sn(e))n=z_(t,e);else{if(!tn(e))throw new Wi(e.$cstNode,`Unexpected element type: ${e.$type}`);{const r=t.consume++;n=zt(()=>t.parser.consume(r,Ky,e),"method")}}return W_(t,r?void 0:K_(e),n,e.cardinality)}function M_(t,e){const r=Wa(e);return()=>t.parser.action(r,e)}function O_(t,e){const r=e.rule.ref;if(Sr(r)){const n=t.subrule++,i=Nn(r)&&r.fragment,a=e.arguments.length>0?$_(r,e.arguments):()=>({});let o;return s=>{o??(o=U_(t,r)),t.parser.subrule(n,o,i,e,a(s))}}if(Jn(r)){const n=t.consume++,i=Y_(t,r.name);return()=>t.parser.consume(n,i,e)}if(!r)throw new Wi(e.$cstNode,`Undefined rule: ${e.rule.$refText}`);Ui()}function $_(t,e){if(e.some(t=>t.calledByName)){const t=e.map(t=>({parameterName:t.parameter?.ref?.name,predicate:P_(t.value)}));return e=>{const r={};for(const{parameterName:n,predicate:i}of t)n&&(r[n]=i(e));return r}}{const r=e.map(t=>P_(t.value));return e=>{const n={};for(let i=0;i<r.length;i++)if(i<t.parameters.length){const a=t.parameters[i].name,o=r[i];n[a]=o(e)}return n}}}function P_(t){if(Qr(t)){const e=P_(t.left),r=P_(t.right);return t=>e(t)||r(t)}if(Vr(t)){const e=P_(t.left),r=P_(t.right);return t=>e(t)&&r(t)}if(En(t)){const e=P_(t.value);return t=>!e(t)}if(In(t)){const e=t.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(jr(t)){const e=Boolean(t.true);return()=>e}Ui()}function B_(t,e){if(1===e.elements.length)return N_(t,e.elements[0]);{const r=[];for(const i of e.elements){const e={ALT:N_(t,i,!0)},n=K_(i);n&&(e.GATE=P_(n)),r.push(e)}const n=t.or++;return e=>t.parser.alternatives(n,r.map(t=>{const r={ALT:zt(()=>t.ALT(e),"ALT")},n=t.GATE;return n&&(r.GATE=()=>n(e)),r}))}}function F_(t,e){if(1===e.elements.length)return N_(t,e.elements[0]);const r=[];for(const s of e.elements){const e={ALT:N_(t,s,!0)},n=K_(s);n&&(e.GATE=P_(n)),r.push(e)}const n=t.or++,i=zt((t,e)=>`uGroup_${t}_${e.getRuleStack().join("-")}`,"idFunc"),a=zt(e=>t.parser.alternatives(n,r.map((r,a)=>{const o={ALT:zt(()=>!0,"ALT")},s=t.parser;o.ALT=()=>{if(r.ALT(e),!s.isRecording()){const t=i(n,s);s.unorderedGroups.get(t)||s.unorderedGroups.set(t,[]);const e=s.unorderedGroups.get(t);void 0===e?.[a]&&(e[a]=!0)}};const l=r.GATE;return o.GATE=l?()=>l(e):()=>{const t=s.unorderedGroups.get(i(n,s));return!t?.[a]},o})),"alternatives"),o=W_(t,K_(e),a,"*");return e=>{o(e),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function z_(t,e){const r=e.elements.map(e=>N_(t,e));return t=>r.forEach(e=>e(t))}function K_(t){if(sn(t))return t.guardCondition}function j_(t,e,r=e.terminal){if(r){if(Kn(r)&&Nn(r.rule.ref)){const n=r.rule.ref,i=t.subrule++;let a;return r=>{a??(a=U_(t,n)),t.parser.subrule(i,a,!1,e,r)}}if(Kn(r)&&Jn(r.rule.ref)){const n=t.consume++,i=Y_(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}if(bn(r)){const n=t.consume++,i=Y_(t,r.value);return()=>t.parser.consume(n,i,e)}throw new Error("Could not build cross reference parser")}{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=Na(e.type.ref),n=r?.terminal;if(!n)throw new Error("Could not find name assignment for type: "+Wa(e.type.ref));return j_(t,e,n)}}function q_(t,e){const r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function W_(t,e,r,n){const i=e&&P_(e);if(!n){if(i){const e=t.or++;return n=>t.parser.alternatives(e,[{ALT:zt(()=>r(n),"ALT"),GATE:zt(()=>i(n),"GATE")},{ALT:Qb(),GATE:zt(()=>!i(n),"GATE")}])}return r}if("*"===n){const e=t.many++;return n=>t.parser.many(e,{DEF:zt(()=>r(n),"DEF"),GATE:i?()=>i(n):void 0})}if("+"===n){const e=t.many++;if(i){const n=t.or++;return a=>t.parser.alternatives(n,[{ALT:zt(()=>t.parser.atLeastOne(e,{DEF:zt(()=>r(a),"DEF")}),"ALT"),GATE:zt(()=>i(a),"GATE")},{ALT:Qb(),GATE:zt(()=>!i(a),"GATE")}])}return n=>t.parser.atLeastOne(e,{DEF:zt(()=>r(n),"DEF")})}if("?"===n){const e=t.optional++;return n=>t.parser.optional(e,{DEF:zt(()=>r(n),"DEF"),GATE:i?()=>i(n):void 0})}Ui()}function U_(t,e){const r=G_(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function G_(t,e){if(Sr(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Nn(n);){if(sn(n)||Mr(n)||ui(n)){i=n.elements.indexOf(r).toString()+":"+i}r=n,n=n.$container}return i=n.name+":"+i,t.ruleNames.set(e,i),i}}function Y_(t,e){const r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}function V_(t){const e=t.Grammar,r=t.parser.Lexer,n=new S_(t);return L_(e,n,r.definition),n.finalize(),n}function H_(t){const e=X_(t);return e.finalize(),e}function X_(t){const e=t.Grammar,r=t.parser.Lexer;return L_(e,new k_(t),r.definition)}zt(L_,"createParser"),zt(I_,"buildRules"),zt(D_,"buildInfixRule"),zt(N_,"buildElement"),zt(M_,"buildAction"),zt(O_,"buildRuleCall"),zt($_,"buildRuleCallPredicate"),zt(P_,"buildPredicate"),zt(B_,"buildAlternatives"),zt(F_,"buildUnorderedGroup"),zt(z_,"buildGroup"),zt(K_,"getGuardCondition"),zt(j_,"buildCrossReference"),zt(q_,"buildKeyword"),zt(W_,"wrap"),zt(U_,"getRule"),zt(G_,"getRuleName"),zt(Y_,"getToken"),zt(V_,"createCompletionParser"),zt(H_,"createLangiumParser"),zt(X_,"prepareLangiumParser");var Z_,Q_=class{static{zt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,e){const r=nr(Ta(t,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,e);return i.push(...n),i}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(Jn).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){const e=Va(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,n={name:t.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),t.hidden&&(n.GROUP=ga(e)?Ay.SKIPPED:"hidden"),n}requiresCustomPattern(t){return!(!t.flags.includes("u")&&!t.flags.includes("s"))}regexPatternFunction(t){const e=new RegExp(t,t.flags+"y");return(t,r)=>{e.lastIndex=r;return e.exec(t)}}buildKeywordTokens(t,e,r){return t.filter(Sr).flatMap(t=>fr(t).filter(bn)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,Boolean(r?.caseInsensitive)))}buildKeywordToken(t,e,r){const n=this.buildKeywordPattern(t,r),i={name:t.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(t,e)};return"function"==typeof n&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(t,e){return e?new RegExp(ma(t.value),"i"):t.value}findLongerAlt(t,e){return e.reduce((e,r)=>{const n=r?.PATTERN;return n?.source&&ya("^"+n.source+"$",t.value)&&e.push(r),e},[])}},J_=class{static{zt(this,"DefaultValueConverter")}convert(t,e){let r=e.grammarSource;if(Xr(r)&&(r=Ca(r)),Kn(r)){const n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,t,e)}return t}runConverter(t,e,r){switch(t.name.toUpperCase()){case"INT":return Z_.convertInt(e);case"STRING":return Z_.convertString(e);case"ID":return Z_.convertID(e)}switch(Ya(t)?.toLowerCase()){case"number":return Z_.convertNumber(e);case"boolean":return Z_.convertBoolean(e);case"bigint":return Z_.convertBigint(e);case"date":return Z_.convertDate(e);default:return e}}};!function(t){function e(t){let e="";for(let n=1;n<t.length-1;n++){const i=t.charAt(n);if("\\"===i){e+=r(t.charAt(++n))}else e+=i}return e}function r(t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return t}}function n(t){return"^"===t.charAt(0)?t.substring(1):t}function i(t){return parseInt(t)}function a(t){return BigInt(t)}function o(t){return new Date(t)}function s(t){return Number(t)}function l(t){return"true"===t.toLowerCase()}zt(e,"convertString"),t.convertString=e,zt(r,"convertEscapeCharacter"),zt(n,"convertID"),t.convertID=n,zt(i,"convertInt"),t.convertInt=i,zt(a,"convertBigint"),t.convertBigint=a,zt(o,"convertDate"),t.convertDate=o,zt(s,"convertNumber"),t.convertNumber=s,zt(l,"convertBoolean"),t.convertBoolean=l}(Z_||(Z_={}));var tA={};function eA(){return new Promise(t=>{"undefined"==typeof setImmediate?setTimeout(t,0):setImmediate(t)})}Wt(tA,Ut(te(),1)),zt(eA,"delayNextTick");var rA=0,nA=10;function iA(){return rA=performance.now(),new tA.CancellationTokenSource}function aA(t){nA=t}zt(iA,"startCancelableOperation"),zt(aA,"setInterruptionPeriod");var oA=Symbol("OperationCancelled");function sA(t){return t===oA}async function lA(t){if(t===tA.CancellationToken.None)return;const e=performance.now();if(e-rA>=nA&&(rA=e,await eA(),rA=performance.now()),t.isCancellationRequested)throw oA}zt(sA,"isOperationCancelled"),zt(lA,"interruptAndCheck");var cA,hA,uA=class{static{zt(this,"Deferred")}constructor(){this.promise=new Promise((t,e)=>{this.resolve=e=>(t(e),this),this.reject=t=>(e(t),this)})}},dA=class t{static{zt(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){const e=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(e,r)}return this._content}update(e,r){for(const n of e)if(t.isIncremental(n)){const t=mA(n.range),e=this.offsetAt(t.start),r=this.offsetAt(t.end);this._content=this._content.substring(0,e)+n.text+this._content.substring(r,this._content.length);const i=Math.max(t.start.line,0),a=Math.max(t.end.line,0);let o=this._lineOffsets;const s=fA(n.text,!1,e);if(a-i===s.length)for(let n=0,c=s.length;n<c;n++)o[n+i+1]=s[n];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));const l=n.text.length-(r-e);if(0!==l)for(let n=i+1+s.length,c=o.length;n<c;n++)o[n]=o[n]+l}else{if(!t.isFull(n))throw new Error("Unknown change event received");this._content=n.text,this._lineOffsets=void 0}this._version=r}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=fA(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);const e=this.getLineOffsets();let r=0,n=e.length;if(0===n)return{line:0,character:t};for(;r<n;){const i=Math.floor((r+n)/2);e[i]>t?n=i:r=i+1}const i=r-1;return{line:i,character:(t=this.ensureBeforeEOL(t,e[i]))-e[i]}}offsetAt(t){const e=this.getLineOffsets();if(t.line>=e.length)return this._content.length;if(t.line<0)return 0;const r=e[t.line];if(t.character<=0)return r;const n=t.line+1<e.length?e[t.line+1]:this._content.length,i=Math.min(r+t.character,n);return this.ensureBeforeEOL(i,r)}ensureBeforeEOL(t,e){for(;t>e&&gA(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0!==e.range&&(void 0===e.rangeLength||"number"==typeof e.rangeLength)}static isFull(t){const e=t;return null!=e&&"string"==typeof e.text&&void 0===e.range&&void 0===e.rangeLength}};function pA(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);pA(n,e),pA(i,e);let a=0,o=0,s=0;for(;a<n.length&&o<i.length;){const r=e(n[a],i[o]);t[s++]=r<=0?n[a++]:i[o++]}for(;a<n.length;)t[s++]=n[a++];for(;o<i.length;)t[s++]=i[o++];return t}function fA(t,e,r=0){const n=e?[r]:[];for(let i=0;i<t.length;i++){const e=t.charCodeAt(i);gA(e)&&(13===e&&i+1<t.length&&10===t.charCodeAt(i+1)&&i++,n.push(r+i+1))}return n}function gA(t){return 13===t||10===t}function mA(t){const e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function yA(t){const e=mA(t.range);return e!==t.range?{newText:t.newText,range:e}:t}!function(t){function e(t,e,r,n){return new dA(t,e,r,n)}function r(t,e,r){if(t instanceof dA)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function n(t,e){const r=t.getText(),n=pA(e.map(yA),(t,e)=>{const r=t.range.start.line-e.range.start.line;return 0===r?t.range.start.character-e.range.start.character:r});let i=0;const a=[];for(const o of n){const e=t.offsetAt(o.range.start);if(e<i)throw new Error("Overlapping edit");e>i&&a.push(r.substring(i,e)),o.newText.length&&a.push(o.newText),i=t.offsetAt(o.range.end)}return a.push(r.substr(i)),a.join("")}zt(e,"create"),t.create=e,zt(r,"update"),t.update=r,zt(n,"applyEdits"),t.applyEdits=n}(cA||(cA={})),zt(pA,"mergeSort"),zt(fA,"computeLineOffsets"),zt(gA,"isEOL"),zt(mA,"getWellformedRange"),zt(yA,"getWellformedEdit"),(()=>{var t={975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,a=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)r=t.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=s,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=s,o=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(a+1,s):n=t.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===r&&-1!==o?++o:o=-1}return n}zt(e,"e"),zt(r,"r");var n={resolve:zt(function(){for(var t,n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(void 0===t&&(t=process.cwd()),o=t),e(o),0!==o.length&&(n=o+"/"+n,i=47===o.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:zt(function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},"normalize"),isAbsolute:zt(function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},"isAbsolute"),join:zt(function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},"join"),relative:zt(function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length,o=a-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var l=r.length-s,c=o<l?o:l,h=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===r.charCodeAt(s+u))return r.slice(s+u+1);if(0===u)return r.slice(s+u)}else o>c&&(47===t.charCodeAt(i+u)?h=u:0===u&&(h=0));break}var d=t.charCodeAt(i+u);if(d!==r.charCodeAt(s+u))break;47===d&&(h=u)}var p="";for(u=i+h+1;u<=a;++u)u!==a&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(s+h):(s+=h,47===r.charCodeAt(s)&&++s,r.slice(s))},"relative"),_makeLong:zt(function(t){return t},"_makeLong"),dirname:zt(function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,a=!0,o=t.length-1;o>=1;--o)if(47===(r=t.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},"dirname"),basename:zt(function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,a=-1,o=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var s=r.length-1,l=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===l&&(o=!1,l=n+1),s>=0&&(c===r.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=l))}return i===a?a=l:-1===a&&(a=t.length),t.slice(i,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!o){i=n+1;break}}else-1===a&&(o=!1,a=n+1);return-1===a?"":t.slice(i,a)},"basename"),extname:zt(function(t){e(t);for(var r=-1,n=0,i=-1,a=!0,o=0,s=t.length-1;s>=0;--s){var l=t.charCodeAt(s);if(47!==l)-1===i&&(a=!1,i=s+1),46===l?-1===r?r=s:1!==o&&(o=1):-1!==r&&(o=-1);else if(!a){n=s+1;break}}return-1===r||-1===i||0===o||1===o&&r===i-1&&r===n+1?"":t.slice(r,i)},"extname"),format:zt(function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return r=(e=t).dir||e.root,n=e.base||(e.name||"")+(e.ext||""),r?r===e.root?r+n:r+"/"+n:n;var e,r,n},"format"),parse:zt(function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),a=47===i;a?(r.root="/",n=1):n=0;for(var o=-1,s=0,l=-1,c=!0,h=t.length-1,u=0;h>=n;--h)if(47!==(i=t.charCodeAt(h)))-1===l&&(c=!1,l=h+1),46===i?-1===o?o=h:1!==u&&(u=1):-1!==o&&(u=-1);else if(!c){s=h+1;break}return-1===o||-1===l||0===u||1===u&&o===l-1&&o===s+1?-1!==l&&(r.base=r.name=0===s&&a?t.slice(1,l):t.slice(s,l)):(0===s&&a?(r.name=t.slice(1,o),r.base=t.slice(1,l)):(r.name=t.slice(s,o),r.base=t.slice(s,l)),r.ext=t.slice(o,l)),s>0?r.dir=t.slice(0,s-1):a&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}zt(r,"r"),r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};let i;if(r.r(n),r.d(n,{URI:zt(()=>d,"URI"),Utils:zt(()=>S,"Utils")}),"object"==typeof process)i="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;i=t.indexOf("Windows")>=0}const a=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function l(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!a.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}zt(l,"a");const c="",h="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{zt(this,"l")}static isUri(t){return t instanceof d||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||c,this.authority=t.authority||c,this.path=t.path||c,this.query=t.query||c,this.fragment=t.fragment||c):(this.scheme=function(t,e){return t||e?t:"file"}(t,a),this.authority=e||c,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==h&&(e=h+e):e=h}return e}(this.scheme,r||c),this.query=n||c,this.fragment=i||c,l(this,a))}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===i?i=this.query:null===i&&(i=c),void 0===a?a=this.fragment:null===a&&(a=c),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new f(e,r,n,i,a)}static parse(t,e=!1){const r=u.exec(t);return r?new f(r[2]||c,w(r[4]||c),w(r[5]||c),w(r[7]||c),w(r[9]||c),e):new f(c,c,c,c,c)}static file(t){let e=c;if(i&&(t=t.replace(/\\/g,h)),t[0]===h&&t[1]===h){const r=t.indexOf(h,2);-1===r?(e=t.substring(2),t=h):(e=t.substring(2,r),t=t.substring(r)||h)}return new f("file",e,t,c,c)}static from(t){const e=new f(t.scheme,t.authority,t.path,t.query,t.fragment);return l(e,!0),e}toString(t=!1){return b(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof d)return t;{const e=new f(t);return e._formatted=t.external,e._fsPath=t._sep===p?t.fsPath:null,e}}return t}}const p=i?1:void 0;class f extends d{static{zt(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=p),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(t,e,r){let n,i=-1;for(let a=0;a<t.length;a++){const o=t.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||e&&47===o||r&&91===o||r&&93===o||r&&58===o)-1!==i&&(n+=encodeURIComponent(t.substring(i,a)),i=-1),void 0!==n&&(n+=t.charAt(a));else{void 0===n&&(n=t.substr(0,a));const e=g[o];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,a)),i=-1),n+=e):-1===i&&(i=a)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function y(t){let e;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=g[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function v(t,e){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,i&&(r=r.replace(/\//g,"\\")),r}function b(t,e){const r=e?y:m;let n="",{scheme:i,authority:a,path:o,query:s,fragment:l}=t;if(i&&(n+=i,n+=":"),(a||"file"===i)&&(n+=h,n+=h),a){let t=a.indexOf("@");if(-1!==t){const e=a.substr(0,t);a=a.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}a=a.toLowerCase(),t=a.lastIndexOf(":"),-1===t?n+=r(a,!1,!0):(n+=r(a.substr(0,t),!1,!0),n+=a.substr(t))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const t=o.charCodeAt(1);t>=65&&t<=90&&(o=`/${String.fromCharCode(t+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const t=o.charCodeAt(0);t>=65&&t<=90&&(o=`${String.fromCharCode(t+32)}:${o.substr(2)}`)}n+=r(o,!0,!1)}return s&&(n+="?",n+=r(s,!1,!1)),l&&(n+="#",n+=e?l:m(l,!1,!1)),n}function x(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+x(t.substr(3)):t}}zt(m,"m"),zt(y,"y"),zt(v,"v"),zt(b,"b"),zt(x,"C");const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(T)?t.replace(T,t=>x(t)):t}zt(w,"w");var k=r(975);const C=k.posix||k,E="/";var S,_;(_=S||(S={})).joinPath=function(t,...e){return t.with({path:C.join(t.path,...e)})},_.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==E&&(r=E+r,n=!0);let i=C.resolve(r,...e);return n&&i[0]===E&&!t.authority&&(i=i.substring(1)),t.with({path:i})},_.dirname=function(t){if(0===t.path.length||t.path===E)return t;let e=C.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},_.basename=function(t){return C.basename(t.path)},_.extname=function(t){return C.extname(t.path)},hA=n})();var vA,{URI:bA,Utils:xA}=hA;!function(t){t.basename=xA.basename,t.dirname=xA.dirname,t.extname=xA.extname,t.joinPath=xA.joinPath,t.resolvePath=xA.resolvePath;const e="object"==typeof process&&"win32"===process?.platform;function r(t,e){return t?.toString()===e?.toString()}function n(t,r){const n="string"==typeof t?bA.parse(t).path:t.path,i="string"==typeof r?bA.parse(r).path:r.path,a=n.split("/").filter(t=>t.length>0),o=i.split("/").filter(t=>t.length>0);if(e){const t=/^[A-Z]:$/;if(a[0]&&t.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&t.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s<a.length&&a[s]===o[s];s++);return"../".repeat(a.length-s)+o.slice(s).join("/")}function i(t){return bA.parse(t.toString()).toString()}function a(t,e){let r="string"==typeof t?t:t.path,n="string"==typeof e?e:e.path;return"/"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),n===r||!(n.length<r.length)&&("/"===n.charAt(r.length)&&n.startsWith(r))}zt(r,"equals"),t.equals=r,zt(n,"relative"),t.relative=n,zt(i,"normalize"),t.normalize=i,zt(a,"contains"),t.contains=a}(vA||(vA={}));var TA,wA,kA=class{static{zt(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(t){return vA.normalize(t)}clear(){this.root.children.clear()}insert(t,e){this.getNode(this.normalizeUri(t),!0).element=e}delete(t){const e=this.getNode(this.normalizeUri(t),!1);e?.parent&&e.parent.children.delete(e.name)}has(t){return void 0!==this.getNode(this.normalizeUri(t),!1)?.element}hasNode(t){return void 0!==this.getNode(this.normalizeUri(t),!1)}find(t){return this.getNode(this.normalizeUri(t),!1)?.element}findNode(t){const e=this.normalizeUri(t),r=this.getNode(e,!1);if(r)return{name:r.name,uri:vA.joinPath(bA.parse(e),r.name).toString(),element:r.element}}findChildren(t){const e=this.normalizeUri(t),r=this.getNode(e,!1);return r?Array.from(r.children.values()).map(t=>({name:t.name,uri:vA.joinPath(bA.parse(e),t.name).toString(),element:t.element})):[]}all(){return this.collectValues(this.root)}findAll(t){const e=this.getNode(vA.normalize(t),!1);return e?this.collectValues(e):[]}getNode(t,e){const r=t.split("/");"/"===t.charAt(t.length-1)&&r.pop();let n=this.root;for(const i of r){let t=n.children.get(i);if(!t){if(!e)return;t={name:i,children:new Map,parent:n},n.children.set(i,t)}n=t}return n}collectValues(t){const e=[];t.element&&e.push(t.element);for(const r of t.children.values())e.push(...this.collectValues(r));return e}};(wA=TA||(TA={}))[wA.Changed=0]="Changed",wA[wA.Parsed=1]="Parsed",wA[wA.IndexedContent=2]="IndexedContent",wA[wA.ComputedScopes=3]="ComputedScopes",wA[wA.Linked=4]="Linked",wA[wA.IndexedReferences=5]="IndexedReferences",wA[wA.Validated=6]="Validated";var CA=class{static{zt(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=tA.CancellationToken.None){const r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??bA.parse(t.uri),tA.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromString(t,e,r){return tA.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,r){if("string"==typeof e){const n=this.parse(t,e,r);return this.createLangiumDocument(n,t,void 0,e)}if("$model"in e){const r={value:e.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(r,t)}{const n=this.parse(t,e.getText(),r);return this.createLangiumDocument(n,t,e)}}async createAsync(t,e,r){if("string"==typeof e){const n=await this.parseAsync(t,e,r);return this.createLangiumDocument(n,t,void 0,e)}{const n=await this.parseAsync(t,e.getText(),r);return this.createLangiumDocument(n,t,e)}}createLangiumDocument(t,e,r,n){let i;if(r)i={parseResult:t,uri:e,state:TA.Parsed,references:[],textDocument:r};else{const r=this.createTextDocumentGetter(e,n);i={parseResult:t,uri:e,state:TA.Parsed,references:[],get textDocument(){return r()}}}return t.value.$document=i,i}async update(t,e){const r=t.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(t.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(t.uri);if(n)Object.defineProperty(t,"textDocument",{value:n});else{const e=this.createTextDocumentGetter(t.uri,i);Object.defineProperty(t,"textDocument",{get:e})}return r!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=TA.Parsed,t}parse(t,e,r){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,r)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){const r=this.serviceRegistry;let n;return()=>n??(n=cA.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??""))}},EA=class{static{zt(this,"DefaultLangiumDocuments")}constructor(t){this.documentTrie=new kA,this.services=t,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.documentBuilder=()=>t.workspace.DocumentBuilder}get all(){return nr(this.documentTrie.all())}addDocument(t){const e=t.uri.toString();if(this.documentTrie.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentTrie.insert(e,t)}getDocument(t){const e=t.toString();return this.documentTrie.find(e)}getDocuments(t){const e=t.toString();return this.documentTrie.findAll(e)}async getOrCreateDocument(t,e){let r=this.getDocument(t);return r||(r=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(r),r)}createDocument(t,e,r){if(r)return this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t));{const r=this.langiumDocumentFactory.fromString(e,t);return this.addDocument(r),r}}hasDocument(t){return this.documentTrie.has(t.toString())}invalidateDocument(t){const e=t.toString(),r=this.documentTrie.find(e);return r&&this.documentBuilder().resetToState(r,TA.Changed),r}deleteDocument(t){const e=t.toString(),r=this.documentTrie.find(e);return r&&(r.state=TA.Changed,this.documentTrie.delete(e)),r}deleteDocuments(t){const e=t.toString(),r=this.documentTrie.findAll(e);for(const n of r)n.state=TA.Changed;return this.documentTrie.delete(e),r}},SA=Symbol("RefResolving"),_A=class{static{zt(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async link(t,e=tA.CancellationToken.None){if(this.profiler?.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const n of gr(t.parseResult.value))await lA(e),yr(n).forEach(e=>{const i=`${n.$type}:${e.property}`;r.startSubTask(i);try{this.doLink(e,t)}finally{r.stopSubTask(i)}})}finally{r.stop()}}else for(const r of gr(t.parseResult.value))await lA(e),yr(r).forEach(e=>this.doLink(e,t))}doLink(t,e){const r=t.reference;if("_ref"in r&&void 0===r._ref){r._ref=SA;try{const e=this.getCandidate(t);if(Ye(e))r._ref=e;else{r._nodeDescription=e;const n=this.loadAstNode(e);r._ref=n??this.createLinkingError(t,e)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);const e=n.message??String(n);r._ref={info:t,message:`An error occurred while resolving reference to '${r.$refText}': ${e}`}}e.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=SA;try{const e=this.getCandidates(t),n=[];if(Ye(e))r._linkingError=e;else for(const t of e){const e=this.loadAstNode(t);e&&n.push({ref:e,$nodeDescription:t})}r._items=n}catch(n){r._linkingError={info:t,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}e.references.push(r)}}unlink(t){for(const e of t.references)"_ref"in e?(e._ref=void 0,delete e._nodeDescription):"_items"in e&&(e._items=void 0,delete e._linkingError);t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}getCandidates(t){const e=this.scopeProvider.getScope(t).getElements(t.reference.$refText).distinct(t=>`${t.documentUri}#${t.path}`).toArray();return e.length>0?e:this.createLinkingError(t)}buildReference(t,e,r,n){const i=this,a={$refNode:r,$refText:n,_ref:void 0,get ref(){if(qe(this._ref))return this._ref;if(Ge(this._nodeDescription)){const r=i.loadAstNode(this._nodeDescription);this._ref=r??i.createLinkingError({reference:a,container:t,property:e},this._nodeDescription)}else if(void 0===this._ref){this._ref=SA;const r=ur(t).$document,n=i.getLinkedNode({reference:a,container:t,property:e});if(n.error&&r&&r.state<TA.ComputedScopes)return this._ref=void 0;this._ref=n.node??n.error,this._nodeDescription=n.descr,r?.references.push(this)}else this._ref===SA&&i.throwCyclicReferenceError(t,e,n);return qe(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Ye(this._ref)?this._ref:void 0}};return a}buildMultiReference(t,e,r,n){const i=this,a={$refNode:r,$refText:n,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=SA;const r=ur(t).$document,n=i.getCandidates({reference:a,container:t,property:e}),o=[];if(Ye(n))this._linkingError=n;else for(const t of n){const e=i.loadAstNode(t);e&&o.push({ref:e,$nodeDescription:t})}this._items=o,r?.references.push(this)}else this._items===SA&&i.throwCyclicReferenceError(t,e,n);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;return this.items.length>0?void 0:this._linkingError=i.createLinkingError({reference:a,container:t,property:e})}};return a}throwCyclicReferenceError(t,e,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(t)}/${e} (symbol '${r}')`)}getLinkedNode(t){try{const e=this.getCandidate(t);if(Ye(e))return{error:e};const r=this.loadAstNode(e);return r?{node:r,descr:e}:{descr:e,error:this.createLinkingError(t,e)}}catch(e){console.error(`An error occurred while resolving reference to '${t.reference.$refText}':`,e);const r=e.message??String(e);return{error:{info:t,message:`An error occurred while resolving reference to '${t.reference.$refText}': ${r}`}}}}loadAstNode(t){if(t.node)return t.node;const e=this.langiumDocuments().getDocument(t.documentUri);return e?this.astNodeLocator.getAstNode(e.parseResult.value,t.path):void 0}createLinkingError(t,e){const r=ur(t.container).$document;r&&r.state<TA.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);return{info:t,message:`Could not resolve reference to ${this.reflection.getReferenceType(t)} named '${t.reference.$refText}'.`,targetDescription:e}}};function AA(t){return"string"==typeof t.name}zt(AA,"isNamed");var RA=class{static{zt(this,"DefaultNameProvider")}getName(t){if(AA(t))return t.name}getNameNode(t){return _a(t.$cstNode,"name")}},LA=class{static{zt(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator,this.documents=t.shared.workspace.LangiumDocuments,this.hasMultiReference=gr(t.Grammar).some(t=>Xr(t)&&t.isMulti)}findDeclarations(t){if(t){const e=Da(t),r=t.astNode;if(e&&r){const n=r[e.feature];if(We(n)||Ue(n))return dr(n);if(Array.isArray(n))for(const e of n)if((We(e)||Ue(e))&&e.$refNode&&e.$refNode.offset<=t.offset&&e.$refNode.end>=t.end)return dr(e)}if(r){const e=this.nameProvider.getNameNode(r);if(e&&(e===t||Ei(t,e)))return this.getSelfNodes(r)}}return[]}getSelfNodes(t){if(this.hasMultiReference){const e=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t)),r=this.getNodeFromReferenceDescription(e.head());if(r)for(const n of yr(r))if(Ue(n.reference)&&n.reference.items.some(e=>e.ref===t))return n.reference.items.map(t=>t.ref);return[t]}return[t]}getNodeFromReferenceDescription(t){if(!t)return;const e=this.documents.getDocument(t.sourceUri);return e?this.nodeLocator.getAstNode(e.parseResult.value,t.sourcePath):void 0}findDeclarationNodes(t){const e=this.findDeclarations(t),r=[];for(const n of e){const t=this.nameProvider.getNameNode(n)??n.$cstNode;t&&r.push(t)}return r}findReferences(t,e){const r=[];e.includeDeclaration&&r.push(...this.getSelfReferences(t));let n=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(n=n.filter(t=>vA.equals(t.sourceUri,e.documentUri))),r.push(...n),nr(r)}getSelfReferences(t){const e=this.getSelfNodes(t),r=[];for(const n of e){const t=this.nameProvider.getNameNode(n);if(t){const e=hr(n),i=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:e.uri,sourcePath:i,targetUri:e.uri,targetPath:i,segment:_i(t),local:!0})}}return r}},IA=class{static{zt(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(const[e,r]of t)this.add(e,r)}get size(){return ir.sum(nr(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){if(void 0===e)return this.map.delete(t);{const r=this.map.get(t);if(r){const n=r.indexOf(e);if(n>=0)return 1===r.length?this.map.delete(t):r.splice(n,1),!0}return!1}}get(t){return this.map.get(t)??[]}getStream(t){const e=this.map.get(t);return e?nr(e):er}has(t,e){if(void 0===e)return this.map.has(t);{const r=this.map.get(t);return!!r&&r.indexOf(e)>=0}}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(t){this.map.forEach((e,r)=>e.forEach(e=>t(e,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return nr(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return nr(this.map.keys())}values(){return nr(this.map.values()).flat()}entriesGroupedByKey(){return nr(this.map.entries())}},DA=class{static{zt(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(const[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){const e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}},NA=class{static{zt(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(t,e=tA.CancellationToken.None){return this.collectExportedSymbolsForNode(t.parseResult.value,t,void 0,e)}async collectExportedSymbolsForNode(t,e,r=pr,n=tA.CancellationToken.None){const i=[];this.addExportedSymbol(t,i,e);for(const a of r(t))await lA(n),this.addExportedSymbol(a,i,e);return i}addExportedSymbol(t,e,r){const n=this.nameProvider.getName(t);n&&e.push(this.descriptions.createDescription(t,n,r))}async collectLocalSymbols(t,e=tA.CancellationToken.None){const r=t.parseResult.value,n=new IA;for(const i of fr(r))await lA(e),this.addLocalSymbol(i,t,n);return n}addLocalSymbol(t,e,r){const n=t.$container;if(n){const i=this.nameProvider.getName(t);i&&r.add(n,this.descriptions.createDescription(t,i,e))}}},MA=class{static{zt(this,"StreamScope")}constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e):this.elements.find(e=>e.name===t);return r||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.caseInsensitive?this.elements.filter(t=>t.name.toLowerCase()===e):this.elements.filter(e=>e.name===t);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(t)):r}},OA=class{static{zt(this,"MapScope")}constructor(t,e,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of t){const t=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(t,n)}this.outerScope=e}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.elements.get(e);return r||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.elements.get(e),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?nr(n).concat(this.outerScope.getElements(t)):nr(n)}getAllElements(){let t=nr(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}},$A=class{static{zt(this,"MultiMapScope")}constructor(t,e,r){this.elements=new IA,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of t){const t=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(t,n)}this.outerScope=e}getElement(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.elements.get(e)[0];return r||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){const e=this.caseInsensitive?t.toLowerCase():t,r=this.elements.get(e);return(this.concatOuterScope||0===r.length)&&this.outerScope?nr(r).concat(this.outerScope.getElements(t)):nr(r)}getAllElements(){let t=nr(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}},PA={getElement(){},getElements:()=>er,getAllElements:()=>er},BA=class{static{zt(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},FA=class extends BA{static{zt(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){if(this.throwIfDisposed(),this.cache.has(t))return this.cache.get(t);if(e){const r=e();return this.cache.set(t,r),r}}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},zA=class extends BA{static{zt(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){this.throwIfDisposed();const n=this.cacheForContext(t);if(n.has(e))return n.get(e);if(r){const t=r();return n.set(e,t),t}}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){if(this.throwIfDisposed(),t){const e=this.converter(t);this.cache.delete(e)}else this.cache.clear()}cacheForContext(t){const e=this.converter(t);let r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}},KA=class extends zA{static{zt(this,"DocumentCache")}constructor(t,e){super(t=>t.toString()),e?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(e,t=>{this.clear(t.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{for(const r of e)this.clear(r)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{const r=t.concat(e);for(const n of r)this.clear(n)}))}},jA=class extends FA{static{zt(this,"WorkspaceCache")}constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{e.length>0&&this.clear()}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},qA=class{static{zt(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new jA(t.shared)}getScope(t){const e=[],r=this.reflection.getReferenceType(t),n=hr(t.container).localSymbols;if(n){let i=t.container;do{n.has(i)&&e.push(n.getStream(i).filter(t=>this.reflection.isSubtype(t.type,r))),i=i.$container}while(i)}let i=this.getGlobalScope(r,t);for(let a=e.length-1;a>=0;a--)i=this.createScope(e[a],i);return i}createScope(t,e,r){return new MA(nr(t),e,r)}createScopeForNodes(t,e,r){const n=nr(t).map(t=>{const e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable();return new MA(n,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new $A(this.indexManager.allElements(t)))}};function WA(t){return"string"==typeof t.$comment}function UA(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}zt(WA,"isAstNodeWithComment"),zt(UA,"isIntermediateReference");var GA,YA,VA=class{static{zt(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){const r=e??{},n=e?.replacer,i=zt((t,e)=>this.replacer(t,e,r),"defaultReplacer"),a=n?(t,e)=>n(t,e,i):i;try{return this.currentDocument=hr(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){const r=e??{},n=JSON.parse(t);return this.linkNode(n,n,r),n}replacer(t,e,{refText:r,sourceText:n,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(t)){if(We(e)){const t=e.ref,n=r?e.$refText:void 0;if(t){const e=hr(t);let r="";this.currentDocument&&this.currentDocument!==e&&(r=o?o(e.uri,t):e.uri.toString());return{$ref:`${r}#${this.astNodeLocator.getAstNodePath(t)}`,$refText:n}}return{$error:e.error?.message??"Could not resolve reference",$refText:n}}if(Ue(e)){const t=r?e.$refText:void 0,n=[];for(const r of e.items){const t=r.ref,e=hr(r.ref);let i="";this.currentDocument&&this.currentDocument!==e&&(i=o?o(e.uri,t):e.uri.toString());const a=this.astNodeLocator.getAstNodePath(t);n.push(`${i}#${a}`)}return{$refs:n,$refText:t}}if(qe(e)){let r;if(i&&(r=this.addAstNodeRegionWithAssignmentsTo({...e}),t&&!e.$document||!r?.$textRegion||(r.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!t&&(r??(r={...e}),r.$sourceText=e.$cstNode?.text),a){r??(r={...e});const t=this.commentProvider.getComment(e);t&&(r.$comment=t.replace(/\r/g,""))}return r??e}return e}}addAstNodeRegionWithAssignmentsTo(t){const e=zt(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(t.$cstNode){const r=(t.$textRegion=e(t.$cstNode)).assignments={};return Object.keys(t).filter(t=>!t.startsWith("$")).forEach(n=>{const i=Sa(t.$cstNode,n).map(e);0!==i.length&&(r[n]=i)}),t}}linkNode(t,e,r,n,i,a){for(const[s,l]of Object.entries(t))if(Array.isArray(l))for(let n=0;n<l.length;n++){const i=l[n];UA(i)?l[n]=this.reviveReference(t,s,e,i,r):qe(i)&&this.linkNode(i,e,r,t,s,n)}else UA(l)?t[s]=this.reviveReference(t,s,e,l,r):qe(l)&&this.linkNode(l,e,r,t,s);const o=t;o.$container=n,o.$containerProperty=i,o.$containerIndex=a}reviveReference(t,e,r,n,i){let a,o=n.$refText,s=n.$error;if(n.$ref){const t=this.getRefNode(r,n.$ref,i.uriConverter);if(qe(t))return o||(o=this.nameProvider.getName(t)),{$refText:o??"",ref:t};s=t}else if(n.$refs){const t=[];for(const e of n.$refs){const n=this.getRefNode(r,e,i.uriConverter);qe(n)&&t.push({ref:n})}if(0!==t.length)return{$refText:o??"",items:t};a={$refText:o??"",items:t},s??(s="Could not resolve multi-reference")}return s?(a??(a={$refText:o??"",ref:void 0}),a.error={info:{container:t,property:e,reference:a},message:s},a):void 0}getRefNode(t,e,r){try{const n=e.indexOf("#");if(0===n){const r=this.astNodeLocator.getAstNode(t,e.substring(1));return r||"Could not resolve path: "+e}if(n<0){const t=r?r(e):bA.parse(e),n=this.langiumDocuments.getDocument(t);return n?n.parseResult.value:"Could not find document for URI: "+e}const i=r?r(e.substring(0,n)):bA.parse(e.substring(0,n)),a=this.langiumDocuments.getDocument(i);if(!a)return"Could not find document for URI: "+e;if(n===e.length-1)return a.parseResult.value;const o=this.astNodeLocator.getAstNode(a.parseResult.value,e.substring(n+1));return o||"Could not resolve URI: "+e}catch(n){return String(n)}}},HA=class{static{zt(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){const e=t.LanguageMetaData;for(const r of e.fileExtensions)this.fileExtensionMap.has(r)&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${e.languageId}'.`),this.fileExtensionMap.set(r,t);if(e.fileNames)for(const r of e.fileNames)this.fileNameMap.has(r)&&console.warn(`The file name ${r} is used by multiple languages. It is now assigned to '${e.languageId}'.`),this.fileNameMap.set(r,t);this.languageIdMap.set(e.languageId,t)}getServices(t){if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const e=this.textDocuments?.get(t)?.languageId;if(void 0!==e){const t=this.languageIdMap.get(e);if(t)return t}const r=vA.extname(t),n=vA.basename(t),i=this.fileNameMap.get(n)??this.fileExtensionMap.get(r);if(!i)throw e?new Error(`The service registry contains no services for the extension '${r}' for language '${e}'.`):new Error(`The service registry contains no services for the extension '${r}'.`);return i}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}};function XA(t){return{code:t}}zt(XA,"diagnosticData"),(YA=GA||(GA={})).defaults=["fast","slow","built-in"],YA.all=YA.defaults;var ZA,QA,JA=class{static{zt(this,"ValidationRegistry")}constructor(t){this.entries=new IA,this.knownCategories=new Set(GA.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,e=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(const[n,i]of Object.entries(t)){const t=i;if(Array.isArray(t))for(const i of t){const t={check:this.wrapValidationException(i,e),category:r};this.addEntry(n,t)}else if("function"==typeof t){const i={check:this.wrapValidationException(t,e),category:r};this.addEntry(n,i)}else Ui()}}wrapValidationException(t,e){return async(r,n,i)=>{await this.handleException(()=>t.call(e,r,n,i),"An error occurred during validation",n,r)}}async handleException(t,e,r,n){try{await t()}catch(i){if(sA(i))throw i;console.error(`${e}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);r("error",`${e}: ${i instanceof Error?i.message:String(i)}`,{node:n})}}addEntry(t,e){if("AstNode"!==t)for(const r of this.reflection.getAllSubTypes(t))this.entries.add(r,e);else this.entries.add("AstNode",e)}getChecks(t,e){let r=nr(this.entries.get(t)).concat(this.entries.get("AstNode"));return e&&(r=r.filter(t=>e.includes(t.category))),r.map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(t,e,r){return async(n,i,a,o)=>{await this.handleException(()=>t.call(r,n,i,a,o),e,i,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(t){return this.knownCategories}},tR=Object.freeze({validateNode:!0,validateChildren:!0}),eR=class{static{zt(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData,this.profiler=t.shared.profilers.LangiumProfiler,this.languageId=t.LanguageMetaData.languageId}async validateDocument(t,e={},r=tA.CancellationToken.None){const n=t.parseResult,i=[];if(await lA(r),!e.categories||e.categories.includes("built-in")){if(this.processLexingErrors(n,i,e),e.stopAfterLexingErrors&&i.some(t=>t.data?.code===ZA.LexingError))return i;if(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>t.data?.code===ZA.ParsingError))return i;if(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>t.data?.code===ZA.LinkingError))return i}try{i.push(...await this.validateAst(n.value,e,r))}catch(a){if(sA(a))throw a;console.error("An error occurred during validation:",a)}return await lA(r),i}processLexingErrors(t,e,r){const n=[...t.lexerErrors,...t.lexerReport?.diagnostics??[]];for(const i of n){const t=i.severity??"error",r={severity:nR(t),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:iR(t),source:this.getSource()};e.push(r)}}processParsingErrors(t,e,r){for(const n of t.parserErrors){let t;if(isNaN(n.token.startOffset)){if("previousToken"in n){const e=n.previousToken;if(isNaN(e.startOffset)){const e={line:0,character:0};t={start:e,end:e}}else{const r={line:e.endLine-1,character:e.endColumn};t={start:r,end:r}}}}else t=Si(n.token);if(t){const r={severity:nR("error"),range:t,message:n.message,data:XA(ZA.ParsingError),source:this.getSource()};e.push(r)}}}processLinkingErrors(t,e,r){for(const n of t.references){const t=n.error;if(t){const r={node:t.info.container,range:n.$refNode?.range,property:t.info.property,index:t.info.index,data:{code:ZA.LinkingError,containerType:t.info.container.$type,property:t.info.property,refText:t.info.reference.$refText}};e.push(this.toDiagnostic("error",t.message,r))}}}async validateAst(t,e,r=tA.CancellationToken.None){const n=[],i=zt((t,e,r)=>{n.push(this.toDiagnostic(t,e,r))},"acceptor");return await this.validateAstBefore(t,e,i,r),await this.validateAstNodes(t,e,i,r),await this.validateAstAfter(t,e,i,r),n}async validateAstBefore(t,e,r,n=tA.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const a of i)await lA(n),await a(t,r,e.categories??[],n)}async validateAstNodes(t,e,r,n=tA.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const a=gr(t).iterator();for(const t of a){i.startSubTask(t.$type);const o=this.validateSingleNodeOptions(t,e);if(o.validateNode)try{const i=this.validationRegistry.getChecks(t.$type,e.categories);for(const e of i)await e(t,r,n)}finally{i.stopSubTask(t.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{const i=gr(t).iterator();for(const t of i){await lA(n);const a=this.validateSingleNodeOptions(t,e);if(a.validateNode){const i=this.validationRegistry.getChecks(t.$type,e.categories);for(const e of i)await e(t,r,n)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(t,e){return tR}async validateAstAfter(t,e,r,n=tA.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const a of i)await lA(n),await a(t,r,e.categories??[],n)}toDiagnostic(t,e,r){return{message:e,range:rR(r),severity:nR(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function rR(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=_a(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=La(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function nR(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function iR(t){switch(t){case"error":return XA(ZA.LexingError);case"warning":return XA(ZA.LexingWarning);case"info":return XA(ZA.LexingInfo);case"hint":return XA(ZA.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}zt(rR,"getDiagnosticRange"),zt(nR,"toDiagnosticSeverity"),zt(iR,"toDiagnosticData"),(QA=ZA||(ZA={})).LexingError="lexing-error",QA.LexingWarning="lexing-warning",QA.LexingInfo="lexing-info",QA.LexingHint="lexing-hint",QA.ParsingError="parsing-error",QA.LinkingError="linking-error";var aR=class{static{zt(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(t,e,r){const n=r??hr(t);e??(e=this.nameProvider.getName(t));const i=this.astNodeLocator.getAstNodePath(t);if(!e)throw new Error(`Node at path ${i} has no name.`);let a;const o=zt(()=>a??(a=_i(this.nameProvider.getNameNode(t)??t.$cstNode)),"nameSegmentGetter");return{node:t,name:e,get nameSegment(){return o()},selectionSegment:_i(t.$cstNode),type:t.$type,documentUri:n.uri,path:i}}},oR=class{static{zt(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=tA.CancellationToken.None){const r=[],n=t.parseResult.value;for(const i of gr(n))await lA(e),yr(i).forEach(t=>{t.reference.error||r.push(...this.createInfoDescriptions(t))});return r}createInfoDescriptions(t){const e=t.reference;if(e.error||!e.$refNode)return[];let r=[];We(e)&&e.$nodeDescription?r=[e.$nodeDescription]:Ue(e)&&(r=e.items.map(t=>t.$nodeDescription).filter(t=>void 0!==t));const n=hr(t.container).uri,i=this.nodeLocator.getAstNodePath(t.container),a=[],o=_i(e.$refNode);for(const s of r)a.push({sourceUri:n,sourcePath:i,targetUri:s.documentUri,targetPath:s.path,segment:o,local:vA.equals(s.documentUri,n)});return a}},sR=class{static{zt(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){if(t.$container){const e=this.getAstNodePath(t.$container),r=this.getPathSegment(t);return e+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(!t)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==e?t+this.indexSeparator+e:t}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{if(!t||0===e.length)return t;const r=e.indexOf(this.indexSeparator);if(r>0){const n=e.substring(0,r),i=parseInt(e.substring(r+1)),a=t[n];return a?.[i]}return t[e]},t)}},lR={};Wt(lR,Ut(Jt(),1));var cR,hR=class{static{zt(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new uA,this.onConfigurationSectionUpdateEmitter=new lR.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=t.capabilities.workspace?.configuration??!1}async initialized(t){if(this.workspaceConfig){if(t.register){const e=this.serviceRegistry.all;t.register({section:e.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})}if(t.fetchConfiguration){const e=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await t.fetchConfiguration(e);e.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}}this._ready.resolve()}updateConfiguration(t){"object"==typeof t.settings&&null!==t.settings&&Object.entries(t.settings).forEach(([t,e])=>{this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){await this.ready;const r=this.toSectionName(t);if(this.settings[r])return this.settings[r][e]}toSectionName(t){return`${t}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},uR=Ut(ze(),1);!function(t){function e(t){return{dispose:zt(async()=>await t(),"dispose")}}zt(e,"create"),t.create=e}(cR||(cR={}));var dR=class{static{zt(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new IA,this.documentPhaseListeners=new IA,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=TA.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.fileSystemProvider=t.workspace.FileSystemProvider,this.workspaceManager=()=>t.workspace.WorkspaceManager,this.serviceRegistry=t.ServiceRegistry}async build(t,e={},r=tA.CancellationToken.None){for(const n of t){const t=n.uri.toString();if(n.state===TA.Validated){if("boolean"==typeof e.validation&&e.validation)this.resetToState(n,TA.IndexedReferences);else if("object"==typeof e.validation){const r=this.findMissingValidationCategories(n,e);r.length>0&&(this.buildState.set(t,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(t)?.result}),n.state=TA.IndexedReferences)}}else this.buildState.delete(t)}this.currentState=TA.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,e,r)}async update(t,e,r=tA.CancellationToken.None){this.currentState=TA.Changed;const n=[];for(const s of e){const t=this.langiumDocuments.deleteDocuments(s);for(const e of t)n.push(e.uri),this.cleanUpDeleted(e)}const i=(await Promise.all(t.map(t=>this.findChangedUris(t)))).flat();for(const s of i){let t=this.langiumDocuments.getDocument(s);void 0===t&&(t=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s),t.state=TA.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,TA.Changed)}const a=nr(i).concat(n).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!a.has(t.uri.toString())&&this.shouldRelink(t,a)).forEach(t=>this.resetToState(t,TA.ComputedScopes)),await this.emitUpdate(i,n),await lA(r);const o=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.state<TA.Validated||!this.buildState.get(t.uri.toString())?.completed||this.resultsAreIncomplete(t,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,r)}resultsAreIncomplete(t,e){return this.findMissingValidationCategories(t,e).length>=1}findMissingValidationCategories(t,e){const r=this.buildState.get(t.uri.toString()),n=this.serviceRegistry.getServices(t.uri).validation.ValidationRegistry.getAllValidationCategories(t),i=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set;return nr(void 0===e||!0===e.validation?n:"object"==typeof e.validation?e.validation.categories??n:[]).filter(t=>!i.has(t)).toArray()}async findChangedUris(t){if(this.langiumDocuments.getDocument(t)??this.textDocuments?.get(t))return[t];try{const e=await this.fileSystemProvider.stat(t);if(e.isDirectory){return await this.workspaceManager().searchFolder(t)}if(this.workspaceManager().shouldIncludeEntry(e))return[t]}catch{}return[]}async emitUpdate(t,e){await Promise.all(this.updateListeners.map(r=>r(t,e)))}sortDocuments(t){let e=0,r=t.length-1;for(;e<r;){for(;e<t.length&&this.hasTextDocument(t[e]);)e++;for(;r>=0&&!this.hasTextDocument(t[r]);)r--;e<r&&([t[e],t[r]]=[t[r],t[e]])}return t}hasTextDocument(t){return Boolean(this.textDocuments?.get(t.uri))}shouldRelink(t,e){return!!t.references.some(t=>void 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(t){return this.updateListeners.push(t),cR.create(()=>{const e=this.updateListeners.indexOf(t);e>=0&&this.updateListeners.splice(e,1)})}resetToState(t,e){switch(e){case TA.Changed:case TA.Parsed:this.indexManager.removeContent(t.uri);case TA.IndexedContent:t.localSymbols=void 0;case TA.ComputedScopes:this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t);case TA.Linked:this.indexManager.removeReferences(t.uri);case TA.IndexedReferences:t.diagnostics=void 0,this.buildState.delete(t.uri.toString());case TA.Validated:}t.state>e&&(t.state=e)}cleanUpDeleted(t){this.buildState.delete(t.uri.toString()),this.indexManager.remove(t.uri),t.state=TA.Changed}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,TA.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,TA.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,TA.ComputedScopes,r,async t=>{const e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.localSymbols=await e.collectLocalSymbols(t,r)});const n=t.filter(t=>this.shouldLink(t));await this.runCancelable(n,TA.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(n,TA.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));const i=t.filter(t=>!!this.shouldValidate(t)||(this.markAsCompleted(t),!1));await this.runCancelable(i,TA.Validated,r,async t=>{await this.validate(t,r),this.markAsCompleted(t)})}markAsCompleted(t){const e=this.buildState.get(t.uri.toString());e&&(e.completed=!0)}prepareBuild(t,e){for(const r of t){const t=r.uri.toString(),n=this.buildState.get(t);n&&!n.completed||this.buildState.set(t,{completed:!1,options:e,result:n?.result})}}async runCancelable(t,e,r,n){for(const a of t)a.state<e&&(await lA(r),await n(a),a.state=e,await this.notifyDocumentPhase(a,e,r));const i=t.filter(t=>t.state===e);await this.notifyBuildPhase(i,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),cR.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),cR.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(t,e,r){let n;return e&&"path"in e?n=e:r=e,r??(r=tA.CancellationToken.None),n?this.awaitDocumentState(t,n,r):this.awaitBuilderState(t,r)}awaitDocumentState(t,e,r){const n=this.langiumDocuments.getDocument(e);return n?n.state>=t?Promise.resolve(e):r.isCancellationRequested?Promise.reject(oA):this.currentState>=t&&t>n.state?Promise.reject(new uR.ResponseError(uR.LSPErrorCodes.RequestFailed,`Document state of ${e.toString()} is ${TA[n.state]}, requiring ${TA[t]}, but workspace state is already ${TA[this.currentState]}. Returning undefined.`)):new Promise((n,i)=>{const a=this.onDocumentPhase(t,t=>{vA.equals(t.uri,e)&&(a.dispose(),o.dispose(),n(t.uri))}),o=r.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(oA)})}):Promise.reject(new uR.ResponseError(uR.LSPErrorCodes.ServerCancelled,`No document found for URI: ${e.toString()}`))}awaitBuilderState(t,e){return this.currentState>=t?Promise.resolve():e.isCancellationRequested?Promise.reject(oA):new Promise((r,n)=>{const i=this.onBuildPhase(t,()=>{i.dispose(),a.dispose(),r()}),a=e.onCancellationRequested(()=>{i.dispose(),a.dispose(),n(oA)})})}async notifyDocumentPhase(t,e,r){const n=this.documentPhaseListeners.get(e).slice();for(const a of n)try{await lA(r),await a(t,r)}catch(i){if(!sA(i))throw i}}async notifyBuildPhase(t,e,r){if(0===t.length)return;const n=this.buildPhaseListeners.get(e).slice();for(const i of n)await lA(r),await i(t,r)}shouldLink(t){return this.getBuildOptions(t).eagerLinking??!0}shouldValidate(t){return Boolean(this.getBuildOptions(t).validation)}async validate(t,e){const r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t),i="object"==typeof n.validation?{...n.validation}:{};i.categories=this.findMissingValidationCategories(t,n);const a=await r.validateDocument(t,i,e);t.diagnostics?t.diagnostics.push(...a):t.diagnostics=a;const o=this.buildState.get(t.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=nr(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(t){return this.buildState.get(t.uri.toString())?.options??{}}},pR=class{static{zt(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new zA,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){const r=hr(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{vA.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),nr(n)}allElements(t,e){let r=nr(this.symbolIndex.keys());return e&&(r=r.filter(t=>!e||e.has(t))),r.map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(t,e){if(!e)return this.symbolIndex.get(t)??[];return this.symbolByTypeIndex.get(t,e,()=>(this.symbolIndex.get(t)??[]).filter(t=>this.astReflection.isSubtype(t.type,e)))}remove(t){this.removeContent(t),this.removeReferences(t)}removeContent(t){const e=t.toString();this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e)}removeReferences(t){const e=t.toString();this.referenceIndex.delete(e)}async updateContent(t,e=tA.CancellationToken.None){const r=this.serviceRegistry.getServices(t.uri),n=await r.references.ScopeComputation.collectExportedSymbols(t,e),i=t.uri.toString();this.symbolIndex.set(i,n),this.symbolByTypeIndex.clear(i)}async updateReferences(t,e=tA.CancellationToken.None){const r=this.serviceRegistry.getServices(t.uri),n=await r.workspace.ReferenceDescriptionProvider.createDescriptions(t,e);this.referenceIndex.set(t.uri.toString(),n)}isAffected(t,e){const r=this.referenceIndex.get(t.uri.toString());return!!r&&r.some(t=>!t.local&&e.has(t.targetUri.toString()))}},fR=class{static{zt(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new uA,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=t.workspaceFolders??void 0}initialized(t){return this.mutex.write(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(t,e=tA.CancellationToken.None){const r=await this.performStartup(t);await lA(e),await this.documentBuilder.build(r,this.initialBuildOptions,e)}async performStartup(t){const e=[],r=zt(t=>{e.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");await this.loadAdditionalDocuments(t,r);const n=[];await Promise.all(t.map(t=>this.getRootFolder(t)).map(async t=>this.traverseFolder(t,n)));const i=nr(n).distinct(t=>t.toString()).filter(t=>!this.langiumDocuments.hasDocument(t));return await this.loadWorkspaceDocuments(i,r),this._ready.resolve(),e}async loadWorkspaceDocuments(t,e){await Promise.all(t.map(async t=>{const r=await this.langiumDocuments.getOrCreateDocument(t);e(r)}))}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return bA.parse(t.uri)}async traverseFolder(t,e){try{const r=await this.fileSystemProvider.readDirectory(t);await Promise.all(r.map(async t=>{this.shouldIncludeEntry(t)&&(t.isDirectory?await this.traverseFolder(t.uri,e):t.isFile&&e.push(t.uri))}))}catch(r){console.error("Failure to read directory content of "+t.toString(!0),r)}}async searchFolder(t){const e=[];return await this.traverseFolder(t,e),e}shouldIncludeEntry(t){const e=vA.basename(t.uri);return!e.startsWith(".")&&(t.isDirectory?"node_modules"!==e&&"out"!==e:!!t.isFile&&this.serviceRegistry.hasServices(t.uri))}},gR=class{static{zt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,e,r,n,i){return Sy.buildUnexpectedCharactersMessage(t,e,r,n,i)}buildUnableToPopLexerModeMessage(t){return Sy.buildUnableToPopLexerModeMessage(t)}},mR={mode:"full"},yR=class{static{zt(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;const e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(e);const r=xR(e)?Object.values(e):e,n="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new Ay(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=mR){const r=this.chevrotainLexer.tokenize(t);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(t)}}toTokenTypeDictionary(t){if(xR(t))return t;const e=bR(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}};function vR(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function bR(t){return t&&"modes"in t&&"defaultMode"in t}function xR(t){return!vR(t)&&!bR(t)}function TR(t,e,r){let n,i;"string"==typeof t?(i=e,n=r):(i=t.range.start,n=e),i||(i=s.create(0,0));return DR({index:0,tokens:SR({lines:kR(t),position:i,options:FR(n)}),position:i})}function wR(t,e){const r=FR(e),n=kR(t);if(0===n.length)return!1;const i=n[0],a=n[n.length-1],o=r.start,s=r.end;return Boolean(o?.exec(i))&&Boolean(s?.exec(a))}function kR(t){let e="";e="string"==typeof t?t:t.text;return e.split(la)}zt(vR,"isTokenTypeArray"),zt(bR,"isIMultiModeLexerDefinition"),zt(xR,"isTokenTypeDictionary"),Xt(),zt(TR,"parseJSDoc"),zt(wR,"isJSDoc"),zt(kR,"getLines");var CR=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,ER=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function SR(t){const e=[];let r=t.position.line,n=t.position.character;for(let i=0;i<t.lines.length;i++){const a=0===i,o=i===t.lines.length-1;let c=t.lines[i],h=0;if(a&&t.options.start){const e=t.options.start?.exec(c);e&&(h=e.index+e[0].length)}else{const e=t.options.line?.exec(c);e&&(h=e.index+e[0].length)}if(o){const e=t.options.end?.exec(c);e&&(c=c.substring(0,e.index))}c=c.substring(0,IR(c));if(LR(c,h)>=c.length){if(e.length>0){const t=s.create(r,n);e.push({type:"break",content:"",range:l.create(t,t)})}}else{CR.lastIndex=h;const t=CR.exec(c);if(t){const i=t[0],a=t[1],o=s.create(r,n+h),u=s.create(r,n+h+i.length);e.push({type:"tag",content:a,range:l.create(o,u)}),h+=i.length,h=LR(c,h)}if(h<c.length){const t=c.substring(h),i=Array.from(t.matchAll(ER));e.push(..._R(i,t,r,n+h))}}r++,n=0}return e.length>0&&"break"===e[e.length-1].type?e.slice(0,-1):e}function _R(t,e,r,n){const i=[];if(0===t.length){const t=s.create(r,n),a=s.create(r,n+e.length);i.push({type:"text",content:e,range:l.create(t,a)})}else{let a=0;for(const c of t){const t=c.index,o=e.substring(a,t);o.length>0&&i.push({type:"text",content:e.substring(a,t),range:l.create(s.create(r,a+n),s.create(r,t+n))});let h=o.length+1;const u=c[1];if(i.push({type:"inline-tag",content:u,range:l.create(s.create(r,a+h+n),s.create(r,a+h+u.length+n))}),h+=u.length,4===c.length){h+=c[2].length;const t=c[3];i.push({type:"text",content:t,range:l.create(s.create(r,a+h+n),s.create(r,a+h+t.length+n))})}else i.push({type:"text",content:"",range:l.create(s.create(r,a+h+n),s.create(r,a+h+n))});a=t+c[0].length}const o=e.substring(a);o.length>0&&i.push({type:"text",content:o,range:l.create(s.create(r,a+n),s.create(r,a+n+o.length))})}return i}zt(SR,"tokenize"),zt(_R,"buildInlineTokens");var AR=/\S/,RR=/\s*$/;function LR(t,e){const r=t.substring(e).match(AR);return r?e+r.index:t.length}function IR(t){const e=t.match(RR);if(e&&"number"==typeof e.index)return e.index}function DR(t){const e=s.create(t.position.line,t.position.character);if(0===t.tokens.length)return new KR([],l.create(e,e));const r=[];for(;t.index<t.tokens.length;){const e=NR(t,r[r.length-1]);e&&r.push(e)}const n=r[0]?.range.start??e,i=r[r.length-1]?.range.end??e;return new KR(r,l.create(n,i))}function NR(t,e){const r=t.tokens[t.index];return"tag"===r.type?PR(t,!1):"text"===r.type||"inline-tag"===r.type?OR(t):(MR(r,e),void t.index++)}function MR(t,e){if(e){const r=new GR("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}function OR(t){let e=t.tokens[t.index];const r=e;let n=e;const i=[];for(;e&&"break"!==e.type&&"tag"!==e.type;)i.push($R(t)),n=e,e=t.tokens[t.index];return new UR(i,l.create(r.range.start,n.range.end))}function $R(t){return"inline-tag"===t.tokens[t.index].type?PR(t,!0):BR(t)}function PR(t,e){const r=t.tokens[t.index++],n=r.content.substring(1),i=t.tokens[t.index];if("text"===i?.type){if(e){const i=BR(t);return new jR(n,new UR([i],i.range),e,l.create(r.range.start,i.range.end))}{const i=OR(t);return new jR(n,i,e,l.create(r.range.start,i.range.end))}}{const t=r.range;return new jR(n,new UR([],t),e,t)}}function BR(t){const e=t.tokens[t.index++];return new GR(e.content,e.range)}function FR(t){if(!t)return FR({start:"/**",end:"*/",line:"*"});const{start:e,end:r,line:n}=t;return{start:zR(e,!0),end:zR(r,!1),line:zR(n,!0)}}function zR(t,e){if("string"==typeof t||"object"==typeof t){const r="string"==typeof t?ma(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}return t}zt(LR,"skipWhitespace"),zt(IR,"lastCharacter"),zt(DR,"parseJSDocComment"),zt(NR,"parseJSDocElement"),zt(MR,"appendEmptyLine"),zt(OR,"parseJSDocText"),zt($R,"parseJSDocInline"),zt(PR,"parseJSDocTag"),zt(BR,"parseJSDocLine"),zt(FR,"normalizeOptions"),zt(zR,"normalizeOption");var KR=class{static{zt(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(const e of this.elements)if(0===t.length)t=e.toString();else{const r=e.toString();t+=YR(t)+r}return t.trim()}toMarkdown(t){let e="";for(const r of this.elements)if(0===e.length)e=r.toMarkdown(t);else{const n=r.toMarkdown(t);e+=YR(e)+n}return e.trim()}},jR=class{static{zt(this,"JSDocTagImpl")}constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t=`@${this.name}`;const e=this.content.toString();return 1===this.content.inlines.length?t=`${t} ${e}`:this.content.inlines.length>1&&(t=`${t}\n${e}`),this.inline?`{${t}}`:t}toMarkdown(t){return t?.renderTag?.(this)??this.toMarkdownDefault(t)}toMarkdownDefault(t){const e=this.content.toMarkdown(t);if(this.inline){const r=qR(this.name,e,t??{});if("string"==typeof r)return r}let r="";"italic"===t?.tag||void 0===t?.tag?r="*":"bold"===t?.tag?r="**":"bold-italic"===t?.tag&&(r="***");let n=`${r}@${this.name}${r}`;return 1===this.content.inlines.length?n=`${n} — ${e}`:this.content.inlines.length>1&&(n=`${n}\n${e}`),this.inline?`{${n}}`:n}};function qR(t,e,r){if("linkplain"===t||"linkcode"===t||"link"===t){const n=e.indexOf(" ");let i=e;if(n>0){const t=LR(e,n);i=e.substring(t),e=e.substring(0,n)}("linkcode"===t||"link"===t&&"code"===r.link)&&(i=`\`${i}\``);return r.renderLink?.(e,i)??WR(e,i)}}function WR(t,e){try{return bA.parse(t,!0),`[${e}](${t})`}catch{return t}}zt(qR,"renderInlineTag"),zt(WR,"renderLinkDefault");var UR=class{static{zt(this,"JSDocTextImpl")}constructor(t,e){this.inlines=t,this.range=e}toString(){let t="";for(let e=0;e<this.inlines.length;e++){const r=this.inlines[e],n=this.inlines[e+1];t+=r.toString(),n&&n.range.start.line>r.range.start.line&&(t+="\n")}return t}toMarkdown(t){let e="";for(let r=0;r<this.inlines.length;r++){const n=this.inlines[r],i=this.inlines[r+1];e+=n.toMarkdown(t),i&&i.range.start.line>n.range.start.line&&(e+="\n")}return e}},GR=class{static{zt(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}};function YR(t){return t.endsWith("\n")?"\n":"\n\n"}zt(YR,"fillNewlines");var VR,HR=class{static{zt(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(t){const e=this.commentProvider.getComment(t);if(e&&wR(e)){return TR(e).toMarkdown({renderLink:zt((e,r)=>this.documentationLinkRenderer(t,e,r),"renderLink"),renderTag:zt(e=>this.documentationTagRenderer(t,e),"renderTag")})}}documentationLinkRenderer(t,e,r){const n=this.findNameInLocalSymbols(t,e)??this.findNameInGlobalScope(t,e);if(n&&n.nameSegment){const t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1;return`[${r}](${n.documentUri.with({fragment:`L${t},${e}`}).toString()})`}}documentationTagRenderer(t,e){}findNameInLocalSymbols(t,e){const r=hr(t).localSymbols;if(!r)return;let n=t;do{const t=r.getStream(n).find(t=>t.name===e);if(t)return t;n=n.$container}while(n)}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}},XR=class{static{zt(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return WA(t)?t.$comment:Di(t.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},ZR=class{static{zt(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}},QR=class{static{zt(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){const t=this.createWorker();t.onReady(()=>{if(this.queue.length>0){const e=this.queue.shift();e&&(t.lock(),e.resolve(t))}}),this.workerPool.push(t)}}async parse(t,e){const r=await this.acquireParserWorker(e),n=new uA;let i;const a=e.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{const e=this.hydrator.hydrate(t);n.resolve(e)}).catch(t=>{n.reject(t)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(t){t.terminate();const e=this.workerPool.indexOf(t);e>=0&&this.workerPool.splice(e,1)}async acquireParserWorker(t){this.initializeWorkers();for(const r of this.workerPool)if(r.ready)return r.lock(),r;const e=new uA;return t.onCancellationRequested(()=>{const t=this.queue.indexOf(e);t>=0&&this.queue.splice(t,1),e.reject(oA)}),this.queue.push(e),e.promise}},JR=class{static{zt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new lR.Emitter,this.deferred=new uA,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,e(t=>{const e=t;this.deferred.resolve(e),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(oA),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new uA,this.sendMessage(t),this.deferred.promise}},tL=class{static{zt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new tA.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();const e=iA();return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r=tA.CancellationToken.None){const n=new uA,i={action:e,deferred:n,cancellationToken:r};return t.push(i),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;const t=[];if(this.writeQueue.length>0)t.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;t.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(t.map(async({action:t,deferred:e,cancellationToken:r})=>{try{const n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(n){sA(n)?e.resolve(void 0):e.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},eL=class{static{zt(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new DA,this.tokenTypeIdMap=new DA,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>({...t,message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){const e=new Map,r=new Map;for(const n of gr(t))e.set(n,{});if(t.$cstNode)for(const n of ki(t.$cstNode))r.set(n,{});return{astNodes:e,cstNodes:r}}dehydrateAstNode(t,e){const r=e.astNodes.get(t);r.$type=t.$type,r.$containerIndex=t.$containerIndex,r.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(r.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for(const[n,i]of Object.entries(t))if(!n.startsWith("$"))if(Array.isArray(i)){const t=[];r[n]=t;for(const r of i)qe(r)?t.push(this.dehydrateAstNode(r,e)):We(r)?t.push(this.dehydrateReference(r,e)):t.push(r)}else qe(i)?r[n]=this.dehydrateAstNode(i,e):We(i)?r[n]=this.dehydrateReference(i,e):void 0!==i&&(r[n]=i);return r}dehydrateReference(t,e){const r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){const r=e.cstNodes.get(t);return Ze(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),He(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):Xe(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){const e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){const e=new Map,r=new Map;for(const i of gr(t))e.set(i,{});let n;if(t.$cstNode)for(const i of ki(t.$cstNode)){let t;"fullText"in i?(t=new v_(i.fullText),n=t):"content"in i?t=new m_:"tokenType"in i&&(t=this.hydrateCstLeafNode(i)),t&&(r.set(i,t),t.root=n)}return{astNodes:e,cstNodes:r}}hydrateAstNode(t,e){const r=e.astNodes.get(t);r.$type=t.$type,r.$containerIndex=t.$containerIndex,r.$containerProperty=t.$containerProperty,t.$cstNode&&(r.$cstNode=e.cstNodes.get(t.$cstNode));for(const[n,i]of Object.entries(t))if(!n.startsWith("$"))if(Array.isArray(i)){const t=[];r[n]=t;for(const a of i)qe(a)?t.push(this.setParent(this.hydrateAstNode(a,e),r)):We(a)?t.push(this.hydrateReference(a,r,n,e)):t.push(a)}else qe(i)?r[n]=this.setParent(this.hydrateAstNode(i,e),r):We(i)?r[n]=this.hydrateReference(i,r,n,e):void 0!==i&&(r[n]=i);return r}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,n){return this.linker.buildReference(e,r,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){const n=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=e.astNodes.get(t.astNode),He(n))for(const i of t.content){const t=this.hydrateCstNode(i,e,r++);n.content.push(t)}return n}hydrateCstLeafNode(t){const e=this.getTokenType(t.tokenType),r=t.offset,n=t.length,i=t.startLine,a=t.startColumn,o=t.endLine,s=t.endColumn,l=t.hidden;return new g_(r,n,{start:{line:i,character:a},end:{line:o,character:s}},e,l)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(const e of gr(this.grammar))Cr(e)&&this.grammarElementIdMap.set(e,t++)}};function rL(t){return{documentation:{CommentProvider:zt(t=>new XR(t),"CommentProvider"),DocumentationProvider:zt(t=>new HR(t),"DocumentationProvider")},parser:{AsyncParser:zt(t=>new ZR(t),"AsyncParser"),GrammarConfig:zt(t=>io(t),"GrammarConfig"),LangiumParser:zt(t=>H_(t),"LangiumParser"),CompletionParser:zt(t=>V_(t),"CompletionParser"),ValueConverter:zt(()=>new J_,"ValueConverter"),TokenBuilder:zt(()=>new Q_,"TokenBuilder"),Lexer:zt(t=>new yR(t),"Lexer"),ParserErrorMessageProvider:zt(()=>new E_,"ParserErrorMessageProvider"),LexerErrorMessageProvider:zt(()=>new gR,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:zt(()=>new sR,"AstNodeLocator"),AstNodeDescriptionProvider:zt(t=>new aR(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:zt(t=>new oR(t),"ReferenceDescriptionProvider")},references:{Linker:zt(t=>new _A(t),"Linker"),NameProvider:zt(()=>new RA,"NameProvider"),ScopeProvider:zt(t=>new qA(t),"ScopeProvider"),ScopeComputation:zt(t=>new NA(t),"ScopeComputation"),References:zt(t=>new LA(t),"References")},serializer:{Hydrator:zt(t=>new eL(t),"Hydrator"),JsonSerializer:zt(t=>new VA(t),"JsonSerializer")},validation:{DocumentValidator:zt(t=>new eR(t),"DocumentValidator"),ValidationRegistry:zt(t=>new JA(t),"ValidationRegistry")},shared:zt(()=>t.shared,"shared")}}function nL(t){return{ServiceRegistry:zt(t=>new HA(t),"ServiceRegistry"),workspace:{LangiumDocuments:zt(t=>new EA(t),"LangiumDocuments"),LangiumDocumentFactory:zt(t=>new CA(t),"LangiumDocumentFactory"),DocumentBuilder:zt(t=>new dR(t),"DocumentBuilder"),IndexManager:zt(t=>new pR(t),"IndexManager"),WorkspaceManager:zt(t=>new fR(t),"WorkspaceManager"),FileSystemProvider:zt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:zt(()=>new tL,"WorkspaceLock"),ConfigurationProvider:zt(t=>new hR(t),"ConfigurationProvider")},profilers:{}}}function iL(t,e,r,n,i,a,o,s,l){return sL([t,e,r,n,i,a,o,s,l].reduce(hL,{}))}zt(rL,"createDefaultCoreModule"),zt(nL,"createDefaultSharedCoreModule"),(VR||(VR={})).merge=(t,e)=>hL(hL({},t),e),zt(iL,"inject");var aL=Symbol("isProxy");function oL(t){if(t&&t[aL])for(const e of Object.values(t))oL(e);return t}function sL(t,e){const r=new Proxy({},{deleteProperty:zt(()=>!1,"deleteProperty"),set:zt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:zt((n,i)=>i===aL||cL(n,i,t,e||r),"get"),getOwnPropertyDescriptor:zt((n,i)=>(cL(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:zt((e,r)=>r in t,"has"),ownKeys:zt(()=>[...Object.getOwnPropertyNames(t)],"ownKeys")});return r}zt(oL,"eagerLoad"),zt(sL,"_inject");var lL=Symbol();function cL(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===lL)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){const a=r[e];t[e]=lL;try{t[e]="function"==typeof a?a(n):sL(a,n)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}}function hL(t,e){if(e)for(const[r,n]of Object.entries(e))if(null!=n)if("object"==typeof n){const e=t[r];t[r]=hL("object"==typeof e&&null!==e?e:{},n)}else t[r]=n;return t}zt(cL,"_resolve"),zt(hL,"_merge");var uL,dL,pL={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(dL=uL||(uL={})).REGULAR="indentation-sensitive",dL.IGNORE_INDENTATION="ignore-indentation";var fL=class extends Q_{static{zt(this,"IndentationAwareTokenBuilder")}constructor(t=pL){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...pL,...t},this.indentTokenType=Fy({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Fy({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,e){const r=super.buildTokens(t,e);if(!vR(r))throw new Error("Invalid tokens built by default builder");const{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:o}=this.options;let s,l,c;const h=[];for(const u of r){for(const[t,e]of o)u.name===t?u.PUSH_MODE=uL.IGNORE_INDENTATION:u.name===e&&(u.POP_MODE=!0);u.name===i?s=u:u.name===n?l=u:u.name===a?c=u:h.push(u)}if(!s||!l||!c)throw new Error("Some indentation/whitespace tokens not found!");if(o.length>0){return{modes:{[uL.REGULAR]:[s,l,...h,c],[uL.IGNORE_INDENTATION]:[...h,c]},defaultMode:uL.REGULAR}}return[s,l,c,...h]}flushLexingReport(t){return{...super.flushLexingReport(t),remainingDedents:this.flushRemainingDedents(t)}}isStartOfLine(t,e){return 0===e||"\r\n".includes(t[e-1])}matchWhitespace(t,e,r,n){this.whitespaceRegExp.lastIndex=e;const i=this.whitespaceRegExp.exec(t);return{currIndentLevel:i?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(t,e,r,n){const i=this.getLineNumber(e,n);return jy(t,r,n,n+r.length,i,i,1,r.length)}getLineNumber(t,e){return t.substring(0,e).split(/\r\n|\r|\n/).length}indentMatcher(t,e,r,n){if(!this.isStartOfLine(t,e))return null;const{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(t,e,r,n);return i<=a?null:(this.indentationStack.push(i),o)}dedentMatcher(t,e,r,n){if(!this.isStartOfLine(t,e))return null;const{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(t,e,r,n);if(i>=a)return null;const s=this.indentationStack.lastIndexOf(i);if(-1===s)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${e}. Current indentation stack: ${this.indentationStack}`,offset:e,length:o?.[0]?.length??0,line:this.getLineNumber(t,e),column:1}),null;const l=this.indentationStack.length-s-1,c=t.substring(0,e).match(/[\r\n]+$/)?.[0].length??1;for(let h=0;h<l;h++){const n=this.createIndentationTokenInstance(this.dedentTokenType,t,"",e-(c-1));r.push(n),this.indentationStack.pop()}return null}buildTerminalToken(t){const e=super.buildTerminalToken(t),{indentTokenName:r,dedentTokenName:n,whitespaceTokenName:i}=this.options;return e.name===r?this.indentTokenType:e.name===n?this.dedentTokenType:e.name===i?Fy({name:i,pattern:this.whitespaceRegExp,group:Ay.SKIPPED}):e}flushRemainingDedents(t){const e=[];for(;this.indentationStack.length>1;)e.push(this.createIndentationTokenInstance(this.dedentTokenType,t,"",t.length)),this.indentationStack.pop();return this.indentationStack=[0],e}},gL=class extends yR{static{zt(this,"IndentationAwareLexer")}constructor(t){if(super(t),!(t.parser.TokenBuilder instanceof fL))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=t.parser.TokenBuilder}tokenize(t,e=mR){const r=super.tokenize(t),n=r.report;"full"===e?.mode&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];const{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,o=i.tokenTypeIdx,s=a.tokenTypeIdx,l=[],c=r.tokens.length-1;for(let h=0;h<c;h++){const t=r.tokens[h],e=r.tokens[h+1];t.tokenTypeIdx!==o||e.tokenTypeIdx!==s?l.push(t):h++}return c>=0&&l.push(r.tokens[c]),r.tokens=l,r}},mL={};jt(mL,{AstUtils:()=>or,BiMap:()=>DA,Cancellation:()=>tA,ContextCache:()=>zA,CstUtils:()=>je,DONE_RESULT:()=>rr,Deferred:()=>uA,Disposable:()=>cR,DisposableCache:()=>BA,DocumentCache:()=>KA,EMPTY_STREAM:()=>er,ErrorWithLocation:()=>Wi,GrammarUtils:()=>qi,MultiMap:()=>IA,OperationCancelled:()=>oA,Reduction:()=>ir,RegExpUtils:()=>Yi,SimpleCache:()=>FA,StreamImpl:()=>Qe,TreeStreamImpl:()=>ar,URI:()=>bA,UriTrie:()=>kA,UriUtils:()=>vA,WorkspaceCache:()=>jA,assertCondition:()=>Gi,assertUnreachable:()=>Ui,delayNextTick:()=>eA,interruptAndCheck:()=>lA,isOperationCancelled:()=>sA,loadGrammarFromJson:()=>wL,setInterruptionPeriod:()=>aA,startCancelableOperation:()=>iA,stream:()=>nr}),Wt(mL,lR);var yL=class{static{zt(this,"EmptyFileSystemProvider")}stat(t){throw new Error("No file system is available.")}statSync(t){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},vL={fileSystemProvider:zt(()=>new yL,"fileSystemProvider")},bL={Grammar:zt(()=>{},"Grammar"),LanguageMetaData:zt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},xL={AstReflection:zt(()=>new xi,"AstReflection")};function TL(){const t=iL(nL(vL),xL),e=iL(rL({shared:t}),bL);return t.ServiceRegistry.register(e),e}function wL(t){const e=TL(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,bA.parse(`memory:/${r.name??"grammar"}.langium`)),r}zt(TL,"createMinimalGrammarServices"),zt(wL,"loadGrammarFromJson"),Wt(Ke,mL);var kL,CL,EL,SL,_L,AL,RL,LL,IL,DL,NL=class{static{zt(this,"DefaultLangiumProfiler")}constructor(t){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=t??new Set(this.allCategories),this.records=new IA}isActive(t){return this.activeCategories.has(t)}start(...t){t?t.forEach(t=>this.activeCategories.add(t)):this.activeCategories=new Set(this.allCategories)}stop(...t){t?t.forEach(t=>this.activeCategories.delete(t)):this.activeCategories.clear()}createTask(t,e){if(!this.isActive(t))throw new Error(`Category "${t}" is not active.`);return console.log(`Creating profiling task for '${t}.${e}'.`),new ML(e=>this.records.add(t,this.dumpRecord(t,e)),e)}dumpRecord(t,e){console.info(`Task ${t}.${e.identifier} executed in ${e.duration.toFixed(2)}ms and ended at ${e.date.toISOString()}`);const r=[];for(const a of e.entries.keys()){const t=e.entries.get(a),n=t.reduce((t,e)=>t+e);r.push({name:`${e.identifier}.${a}`,count:t.length,duration:n})}const n=e.duration-r.map(t=>t.duration).reduce((t,e)=>t+e,0);function i(t){return Math.round(100*t)/100}return r.push({name:e.identifier,count:1,duration:n}),r.sort((t,e)=>e.duration-t.duration),zt(i,"Round"),console.table(r.map(t=>({Element:t.name,Count:t.count,"Self %":i(100*t.duration/e.duration),"Time (ms)":i(t.duration)}))),e}getRecords(...t){return 0===t.length?this.records.values():this.records.entries().filter(e=>t.some(t=>t===e[0])).flatMap(t=>t[1])}},ML=class{static{zt(this,"ProfilingTask")}constructor(t,e){this.stack=[],this.entries=new IA,this.addRecord=t,this.identifier=e}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(t=>t.id).join(", ")}.`);const t={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(t),this.startTime=void 0,this.entries.clear()}startSubTask(t){this.stack.push({id:t,start:performance.now(),content:0})}stopSubTask(t){const e=this.stack.pop();if(!e)throw new Error(`Task "${this.identifier}.${t}" was not started.`);if(e.id!==t)throw new Error(`Sub-Task "${e.id}" is not already stopped.`);const r=performance.now()-e.start;void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r);const n=r-e.content;this.entries.add(t,n)}};(kL||(kL={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/},(CL||(CL={})).Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/},(EL||(EL={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(SL||(SL={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(_L||(_L={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(AL||(AL={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(RL||(RL={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(LL||(LL={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},(IL||(IL={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/},(DL||(DL={})).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/};kL.Terminals,CL.Terminals,EL.Terminals,SL.Terminals,_L.Terminals,AL.Terminals,RL.Terminals,IL.Terminals,LL.Terminals,DL.Terminals;var OL="Accelerator",$L="name",PL="x",BL="y",FL="Anchor",zL="evolution",KL="name",jL="visibility",qL="Annotation",WL="number",UL="text",GL="x",YL="y",VL="Annotations",HL="x",XL="y",ZL="Architecture",QL="accDescr",JL="accTitle",tI="edges",eI="groups",rI="junctions",nI="services",iI="title";zt(function(t){return FO.isInstance(t,ZL)},"isArchitecture");var aI="Axis",oI="label",sI="name",lI="Branch",cI="name",hI="order";zt(function(t){return FO.isInstance(t,lI)},"isBranch");var uI="Checkout",dI="branch",pI="CherryPicking",fI="id",gI="parent",mI="tags",yI="ClassDefStatement",vI="className",bI="styleText",xI="Commit",TI="id",wI="message",kI="tags",CI="type";zt(function(t){return FO.isInstance(t,xI)},"isCommit");var EI="Common",SI="accDescr",_I="accTitle",AI="title",RI="Component",LI="decorator",II="evolution",DI="inertia",NI="label",MI="name",OI="visibility",$I="Curve",PI="entries",BI="label",FI="name",zI="Deaccelerator",KI="name",jI="x",qI="y",WI="Decorator",UI="strategy",GI="Direction",YI="accDescr",VI="accTitle",HI="dir",XI="statements",ZI="title",QI="Edge",JI="lhsDir",tD="lhsGroup",eD="lhsId",rD="lhsInto",nD="rhsDir",iD="rhsGroup",aD="rhsId",oD="rhsInto",sD="title",lD="EmDataEntity",cD="dataBlockValue",hD="dataType",uD="name",dD="EmFrame",pD="EmGwt",fD="givenStatements",gD="sourceFrame",mD="thenStatements",yD="whenStatements",vD="EmGwtStatement",bD="entityIdentifier",xD="EmModelEntity",TD="name";zt(function(t){return"rmo"===t||"readmodel"===t||"ui"===t||"cmd"===t||"command"===t||"evt"===t||"event"===t||"pcr"===t||"processor"===t},"isEmModelEntityType");var wD="EmNoteEntity",kD="dataBlockValue",CD="dataType",ED="sourceFrame",SD="EmResetFrame",_D="dataInlineValue",AD="dataReference",RD="dataType",LD="entityIdentifier",ID="modelEntityType",DD="name",ND="sourceFrames";function MD(t){return FO.isInstance(t,SD)}zt(MD,"isEmResetFrame");var OD="EmTimeFrame",$D="dataInlineValue",PD="dataReference",BD="dataType",FD="entityIdentifier",zD="modelEntityType",KD="name",jD="sourceFrames",qD="Entry",WD="axis",UD="value",GD="EventModel",YD="accDescr",VD="accTitle",HD="dataEntities",XD="frames",ZD="gwtEntities",QD="modelEntities",JD="noteEntities",tN="title",eN="Evolution",rN="stages",nN="EvolutionStage",iN="boundary",aN="name",oN="secondName",sN="Evolve",lN="component",cN="target",hN="GitGraph",uN="accDescr",dN="accTitle",pN="statements",fN="title";zt(function(t){return FO.isInstance(t,hN)},"isGitGraph");var gN="Group",mN="icon",yN="id",vN="in",bN="title",xN="Info",TN="accDescr",wN="accTitle",kN="title";zt(function(t){return FO.isInstance(t,xN)},"isInfo");var CN="Item",EN="classSelector",SN="name",_N="Junction",AN="id",RN="in",LN="Label",IN="negX",DN="negY",NN="offsetX",MN="offsetY",ON="Leaf",$N="classSelector",PN="name",BN="value",FN="Link",zN="arrow",KN="from",jN="fromPort",qN="linkLabel",WN="to",UN="toPort",GN="Merge",YN="branch",VN="id",HN="tags",XN="type";zt(function(t){return FO.isInstance(t,GN)},"isMerge");var ZN="Note",QN="evolution",JN="text",tM="visibility",eM="Option",rM="name",nM="value",iM="Packet",aM="accDescr",oM="accTitle",sM="blocks",lM="title";zt(function(t){return FO.isInstance(t,iM)},"isPacket");var cM="PacketBlock",hM="bits",uM="end",dM="label",pM="start";zt(function(t){return FO.isInstance(t,cM)},"isPacketBlock");var fM="Pie",gM="accDescr",mM="accTitle",yM="sections",vM="showData",bM="title";zt(function(t){return FO.isInstance(t,fM)},"isPie");var xM="PieSection",TM="label",wM="value";zt(function(t){return FO.isInstance(t,xM)},"isPieSection");var kM="Pipeline",CM="components",EM="parent",SM="PipelineComponent",_M="evolution",AM="label",RM="name",LM="Radar",IM="accDescr",DM="accTitle",NM="axes",MM="curves",OM="options",$M="title",PM="Section",BM="classSelector",FM="name",zM="Service",KM="icon",jM="iconText",qM="id",WM="in",UM="title",GM="Size",YM="height",VM="width",HM="Statement",XM="Treemap",ZM="accDescr",QM="accTitle",JM="title",tO="TreemapRows";zt(function(t){return FO.isInstance(t,XM)},"isTreemap");var eO="TreemapRow",rO="indent",nO="item",iO="TreeNode",aO="indent",oO="name",sO="TreeView",lO="accDescr",cO="accTitle",hO="nodes",uO="title",dO="Wardley",pO="accDescr",fO="accelerators",gO="accTitle",mO="anchors",yO="annotation",vO="annotations",bO="components",xO="deaccelerators",TO="evolution",wO="evolves",kO="links",CO="notes",EO="pipelines",SO="size",_O="title";zt(function(t){return FO.isInstance(t,dO)},"isWardley");var AO,RO,LO,IO,DO,NO,MO,OO,$O,PO,BO=class extends Ve{constructor(){super(...arguments),this.types={Accelerator:{name:OL,properties:{name:{name:$L},x:{name:PL},y:{name:BL}},superTypes:[]},Anchor:{name:FL,properties:{evolution:{name:zL},name:{name:KL},visibility:{name:jL}},superTypes:[]},Annotation:{name:qL,properties:{number:{name:WL},text:{name:UL},x:{name:GL},y:{name:YL}},superTypes:[]},Annotations:{name:VL,properties:{x:{name:HL},y:{name:XL}},superTypes:[]},Architecture:{name:ZL,properties:{accDescr:{name:QL},accTitle:{name:JL},edges:{name:tI,defaultValue:[]},groups:{name:eI,defaultValue:[]},junctions:{name:rI,defaultValue:[]},services:{name:nI,defaultValue:[]},title:{name:iI}},superTypes:[]},Axis:{name:aI,properties:{label:{name:oI},name:{name:sI}},superTypes:[]},Branch:{name:lI,properties:{name:{name:cI},order:{name:hI}},superTypes:[HM]},Checkout:{name:uI,properties:{branch:{name:dI}},superTypes:[HM]},CherryPicking:{name:pI,properties:{id:{name:fI},parent:{name:gI},tags:{name:mI,defaultValue:[]}},superTypes:[HM]},ClassDefStatement:{name:yI,properties:{className:{name:vI},styleText:{name:bI}},superTypes:[]},Commit:{name:xI,properties:{id:{name:TI},message:{name:wI},tags:{name:kI,defaultValue:[]},type:{name:CI}},superTypes:[HM]},Common:{name:EI,properties:{accDescr:{name:SI},accTitle:{name:_I},title:{name:AI}},superTypes:[]},Component:{name:RI,properties:{decorator:{name:LI},evolution:{name:II},inertia:{name:DI,defaultValue:!1},label:{name:NI},name:{name:MI},visibility:{name:OI}},superTypes:[]},Curve:{name:$I,properties:{entries:{name:PI,defaultValue:[]},label:{name:BI},name:{name:FI}},superTypes:[]},Deaccelerator:{name:zI,properties:{name:{name:KI},x:{name:jI},y:{name:qI}},superTypes:[]},Decorator:{name:WI,properties:{strategy:{name:UI}},superTypes:[]},Direction:{name:GI,properties:{accDescr:{name:YI},accTitle:{name:VI},dir:{name:HI},statements:{name:XI,defaultValue:[]},title:{name:ZI}},superTypes:[hN]},Edge:{name:QI,properties:{lhsDir:{name:JI},lhsGroup:{name:tD,defaultValue:!1},lhsId:{name:eD},lhsInto:{name:rD,defaultValue:!1},rhsDir:{name:nD},rhsGroup:{name:iD,defaultValue:!1},rhsId:{name:aD},rhsInto:{name:oD,defaultValue:!1},title:{name:sD}},superTypes:[]},EmDataEntity:{name:lD,properties:{dataBlockValue:{name:cD},dataType:{name:hD},name:{name:uD}},superTypes:[]},EmFrame:{name:dD,properties:{},superTypes:[]},EmGwt:{name:pD,properties:{givenStatements:{name:fD,defaultValue:[]},sourceFrame:{name:gD,referenceType:dD},thenStatements:{name:mD,defaultValue:[]},whenStatements:{name:yD,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:vD,properties:{entityIdentifier:{name:bD,referenceType:xD}},superTypes:[]},EmModelEntity:{name:xD,properties:{name:{name:TD}},superTypes:[]},EmNoteEntity:{name:wD,properties:{dataBlockValue:{name:kD},dataType:{name:CD},sourceFrame:{name:ED,referenceType:dD}},superTypes:[]},EmResetFrame:{name:SD,properties:{dataInlineValue:{name:_D},dataReference:{name:AD,referenceType:lD},dataType:{name:RD},entityIdentifier:{name:LD},modelEntityType:{name:ID},name:{name:DD},sourceFrames:{name:ND,defaultValue:[],referenceType:dD}},superTypes:[dD]},EmTimeFrame:{name:OD,properties:{dataInlineValue:{name:$D},dataReference:{name:PD,referenceType:lD},dataType:{name:BD},entityIdentifier:{name:FD},modelEntityType:{name:zD},name:{name:KD},sourceFrames:{name:jD,defaultValue:[],referenceType:dD}},superTypes:[dD]},Entry:{name:qD,properties:{axis:{name:WD,referenceType:aI},value:{name:UD}},superTypes:[]},EventModel:{name:GD,properties:{accDescr:{name:YD},accTitle:{name:VD},dataEntities:{name:HD,defaultValue:[]},frames:{name:XD,defaultValue:[]},gwtEntities:{name:ZD,defaultValue:[]},modelEntities:{name:QD,defaultValue:[]},noteEntities:{name:JD,defaultValue:[]},title:{name:tN}},superTypes:[]},Evolution:{name:eN,properties:{stages:{name:rN,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:nN,properties:{boundary:{name:iN},name:{name:aN},secondName:{name:oN}},superTypes:[]},Evolve:{name:sN,properties:{component:{name:lN},target:{name:cN}},superTypes:[]},GitGraph:{name:hN,properties:{accDescr:{name:uN},accTitle:{name:dN},statements:{name:pN,defaultValue:[]},title:{name:fN}},superTypes:[]},Group:{name:gN,properties:{icon:{name:mN},id:{name:yN},in:{name:vN},title:{name:bN}},superTypes:[]},Info:{name:xN,properties:{accDescr:{name:TN},accTitle:{name:wN},title:{name:kN}},superTypes:[]},Item:{name:CN,properties:{classSelector:{name:EN},name:{name:SN}},superTypes:[]},Junction:{name:_N,properties:{id:{name:AN},in:{name:RN}},superTypes:[]},Label:{name:LN,properties:{negX:{name:IN,defaultValue:!1},negY:{name:DN,defaultValue:!1},offsetX:{name:NN},offsetY:{name:MN}},superTypes:[]},Leaf:{name:ON,properties:{classSelector:{name:$N},name:{name:PN},value:{name:BN}},superTypes:[CN]},Link:{name:FN,properties:{arrow:{name:zN},from:{name:KN},fromPort:{name:jN},linkLabel:{name:qN},to:{name:WN},toPort:{name:UN}},superTypes:[]},Merge:{name:GN,properties:{branch:{name:YN},id:{name:VN},tags:{name:HN,defaultValue:[]},type:{name:XN}},superTypes:[HM]},Note:{name:ZN,properties:{evolution:{name:QN},text:{name:JN},visibility:{name:tM}},superTypes:[]},Option:{name:eM,properties:{name:{name:rM},value:{name:nM,defaultValue:!1}},superTypes:[]},Packet:{name:iM,properties:{accDescr:{name:aM},accTitle:{name:oM},blocks:{name:sM,defaultValue:[]},title:{name:lM}},superTypes:[]},PacketBlock:{name:cM,properties:{bits:{name:hM},end:{name:uM},label:{name:dM},start:{name:pM}},superTypes:[]},Pie:{name:fM,properties:{accDescr:{name:gM},accTitle:{name:mM},sections:{name:yM,defaultValue:[]},showData:{name:vM,defaultValue:!1},title:{name:bM}},superTypes:[]},PieSection:{name:xM,properties:{label:{name:TM},value:{name:wM}},superTypes:[]},Pipeline:{name:kM,properties:{components:{name:CM,defaultValue:[]},parent:{name:EM}},superTypes:[]},PipelineComponent:{name:SM,properties:{evolution:{name:_M},label:{name:AM},name:{name:RM}},superTypes:[]},Radar:{name:LM,properties:{accDescr:{name:IM},accTitle:{name:DM},axes:{name:NM,defaultValue:[]},curves:{name:MM,defaultValue:[]},options:{name:OM,defaultValue:[]},title:{name:$M}},superTypes:[]},Section:{name:PM,properties:{classSelector:{name:BM},name:{name:FM}},superTypes:[CN]},Service:{name:zM,properties:{icon:{name:KM},iconText:{name:jM},id:{name:qM},in:{name:WM},title:{name:UM}},superTypes:[]},Size:{name:GM,properties:{height:{name:YM},width:{name:VM}},superTypes:[]},Statement:{name:HM,properties:{},superTypes:[]},TreeNode:{name:iO,properties:{indent:{name:aO},name:{name:oO}},superTypes:[]},TreeView:{name:sO,properties:{accDescr:{name:lO},accTitle:{name:cO},nodes:{name:hO,defaultValue:[]},title:{name:uO}},superTypes:[]},Treemap:{name:XM,properties:{accDescr:{name:ZM},accTitle:{name:QM},title:{name:JM},TreemapRows:{name:tO,defaultValue:[]}},superTypes:[]},TreemapRow:{name:eO,properties:{indent:{name:rO},item:{name:nO}},superTypes:[]},Wardley:{name:dO,properties:{accDescr:{name:pO},accelerators:{name:fO,defaultValue:[]},accTitle:{name:gO},anchors:{name:mO,defaultValue:[]},annotation:{name:yO,defaultValue:[]},annotations:{name:vO,defaultValue:[]},components:{name:bO,defaultValue:[]},deaccelerators:{name:xO,defaultValue:[]},evolution:{name:TO},evolves:{name:wO,defaultValue:[]},links:{name:kO,defaultValue:[]},notes:{name:CO,defaultValue:[]},pipelines:{name:EO,defaultValue:[]},size:{name:SO},title:{name:_O}},superTypes:[]}}}static{zt(this,"MermaidAstReflection")}},FO=new BO,zO=zt(()=>AO??(AO=wL('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),KO=zt(()=>RO??(RO=wL('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),jO=zt(()=>LO??(LO=wL('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),qO=zt(()=>IO??(IO=wL('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),WO=zt(()=>DO??(DO=wL('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),UO=zt(()=>NO??(NO=wL('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),GO=zt(()=>MO??(MO=wL('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),YO=zt(()=>OO??(OO=wL('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),VO=zt(()=>$O??($O=wL('{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}')),"TreeViewGrammarGrammar"),HO=zt(()=>PO??(PO=wL('{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"--\x3e"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'</","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'>/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"WardleyGrammarGrammar"),XO={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ZO={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},QO={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},JO={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},t$={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},e$={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},r$={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},n$={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},i$={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},a$={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},o$={AstReflection:zt(()=>new BO,"AstReflection")},s$={Grammar:zt(()=>zO(),"Grammar"),LanguageMetaData:zt(()=>XO,"LanguageMetaData"),parser:{}},l$={Grammar:zt(()=>KO(),"Grammar"),LanguageMetaData:zt(()=>ZO,"LanguageMetaData"),parser:{}},c$={Grammar:zt(()=>jO(),"Grammar"),LanguageMetaData:zt(()=>QO,"LanguageMetaData"),parser:{}},h$={Grammar:zt(()=>qO(),"Grammar"),LanguageMetaData:zt(()=>JO,"LanguageMetaData"),parser:{}},u$={Grammar:zt(()=>WO(),"Grammar"),LanguageMetaData:zt(()=>t$,"LanguageMetaData"),parser:{}},d$={Grammar:zt(()=>UO(),"Grammar"),LanguageMetaData:zt(()=>e$,"LanguageMetaData"),parser:{}},p$={Grammar:zt(()=>GO(),"Grammar"),LanguageMetaData:zt(()=>r$,"LanguageMetaData"),parser:{}},f$={Grammar:zt(()=>YO(),"Grammar"),LanguageMetaData:zt(()=>n$,"LanguageMetaData"),parser:{}},g$={Grammar:zt(()=>VO(),"Grammar"),LanguageMetaData:zt(()=>i$,"LanguageMetaData"),parser:{}},m$={Grammar:zt(()=>HO(),"Grammar"),LanguageMetaData:zt(()=>a$,"LanguageMetaData"),parser:{}},y$={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},v$=class extends J_{static{zt(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){let n=this.runCommonConverter(t,e,r);return void 0===n&&(n=this.runCustomConverter(t,e,r)),void 0===n?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){const n=y$[t.name];if(void 0===n)return;const i=n.exec(e);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},b$=class extends v${static{zt(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},x$=class extends Q_{static{zt(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){const n=super.buildKeywordTokens(t,e,r);return n.forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}};(class extends x${static{zt(this,"CommonTokenBuilder")}})},4837(t,e,r){"use strict";r.d(e,{J:()=>o});var n=r(9302),i=class extends n.dg{static{(0,n.K2)(this,"WardleyValueConverter")}runCustomConverter(t,e,r){if("LINK_LABEL"===t.name.toUpperCase())return e.substring(1).trim()}},a={parser:{ValueConverter:(0,n.K2)(()=>new i,"ValueConverter")}};function o(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.Xr,a);return e.ServiceRegistry.register(r),{shared:e,Wardley:r}}(0,n.K2)(o,"createWardleyServices")},3398(t,e,r){"use strict";r.d(e,{b:()=>o});var n=r(9302),i=class extends n.mR{static{(0,n.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function o(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.d$,a);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}(0,n.K2)(o,"createGitGraphServices")},5738(t,e,r){"use strict";r.d(e,{I:()=>s});var n=r(9302),i=class extends n.dg{static{(0,n.K2)(this,"TreeViewValueConverter")}runCustomConverter(t,e,r){return"INDENTATION"===t.name?e?.length||0:"STRING2"===t.name?e.substring(1,e.length-1):void 0}},a=class extends n.mR{static{(0,n.K2)(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},o={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new i,"ValueConverter")}};function s(t=n.DD){const e=(0,n.WQ)((0,n.uM)(t),n.sr),r=(0,n.WQ)((0,n.tG)({shared:e}),n.CZ,o);return e.ServiceRegistry.register(r),{shared:e,TreeView:r}}(0,n.K2)(s,"createTreeViewServices")},6735(t,e,r){"use strict";r.d(e,{createEventModelingServices:()=>n.g});var n=r(2968);r(9302)},8119(t,e,r){"use strict";r.d(e,{createGitGraphServices:()=>n.b});var n=r(3398);r(9302)},6288(t,e,r){"use strict";r.d(e,{createInfoServices:()=>n.v});var n=r(9511);r(9302)},7180(t,e,r){"use strict";r.d(e,{createPacketServices:()=>n.$});var n=r(4824);r(9302)},4737(t,e,r){"use strict";r.d(e,{createPieServices:()=>n.f});var n=r(532);r(9302)},3872(t,e,r){"use strict";r.d(e,{createRadarServices:()=>n.f});var n=r(5160);r(9302)},3674(t,e,r){"use strict";r.d(e,{createTreeViewServices:()=>n.I});var n=r(5738);r(9302)},2014(t,e,r){"use strict";r.d(e,{createTreemapServices:()=>n.d});var n=r(1681);r(9302)},2555(t,e,r){"use strict";r.d(e,{createWardleyServices:()=>n.J});var n=r(4837);r(9302)},8731(t,e,r){"use strict";r.d(e,{F5:()=>n.F5,qg:()=>o});r(5160),r(1681),r(4837),r(3398),r(9511),r(4824),r(532),r(5738),r(5016),r(2968);var n=r(9302),i={},a={info:(0,n.K2)(async()=>{const{createInfoServices:t}=await Promise.resolve().then(r.bind(r,6288)),e=t().Info.parser.LangiumParser;i.info=e},"info"),packet:(0,n.K2)(async()=>{const{createPacketServices:t}=await Promise.resolve().then(r.bind(r,7180)),e=t().Packet.parser.LangiumParser;i.packet=e},"packet"),pie:(0,n.K2)(async()=>{const{createPieServices:t}=await Promise.resolve().then(r.bind(r,4737)),e=t().Pie.parser.LangiumParser;i.pie=e},"pie"),treeView:(0,n.K2)(async()=>{const{createTreeViewServices:t}=await Promise.resolve().then(r.bind(r,3674)),e=t().TreeView.parser.LangiumParser;i.treeView=e},"treeView"),architecture:(0,n.K2)(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(r.bind(r,6402)),e=t().Architecture.parser.LangiumParser;i.architecture=e},"architecture"),gitGraph:(0,n.K2)(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(r.bind(r,8119)),e=t().GitGraph.parser.LangiumParser;i.gitGraph=e},"gitGraph"),eventmodeling:(0,n.K2)(async()=>{const{createEventModelingServices:t}=await Promise.resolve().then(r.bind(r,6735)),e=t().EventModel.parser.LangiumParser;i.eventmodeling=e},"eventmodeling"),radar:(0,n.K2)(async()=>{const{createRadarServices:t}=await Promise.resolve().then(r.bind(r,3872)),e=t().Radar.parser.LangiumParser;i.radar=e},"radar"),treemap:(0,n.K2)(async()=>{const{createTreemapServices:t}=await Promise.resolve().then(r.bind(r,2014)),e=t().Treemap.parser.LangiumParser;i.treemap=e},"treemap"),wardley:(0,n.K2)(async()=>{const{createWardleyServices:t}=await Promise.resolve().then(r.bind(r,2555)),e=t().Wardley.parser.LangiumParser;i.wardley=e},"wardley")};async function o(t,e){const r=a[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);i[t]||await r();const n=i[t].parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new s(n);return n.value}(0,n.K2)(o,"parse");var s=class extends Error{constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>`Lexer error on line ${void 0===t.line||isNaN(t.line)?"?":t.line}, column ${void 0===t.column||isNaN(t.column)?"?":t.column}: ${t.message}`).join("\n")} ${t.parserErrors.map(t=>`Parse error on line ${void 0===t.token.startLine||isNaN(t.token.startLine)?"?":t.token.startLine}, column ${void 0===t.token.startColumn||isNaN(t.token.startColumn)?"?":t.token.startColumn}: ${t.message}`).join("\n")}`),this.result=t}static{(0,n.K2)(this,"MermaidParseError")}}},165(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e,r){return e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=d(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function s(t,e,r){return(e=h(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||d(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function d(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}r.d(e,{A:()=>Zd});var p="undefined"==typeof window?null:window,f=p?p.navigator:null;p&&p.document;var g,m,y,v,b,x,T,w,k,C,E,S,_,A,R,L,I,D,N,M,O,$,P,B,F,z,K,j,q=u(""),W=u({}),U=u(function(){}),G="undefined"==typeof HTMLElement?"undefined":u(HTMLElement),Y=function(t){return t&&t.instanceString&&H(t.instanceString)?t.instanceString():null},V=function(t){return null!=t&&u(t)==q},H=function(t){return null!=t&&u(t)===U},X=function(t){return!tt(t)&&(Array.isArray?Array.isArray(t):null!=t&&t instanceof Array)},Z=function(t){return null!=t&&u(t)===W&&!X(t)&&t.constructor===Object},Q=function(t){return null!=t&&u(t)===u(1)&&!isNaN(t)},J=function(t){return"undefined"===G?void 0:null!=t&&t instanceof HTMLElement},tt=function(t){return et(t)||rt(t)},et=function(t){return"collection"===Y(t)&&t._private.single},rt=function(t){return"collection"===Y(t)&&!t._private.single},nt=function(t){return"core"===Y(t)},it=function(t){return"stylesheet"===Y(t)},at=function(t){return null==t||!(""!==t&&!t.match(/^\s+$/))},ot=function(t){return function(t){return null!=t&&u(t)===W}(t)&&H(t.then)},st=function(t,e){e||(e=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return t.join("$")});var r=function(){var n,i=arguments,a=e.apply(this,i),o=r.cache;return(n=o[a])||(n=o[a]=t.apply(this,i)),n};return r.cache={},r},lt=st(function(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}),ct=st(function(t){return t.replace(/(-\w)/g,function(t){return t[1].toUpperCase()})}),ht=st(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),ut=function(t){return at(t)?t:t.charAt(0).toUpperCase()+t.substring(1)},dt=function(t,e){return t.slice(-1*e.length)===e},pt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",ft="rgb[a]?\\(("+pt+"[%]?)\\s*,\\s*("+pt+"[%]?)\\s*,\\s*("+pt+"[%]?)(?:\\s*,\\s*("+pt+"))?\\)",gt="rgb[a]?\\((?:"+pt+"[%]?)\\s*,\\s*(?:"+pt+"[%]?)\\s*,\\s*(?:"+pt+"[%]?)(?:\\s*,\\s*(?:"+pt+"))?\\)",mt="hsl[a]?\\(("+pt+")\\s*,\\s*("+pt+"[%])\\s*,\\s*("+pt+"[%])(?:\\s*,\\s*("+pt+"))?\\)",yt="hsl[a]?\\((?:"+pt+")\\s*,\\s*(?:"+pt+"[%])\\s*,\\s*(?:"+pt+"[%])(?:\\s*,\\s*(?:"+pt+"))?\\)",vt=function(t,e){return t<e?-1:t>e?1:0},bt=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(null!=n)for(var i=Object.keys(n),a=0;a<i.length;a++){var o=i[a];t[o]=n[o]}}return t},xt=function(t){return(X(t)?t:null)||function(t){return Tt[t.toLowerCase()]}(t)||function(t){if((4===t.length||7===t.length)&&"#"===t[0]){var e,r,n,i=16;return 4===t.length?(e=parseInt(t[1]+t[1],i),r=parseInt(t[2]+t[2],i),n=parseInt(t[3]+t[3],i)):(e=parseInt(t[1]+t[2],i),r=parseInt(t[3]+t[4],i),n=parseInt(t[5]+t[6],i)),[e,r,n]}}(t)||function(t){var e,r=new RegExp("^"+ft+"$").exec(t);if(r){e=[];for(var n=[],i=1;i<=3;i++){var a=r[i];if("%"===a[a.length-1]&&(n[i]=!0),a=parseFloat(a),n[i]&&(a=a/100*255),a<0||a>255)return;e.push(Math.floor(a))}var o=n[1]||n[2]||n[3],s=n[1]&&n[2]&&n[3];if(o&&!s)return;var l=r[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;e.push(l)}}return e}(t)||function(t){var e,r,n,i,a,o,s,l;function c(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}var h=new RegExp("^"+mt+"$").exec(t);if(h){if((r=parseInt(h[1]))<0?r=(360- -1*r%360)%360:r>360&&(r%=360),r/=360,(n=parseFloat(h[2]))<0||n>100)return;if(n/=100,(i=parseFloat(h[3]))<0||i>100)return;if(i/=100,void 0!==(a=h[4])&&((a=parseFloat(a))<0||a>1))return;if(0===n)o=s=l=Math.round(255*i);else{var u=i<.5?i*(1+n):i+n-i*n,d=2*i-u;o=Math.round(255*c(d,u,r+1/3)),s=Math.round(255*c(d,u,r)),l=Math.round(255*c(d,u,r-1/3))}e=[o,s,l,a]}return e}(t)},Tt={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},wt=function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(Z(a))throw Error("Tried to set map with object key");i<r.length-1?(null==e[a]&&(e[a]={}),e=e[a]):e[a]=t.value}},kt=function(t){for(var e=t.map,r=t.keys,n=r.length,i=0;i<n;i++){var a=r[i];if(Z(a))throw Error("Tried to get map with object key");if(null==(e=e[a]))return e}return e},Ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function Et(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function St(){if(m)return g;return m=1,g=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function _t(){if(x)return b;x=1;var t=function(){if(v)return y;v=1;var t="object"==typeof Ct&&Ct&&Ct.Object===Object&&Ct;return y=t}(),e="object"==typeof self&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return b=r}function At(){if(S)return E;S=1;var t=function(){if(C)return k;C=1;var t=/\s/;return k=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r},k}(),e=/^\s+/;return E=function(r){return r?r.slice(0,t(r)+1).replace(e,""):r},E}function Rt(){if(A)return _;A=1;var t=_t().Symbol;return _=t}function Lt(){if(M)return N;M=1;var t=Rt(),e=function(){if(L)return R;L=1;var t=Rt(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;return R=function(t){var e=r.call(t,i),a=t[i];try{t[i]=void 0;var o=!0}catch(l){}var s=n.call(t);return o&&(e?t[i]=a:delete t[i]),s}}(),r=function(){if(D)return I;D=1;var t=Object.prototype.toString;return I=function(e){return t.call(e)}}(),n=t?t.toStringTag:void 0;return N=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?e(t):r(t)}}function It(){if(B)return P;B=1;var t=Lt(),e=$?O:($=1,O=function(t){return null!=t&&"object"==typeof t});return P=function(r){return"symbol"==typeof r||e(r)&&"[object Symbol]"==t(r)}}var Dt=function(){if(j)return K;j=1;var t=St(),e=function(){if(w)return T;w=1;var t=_t();return T=function(){return t.Date.now()}}(),r=function(){if(z)return F;z=1;var t=At(),e=St(),r=It(),n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;return F=function(s){if("number"==typeof s)return s;if(r(s))return NaN;if(e(s)){var l="function"==typeof s.valueOf?s.valueOf():s;s=e(l)?l+"":l}if("string"!=typeof s)return 0===s?s:+s;s=t(s);var c=i.test(s);return c||a.test(s)?o(s.slice(2),c?2:8):n.test(s)?NaN:+s}}(),n=Math.max,i=Math.min;return K=function(a,o,s){var l,c,h,u,d,p,f=0,g=!1,m=!1,y=!0;if("function"!=typeof a)throw new TypeError("Expected a function");function v(t){var e=l,r=c;return l=c=void 0,f=t,u=a.apply(r,e)}function b(t){var e=t-p;return void 0===p||e>=o||e<0||m&&t-f>=h}function x(){var t=e();if(b(t))return T(t);d=setTimeout(x,function(t){var e=o-(t-p);return m?i(e,h-(t-f)):e}(t))}function T(t){return d=void 0,y&&l?v(t):(l=c=void 0,u)}function w(){var t=e(),r=b(t);if(l=arguments,c=this,p=t,r){if(void 0===d)return function(t){return f=t,d=setTimeout(x,o),g?v(t):u}(p);if(m)return clearTimeout(d),d=setTimeout(x,o),v(p)}return void 0===d&&(d=setTimeout(x,o)),u}return o=r(o)||0,t(s)&&(g=!!s.leading,h=(m="maxWait"in s)?n(r(s.maxWait)||0,o):h,y="trailing"in s?!!s.trailing:y),w.cancel=function(){void 0!==d&&clearTimeout(d),f=0,l=p=c=d=void 0},w.flush=function(){return void 0===d?u:T(e())},w},K}(),Nt=Et(Dt),Mt=p?p.performance:null,Ot=Mt&&Mt.now?function(){return Mt.now()}:function(){return Date.now()},$t=function(){if(p){if(p.requestAnimationFrame)return function(t){p.requestAnimationFrame(t)};if(p.mozRequestAnimationFrame)return function(t){p.mozRequestAnimationFrame(t)};if(p.webkitRequestAnimationFrame)return function(t){p.webkitRequestAnimationFrame(t)};if(p.msRequestAnimationFrame)return function(t){p.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(Ot())},1e3/60)}}(),Pt=function(t){return $t(t)},Bt=Ot,Ft=9261,zt=5381,Kt=function(t){for(var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ft;!(e=t.next()).done;)r=65599*r+e.value|0;return r},jt=function(t){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ft)+t|0},qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zt;return(e<<5)+e+t|0},Wt=function(t){return 2097152*t[0]+t[1]},Ut=function(t,e){return[jt(t[0],e[0]),qt(t[1],e[1])]},Gt=function(t,e){var r={value:0,done:!1},n=0,i=t.length;return Kt({next:function(){return n<i?r.value=t[n++]:r.done=!0,r}},e)},Yt=function(t,e){var r={value:0,done:!1},n=0,i=t.length;return Kt({next:function(){return n<i?r.value=t.charCodeAt(n++):r.done=!0,r}},e)},Vt=function(){return Ht(arguments)},Ht=function(t){for(var e,r=0;r<t.length;r++){var n=t[r];e=0===r?Yt(n):Yt(n,e)}return e};function Xt(t,e,r){if(0===r)return t;var n=(e.x1+e.x2)/2,i=(e.y1+e.y2)/2,a=e.w/e.h,o=1/a,s=function(t,e,r,n,i){var a=i*Math.PI/180;return{x:Math.cos(a)*(t-r)-Math.sin(a)*(e-n)+r,y:Math.sin(a)*(t-r)+Math.cos(a)*(e-n)+n}}(t.x,t.y,n,i,r),l=function(t,e,r,n,i,a){return{x:(t-r)*i+r,y:(e-n)*a+n}}(s.x,s.y,n,i,a,o);return{x:l.x,y:l.y}}var Zt=!0,Qt=null!=console.warn,Jt=null!=console.trace,te=Number.MAX_SAFE_INTEGER||9007199254740991,ee=function(){return!0},re=function(){return!1},ne=function(){return 0},ie=function(){},ae=function(t){throw new Error(t)},oe=function(t){if(void 0===t)return Zt;Zt=!!t},se=function(t){oe()&&(Qt?console.warn(t):(console.log(t),Jt&&console.trace()))},le=function(t){return null==t?t:X(t)?t.slice():Z(t)?function(t){return bt({},t)}(t):t},ce=function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e},he={},ue=function(){return he},de=function(t){var e=Object.keys(t);return function(r){for(var n={},i=0;i<e.length;i++){var a=e[i],o=null==r?void 0:r[a];n[a]=void 0===o?t[a]:o}return n}},pe=function(t,e,r){for(var n=t.length-1;n>=0;n--)t[n]===e&&t.splice(n,1)},fe=function(t){t.splice(0,t.length)},ge=function(t,e,r){return r&&(e=ht(r,e)),t[e]},me=function(t,e,r,n){r&&(e=ht(r,e)),t[e]=n},ye="undefined"!=typeof Map?Map:function(){return a(function t(){i(this,t),this._obj={}},[{key:"set",value:function(t,e){return this._obj[t]=e,this}},{key:"delete",value:function(t){return this._obj[t]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(t){return void 0!==this._obj[t]}},{key:"get",value:function(t){return this._obj[t]}}])}(),ve=function(){return a(function t(e){if(i(this,t),this._obj=Object.create(null),this.size=0,null!=e){var r;r=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e;for(var n=0;n<r.length;n++)this.add(r[n])}},[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(t){var e=this._obj;1!==e[t]&&(e[t]=1,this.size++)}},{key:"delete",value:function(t){var e=this._obj;1===e[t]&&(e[t]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(t){return 1===this._obj[t]}},{key:"toArray",value:function(){var t=this;return Object.keys(this._obj).filter(function(e){return t.has(e)})}},{key:"forEach",value:function(t,e){return this.toArray().forEach(t,e)}}])}(),be="undefined"!==("undefined"==typeof Set?"undefined":u(Set))?Set:ve,xe=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0!==t&&void 0!==e&&nt(t)){var n=e.group;if(null==n&&(n=e.data&&null!=e.data.source&&null!=e.data.target?"edges":"nodes"),"nodes"===n||"edges"===n){this.length=1,this[0]=this;var i=this._private={cy:t,single:!0,data:e.data||{},position:e.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!e.selected,selectable:void 0===e.selectable||!!e.selectable,locked:!!e.locked,grabbed:!1,grabbable:void 0===e.grabbable||!!e.grabbable,pannable:void 0===e.pannable?"edges"===n:!!e.pannable,active:!1,classes:new be,animation:{current:[],queue:[]},rscratch:{},scratch:e.scratch||{},edges:[],children:[],parent:e.parent&&e.parent.isNode()?e.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),e.renderedPosition){var a=e.renderedPosition,o=t.pan(),s=t.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];X(e.classes)?l=e.classes:V(e.classes)&&(l=e.classes.split(/\s+/));for(var c=0,h=l.length;c<h;c++){var u=l[c];u&&""!==u&&i.classes.add(u)}this.createEmitter(),(void 0===r||r)&&this.restore();var d=e.style||e.css;d&&(se("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(d))}else ae("An element must be of type `nodes` or `edges`; you specified `"+n+"`")}else ae("An element must have a core reference and parameters set")},Te=function(t){return t={bfs:t.bfs||!t.dfs,dfs:t.dfs||!t.bfs},function(e,r,n){var i;Z(e)&&!tt(e)&&(e=(i=e).roots||i.root,r=i.visit,n=i.directed),n=2!==arguments.length||H(r)?n:r,r=H(r)?r:function(){};for(var a,o=this._private.cy,s=e=V(e)?this.filter(e):e,l=[],c=[],h={},u={},d={},p=0,f=this.byGroup(),g=f.nodes,m=f.edges,y=0;y<s.length;y++){var v=s[y],b=v.id();v.isNode()&&(l.unshift(v),t.bfs&&(d[b]=!0,c.push(v)),u[b]=0)}for(var x,T=function(){var e=t.bfs?l.shift():l.pop(),i=e.id();if(t.dfs){if(d[i])return 0;d[i]=!0,c.push(e)}var o,s=u[i],f=h[i],y=null!=f?f.source():null,v=null!=f?f.target():null,b=null==f?void 0:e.same(y)?v[0]:y[0];if(!0===(o=r(e,f,b,p++,s)))return a=e,1;if(!1===o)return 1;for(var x=e.connectedEdges().filter(function(t){return(!n||t.source().same(e))&&m.has(t)}),T=0;T<x.length;T++){var w=x[T],k=w.connectedNodes().filter(function(t){return!t.same(e)&&g.has(t)}),C=k.id();0===k.length||d[C]||(k=k[0],l.push(k),t.bfs&&(d[C]=!0,c.push(k)),h[C]=w,u[C]=u[i]+1)}};0!==l.length&&(0===(x=T())||1!==x););for(var w=o.collection(),k=0;k<c.length;k++){var C=c[k],E=h[C.id()];null!=E&&w.push(E),w.push(C)}return{path:o.collection(w),found:o.collection(a)}}},we={breadthFirstSearch:Te({bfs:!0}),depthFirstSearch:Te({dfs:!0})};we.bfs=we.breadthFirstSearch,we.dfs=we.depthFirstSearch;var ke,Ce,Ee,Se={exports:{}},_e=Se.exports;function Ae(){return ke||(ke=1,function(t){(function(){var e,r,n,i,a,o,s,l,c,h,u,d,p,f,g;n=Math.floor,h=Math.min,r=function(t,e){return t<e?-1:t>e?1:0},c=function(t,e,i,a,o){var s;if(null==i&&(i=0),null==o&&(o=r),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=t.length);i<a;)o(e,t[s=n((i+a)/2)])<0?a=s:i=s+1;return[].splice.apply(t,[i,i-i].concat(e)),e},o=function(t,e,n){return null==n&&(n=r),t.push(e),f(t,0,t.length-1,n)},a=function(t,e){var n,i;return null==e&&(e=r),n=t.pop(),t.length?(i=t[0],t[0]=n,g(t,0,e)):i=n,i},l=function(t,e,n){var i;return null==n&&(n=r),i=t[0],t[0]=e,g(t,0,n),i},s=function(t,e,n){var i;return null==n&&(n=r),t.length&&n(t[0],e)<0&&(e=(i=[t[0],e])[0],t[0]=i[1],g(t,0,n)),e},i=function(t,e){var i,a,o,s,l,c;for(null==e&&(e=r),l=[],a=0,o=(s=function(){c=[];for(var e=0,r=n(t.length/2);0<=r?e<r:e>r;0<=r?e++:e--)c.push(e);return c}.apply(this).reverse()).length;a<o;a++)i=s[a],l.push(g(t,i,e));return l},p=function(t,e,n){var i;if(null==n&&(n=r),-1!==(i=t.indexOf(e)))return f(t,0,i,n),g(t,i,n)},u=function(t,e,n){var a,o,l,c,h;if(null==n&&(n=r),!(o=t.slice(0,e)).length)return o;for(i(o,n),l=0,c=(h=t.slice(e)).length;l<c;l++)a=h[l],s(o,a,n);return o.sort(n).reverse()},d=function(t,e,n){var o,s,l,u,d,p,f,g,m;if(null==n&&(n=r),10*e<=t.length){if(!(l=t.slice(0,e).sort(n)).length)return l;for(s=l[l.length-1],u=0,p=(f=t.slice(e)).length;u<p;u++)n(o=f[u],s)<0&&(c(l,o,0,null,n),l.pop(),s=l[l.length-1]);return l}for(i(t,n),m=[],d=0,g=h(e,t.length);0<=g?d<g:d>g;0<=g?++d:--d)m.push(a(t,n));return m},f=function(t,e,n,i){var a,o,s;for(null==i&&(i=r),a=t[n];n>e&&i(a,o=t[s=n-1>>1])<0;)t[n]=o,n=s;return t[n]=a},g=function(t,e,n){var i,a,o,s,l;for(null==n&&(n=r),a=t.length,l=e,o=t[e],i=2*e+1;i<a;)(s=i+1)<a&&!(n(t[i],t[s])<0)&&(i=s),t[e]=t[i],i=2*(e=i)+1;return t[e]=o,f(t,l,e,n)},e=function(){function t(t){this.cmp=null!=t?t:r,this.nodes=[]}return t.push=o,t.pop=a,t.replace=l,t.pushpop=s,t.heapify=i,t.updateItem=p,t.nlargest=u,t.nsmallest=d,t.prototype.push=function(t){return o(this.nodes,t,this.cmp)},t.prototype.pop=function(){return a(this.nodes,this.cmp)},t.prototype.peek=function(){return this.nodes[0]},t.prototype.contains=function(t){return-1!==this.nodes.indexOf(t)},t.prototype.replace=function(t){return l(this.nodes,t,this.cmp)},t.prototype.pushpop=function(t){return s(this.nodes,t,this.cmp)},t.prototype.heapify=function(){return i(this.nodes,this.cmp)},t.prototype.updateItem=function(t){return p(this.nodes,t,this.cmp)},t.prototype.clear=function(){return this.nodes=[]},t.prototype.empty=function(){return 0===this.nodes.length},t.prototype.size=function(){return this.nodes.length},t.prototype.clone=function(){var e;return(e=new t).nodes=this.nodes.slice(0),e},t.prototype.toArray=function(){return this.nodes.slice(0)},t.prototype.insert=t.prototype.push,t.prototype.top=t.prototype.peek,t.prototype.front=t.prototype.peek,t.prototype.has=t.prototype.contains,t.prototype.copy=t.prototype.clone,t}(),t.exports=e}).call(_e)}(Se)),Se.exports}var Re,Le=Et(Ee?Ce:(Ee=1,Ce=Ae())),Ie=de({root:null,weight:function(t){return 1},directed:!1}),De={dijkstra:function(t){if(!Z(t)){var e=arguments;t={root:e[0],weight:e[1],directed:e[2]}}var r=Ie(t),n=r.root,i=r.weight,a=r.directed,o=this,s=i,l=V(n)?this.filter(n)[0]:n[0],c={},h={},u={},d=this.byGroup(),p=d.nodes,f=d.edges;f.unmergeBy(function(t){return t.isLoop()});for(var g=function(t){return c[t.id()]},m=function(t,e){c[t.id()]=e,y.updateItem(t)},y=new Le(function(t,e){return g(t)-g(e)}),v=0;v<p.length;v++){var b=p[v];c[b.id()]=b.same(l)?0:1/0,y.push(b)}for(var x=function(t,e){for(var r,n=(a?t.edgesTo(e):t.edgesWith(e)).intersect(f),i=1/0,o=0;o<n.length;o++){var l=n[o],c=s(l);(c<i||!r)&&(i=c,r=l)}return{edge:r,dist:i}};y.size()>0;){var T=y.pop(),w=g(T),k=T.id();if(u[k]=w,w!==1/0)for(var C=T.neighborhood().intersect(p),E=0;E<C.length;E++){var S=C[E],_=S.id(),A=x(T,S),R=w+A.dist;R<g(S)&&(m(S,R),h[_]={node:T,edge:A.edge})}}return{distanceTo:function(t){var e=V(t)?p.filter(t)[0]:t[0];return u[e.id()]},pathTo:function(t){var e=V(t)?p.filter(t)[0]:t[0],r=[],n=e,i=n.id();if(e.length>0)for(r.unshift(e);h[i];){var a=h[i];r.unshift(a.edge),r.unshift(a.node),i=(n=a.node).id()}return o.spawn(r)}}}},Ne={kruskal:function(t){t=t||function(t){return 1};for(var e=this.byGroup(),r=e.nodes,n=e.edges,i=r.length,a=new Array(i),o=r,s=function(t){for(var e=0;e<a.length;e++){if(a[e].has(t))return e}},l=0;l<i;l++)a[l]=this.spawn(r[l]);for(var c=n.sort(function(e,r){return t(e)-t(r)}),h=0;h<c.length;h++){var u=c[h],d=u.source()[0],p=u.target()[0],f=s(d),g=s(p),m=a[f],y=a[g];f!==g&&(o.merge(u),m.merge(y),a.splice(g,1))}return o}},Me=de({root:null,goal:null,weight:function(t){return 1},heuristic:function(t){return 0},directed:!1}),Oe={aStar:function(t){var e=this.cy(),r=Me(t),n=r.root,i=r.goal,a=r.heuristic,o=r.directed,s=r.weight;n=e.collection(n)[0],i=e.collection(i)[0];var l,c,h=n.id(),u=i.id(),d={},p={},f={},g=new Le(function(t,e){return p[t.id()]-p[e.id()]}),m=new be,y={},v={},b=function(t,e){g.push(t),m.add(e)},x=function(){l=g.pop(),c=l.id(),m.delete(c)},T=function(t){return m.has(t)};b(n,h),d[h]=0,p[h]=a(n);for(var w=0;g.size()>0;){if(x(),w++,c===u){for(var k=[],C=i,E=u,S=v[E];k.unshift(C),null!=S&&k.unshift(S),null!=(C=y[E]);)S=v[E=C.id()];return{found:!0,distance:d[c],path:this.spawn(k),steps:w}}f[c]=!0;for(var _=l._private.edges,A=0;A<_.length;A++){var R=_[A];if(this.hasElementWithId(R.id())&&(!o||R.data("source")===c)){var L=R.source(),I=R.target(),D=L.id()!==c?L:I,N=D.id();if(this.hasElementWithId(N)&&!f[N]){var M=d[c]+s(R);T(N)?M<d[N]&&(d[N]=M,p[N]=M+a(D),y[N]=l,v[N]=R):(d[N]=M,p[N]=M+a(D),b(D,N),y[N]=l,v[N]=R)}}}}return{found:!1,distance:void 0,path:void 0,steps:w}}},$e=de({weight:function(t){return 1},directed:!1}),Pe={floydWarshall:function(t){for(var e=this.cy(),r=$e(t),n=r.weight,i=r.directed,a=n,o=this.byGroup(),s=o.nodes,l=o.edges,c=s.length,h=c*c,u=function(t){return s.indexOf(t)},d=function(t){return s[t]},p=new Array(h),f=0;f<h;f++){var g=f%c,m=(f-g)/c;p[f]=m===g?0:1/0}for(var y=new Array(h),v=new Array(h),b=0;b<l.length;b++){var x=l[b],T=x.source()[0],w=x.target()[0];if(T!==w){var k=u(T),C=u(w),E=k*c+C,S=a(x);if(p[E]>S&&(p[E]=S,y[E]=C,v[E]=x),!i){var _=C*c+k;!i&&p[_]>S&&(p[_]=S,y[_]=k,v[_]=x)}}}for(var A=0;A<c;A++)for(var R=0;R<c;R++)for(var L=R*c+A,I=0;I<c;I++){var D=R*c+I,N=A*c+I;p[L]+p[N]<p[D]&&(p[D]=p[L]+p[N],y[D]=y[L])}var M=function(t){return u(function(t){return(V(t)?e.filter(t):t)[0]}(t))},O={distance:function(t,e){var r=M(t),n=M(e);return p[r*c+n]},path:function(t,r){var n=M(t),i=M(r),a=d(n);if(n===i)return a.collection();if(null==y[n*c+i])return e.collection();var o,s=e.collection(),l=n;for(s.merge(a);n!==i;)l=n,n=y[n*c+i],o=v[l*c+n],s.merge(o),s.merge(d(n));return s}};return O}},Be=de({weight:function(t){return 1},directed:!1,root:null}),Fe={bellmanFord:function(t){var e=this,r=Be(t),n=r.weight,i=r.directed,a=r.root,o=n,s=this,l=this.cy(),c=this.byGroup(),h=c.edges,u=c.nodes,d=u.length,p=new ye,f=!1,g=[];a=l.collection(a)[0],h.unmergeBy(function(t){return t.isLoop()});for(var m=h.length,y=function(t){var e=p.get(t.id());return e||(e={},p.set(t.id(),e)),e},v=function(t){return(V(t)?l.$(t):t)[0]},b=0;b<d;b++){var x=u[b],T=y(x);x.same(a)?T.dist=0:T.dist=1/0,T.pred=null,T.edge=null}for(var w=!1,k=function(t,e,r,n,i,a){var o=n.dist+a;o<i.dist&&!r.same(n.edge)&&(i.dist=o,i.pred=t,i.edge=r,w=!0)},C=1;C<d;C++){w=!1;for(var E=0;E<m;E++){var S=h[E],_=S.source(),A=S.target(),R=o(S),L=y(_),I=y(A);k(_,0,S,L,I,R),i||k(A,0,S,I,L,R)}if(!w)break}if(w)for(var D=[],N=0;N<m;N++){var M=h[N],O=M.source(),$=M.target(),P=o(M),B=y(O).dist,F=y($).dist;if(B+P<F||!i&&F+P<B){if(f||(se("Graph contains a negative weight cycle for Bellman-Ford"),f=!0),!1===t.findNegativeWeightCycles)break;var z=[];B+P<F&&z.push(O),!i&&F+P<B&&z.push($);for(var K=z.length,j=0;j<K;j++){var q=z[j],W=[q];W.push(y(q).edge);for(var U=y(q).pred;-1===W.indexOf(U);)W.push(U),W.push(y(U).edge),U=y(U).pred;for(var G=(W=W.slice(W.indexOf(U)))[0].id(),Y=0,H=2;H<W.length;H+=2)W[H].id()<G&&(G=W[H].id(),Y=H);(W=W.slice(Y).concat(W.slice(0,Y))).push(W[0]);var X=W.map(function(t){return t.id()}).join(",");-1===D.indexOf(X)&&(g.push(s.spawn(W)),D.push(X))}}}return{distanceTo:function(t){return y(v(t)).dist},pathTo:function(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=[],i=v(t);;){if(null==i)return e.spawn();var o=y(i),l=o.edge,c=o.pred;if(n.unshift(i[0]),i.same(r)&&n.length>0)break;null!=l&&n.unshift(l),i=c}return s.spawn(n)},hasNegativeWeightCycle:f,negativeWeightCycles:g}}},ze=Math.sqrt(2),Ke=function(t,e,r){0===r.length&&ae("Karger-Stein must be run on a connected (sub)graph");for(var n=r[t],i=n[1],a=n[2],o=e[i],s=e[a],l=r,c=l.length-1;c>=0;c--){var h=l[c],u=h[1],d=h[2];(e[u]===o&&e[d]===s||e[u]===s&&e[d]===o)&&l.splice(c,1)}for(var p=0;p<l.length;p++){var f=l[p];f[1]===s?(l[p]=f.slice(),l[p][1]=o):f[2]===s&&(l[p]=f.slice(),l[p][2]=o)}for(var g=0;g<e.length;g++)e[g]===s&&(e[g]=o);return l},je=function(t,e,r,n){for(;r>n;){var i=Math.floor(Math.random()*e.length);e=Ke(i,t,e),r--}return e},qe={kargerStein:function(){var t=this,e=this.byGroup(),r=e.nodes,n=e.edges;n.unmergeBy(function(t){return t.isLoop()});var i=r.length,a=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/ze);if(!(i<2)){for(var l=[],c=0;c<a;c++){var h=n[c];l.push([c,r.indexOf(h.source()),r.indexOf(h.target())])}for(var u=1/0,d=[],p=new Array(i),f=new Array(i),g=new Array(i),m=function(t,e){for(var r=0;r<i;r++)e[r]=t[r]},y=0;y<=o;y++){for(var v=0;v<i;v++)f[v]=v;var b=je(f,l.slice(),i,s),x=b.slice();m(f,g);var T=je(f,b,s,2),w=je(g,x,s,2);T.length<=w.length&&T.length<u?(u=T.length,d=T,m(f,p)):w.length<=T.length&&w.length<u&&(u=w.length,d=w,m(g,p))}for(var k=this.spawn(d.map(function(t){return n[t[0]]})),C=this.spawn(),E=this.spawn(),S=p[0],_=0;_<p.length;_++){var A=p[_],R=r[_];A===S?C.merge(R):E.merge(R)}var L=function(e){var r=t.spawn();return e.forEach(function(e){r.merge(e),e.connectedEdges().forEach(function(e){t.contains(e)&&!k.contains(e)&&r.merge(e)})}),r},I=[L(C),L(E)];return{cut:k,components:I,partition1:C,partition2:E}}ae("At least 2 nodes are required for Karger-Stein algorithm")}},We=function(t,e,r){return{x:t.x*e+r.x,y:t.y*e+r.y}},Ue=function(t,e,r){return{x:(t.x-r.x)/e,y:(t.y-r.y)/e}},Ge=function(t){return{x:t[0],y:t[1]}},Ye=function(t,e){return Math.atan2(e,t)-Math.PI/2},Ve=Math.log2||function(t){return Math.log(t)/Math.log(2)},He=function(t){return t>0?1:t<0?-1:0},Xe=function(t,e){return Math.sqrt(Ze(t,e))},Ze=function(t,e){var r=e.x-t.x,n=e.y-t.y;return r*r+n*n},Qe=function(t){for(var e=t.length,r=0,n=0;n<e;n++)r+=t[n];for(var i=0;i<e;i++)t[i]=t[i]/r;return t},Je=function(t,e,r,n){return(1-n)*(1-n)*t+2*(1-n)*n*e+n*n*r},tr=function(t,e,r,n){return{x:Je(t.x,e.x,r.x,n),y:Je(t.y,e.y,r.y,n)}},er=function(t,e,r){return Math.max(t,Math.min(r,e))},rr=function(t){if(null==t)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=t.x1&&null!=t.y1){if(null!=t.x2&&null!=t.y2&&t.x2>=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(null!=t.w&&null!=t.h&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},nr=function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},ir=function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},ar=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.x1-=e,t.x2+=e,t.y1-=e,t.y2+=e,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},or=function(t){var e,r,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)e=r=n=i=a[0];else if(2===a.length)e=n=a[0],i=r=a[1];else if(4===a.length){var o=l(a,4);e=o[0],r=o[1],n=o[2],i=o[3]}return t.x1-=i,t.x2+=r,t.y1-=e,t.y2+=n,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},sr=function(t,e){t.x1=e.x1,t.y1=e.y1,t.x2=e.x2,t.y2=e.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},lr=function(t,e){return!(t.x1>e.x2)&&(!(e.x1>t.x2)&&(!(t.x2<e.x1)&&(!(e.x2<t.x1)&&(!(t.y2<e.y1)&&(!(e.y2<t.y1)&&(!(t.y1>e.y2)&&!(e.y1>t.y2)))))))},cr=function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},hr=function(t,e){return cr(t,e.x,e.y)},ur=function(t,e){return cr(t,e.x1,e.y1)&&cr(t,e.x2,e.y2)},dr=null!==(Re=Math.hypot)&&void 0!==Re?Re:function(t,e){return Math.sqrt(t*t+e*e)};function pr(t,e,r,n,i,a){var o=function(t,e){if(t.length<3)throw new Error("Need at least 3 vertices");var r=function(t,e){return{x:t.x+e.x,y:t.y+e.y}},n=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},i=function(t,e){return{x:t.x*e,y:t.y*e}},a=function(t,e){return t.x*e.y-t.y*e.x},o=function(t){var e=dr(t.x,t.y);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},s=function(t,e,o,s){var l=n(e,t),c=n(s,o),h=a(l,c);if(Math.abs(h)<1e-9)return r(t,i(l,.5));var u=a(n(o,t),c)/h;return r(t,i(l,u))},l=t.map(function(t){return{x:t.x,y:t.y}});(function(t){for(var e=0,r=0;r<t.length;r++){var n=t[r],i=t[(r+1)%t.length];e+=n.x*i.y-i.x*n.y}return e/2})(l)<0&&l.reverse();for(var c=l.length,h=[],u=0;u<c;u++){var d=l[u],p=l[(u+1)%c],f=n(p,d),g=o({x:f.y,y:-f.x});h.push(g)}for(var m=h.map(function(t,n){return{p1:r(l[n],i(t,e)),p2:r(l[(n+1)%c],i(t,e))}}),y=[],v=0;v<c;v++){var b=m[(v-1+c)%c],x=m[v],T=s(b.p1,b.p2,x.p1,x.p2);y.push(T)}return y}(_r(t,e,r,n,i),a),s=rr();return o.forEach(function(t){return ir(s,t.x,t.y)}),s}var fr=function(t,e,r,n,i,a,o){var s,l,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",h="auto"===c?Nr(i,a):c,u=i/2,d=a/2,p=(h=Math.min(h,u,d))!==u,f=h!==d;if(p){var g=n-d-o;if((s=Sr(t,e,r,n,r-u+h-o,g,r+u-h+o,g,!1)).length>0)return s}if(f){var m=r+u+o;if((s=Sr(t,e,r,n,m,n-d+h-o,m,n+d-h+o,!1)).length>0)return s}if(p){var y=n+d+o;if((s=Sr(t,e,r,n,r-u+h-o,y,r+u-h+o,y,!1)).length>0)return s}if(f){var v=r-u-o;if((s=Sr(t,e,r,n,v,n-d+h-o,v,n+d-h+o,!1)).length>0)return s}var b=r-u+h,x=n-d+h;if((l=Cr(t,e,r,n,b,x,h+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var T=r+u-h,w=n-d+h;if((l=Cr(t,e,r,n,T,w,h+o)).length>0&&l[0]>=T&&l[1]<=w)return[l[0],l[1]];var k=r+u-h,C=n+d-h;if((l=Cr(t,e,r,n,k,C,h+o)).length>0&&l[0]>=k&&l[1]>=C)return[l[0],l[1]];var E=r-u+h,S=n+d-h;return(l=Cr(t,e,r,n,E,S,h+o)).length>0&&l[0]<=E&&l[1]>=S?[l[0],l[1]]:[]},gr=function(t,e,r,n,i,a,o){var s=o,l=Math.min(r,i),c=Math.max(r,i),h=Math.min(n,a),u=Math.max(n,a);return l-s<=t&&t<=c+s&&h-s<=e&&e<=u+s},mr=function(t,e,r,n,i,a,o,s,l){var c=Math.min(r,o,i)-l,h=Math.max(r,o,i)+l,u=Math.min(n,s,a)-l,d=Math.max(n,s,a)+l;return!(t<c||t>h||e<u||e>d)},yr=function(t,e,r,n,i,a,o,s){var l=[];!function(t,e,r,n,i){var a,o,s,l,c,h,u,d;0===t&&(t=1e-5),s=-27*(n/=t)+(e/=t)*(9*(r/=t)-e*e*2),a=(o=(3*r-e*e)/9)*o*o+(s/=54)*s,i[1]=0,u=e/3,a>0?(c=(c=s+Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),h=(h=s-Math.sqrt(a))<0?-Math.pow(-h,1/3):Math.pow(h,1/3),i[0]=-u+c+h,u+=(c+h)/2,i[4]=i[2]=-u,u=Math.sqrt(3)*(-h+c)/2,i[3]=u,i[5]=-u):(i[5]=i[3]=0,0===a?(d=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*d-u,i[4]=i[2]=-(d+u)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),d=2*Math.sqrt(o),i[0]=-u+d*Math.cos(l/3),i[2]=-u+d*Math.cos((l+2*Math.PI)/3),i[4]=-u+d*Math.cos((l+4*Math.PI)/3)))}(1*r*r-4*r*i+2*r*o+4*i*i-4*i*o+o*o+n*n-4*n*a+2*n*s+4*a*a-4*a*s+s*s,9*r*i-3*r*r-3*r*o-6*i*i+3*i*o+9*n*a-3*n*n-3*n*s-6*a*a+3*a*s,3*r*r-6*r*i+r*o-r*t+2*i*i+2*i*t-o*t+3*n*n-6*n*a+n*s-n*e+2*a*a+2*a*e-s*e,1*r*i-r*r+r*t-i*t+n*a-n*n+n*e-a*e,l);for(var c=[],h=0;h<6;h+=2)Math.abs(l[h+1])<1e-7&&l[h]>=0&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var u,d,p,f=-1,g=0;g<c.length;g++)u=Math.pow(1-c[g],2)*r+2*(1-c[g])*c[g]*i+c[g]*c[g]*o,d=Math.pow(1-c[g],2)*n+2*(1-c[g])*c[g]*a+c[g]*c[g]*s,p=Math.pow(u-t,2)+Math.pow(d-e,2),f>=0?p<f&&(f=p):f=p;return f},vr=function(t,e,r,n,i,a){var o=[t-r,e-n],s=[i-r,a-n],l=s[0]*s[0]+s[1]*s[1],c=o[0]*o[0]+o[1]*o[1],h=o[0]*s[0]+o[1]*s[1],u=h*h/l;return h<0?c:u>l?(t-i)*(t-i)+(e-a)*(e-a):c-u},br=function(t,e,r){for(var n,i,a,o,s=0,l=0;l<r.length/2;l++)if(n=r[2*l],i=r[2*l+1],l+1<r.length/2?(a=r[2*(l+1)],o=r[2*(l+1)+1]):(a=r[2*(l+1-r.length/2)],o=r[2*(l+1-r.length/2)+1]),n==t&&a==t);else{if(!(n>=t&&t>=a||n<=t&&t<=a))continue;(t-n)/(a-n)*(o-i)+i>e&&s++}return s%2!=0},xr=function(t,e,r,n,i,a,o,s,l){var c,h=new Array(r.length);null!=s[0]?(c=Math.atan(s[1]/s[0]),s[0]<0?c+=Math.PI/2:c=-c-Math.PI/2):c=s;for(var u,d=Math.cos(-c),p=Math.sin(-c),f=0;f<h.length/2;f++)h[2*f]=a/2*(r[2*f]*d-r[2*f+1]*p),h[2*f+1]=o/2*(r[2*f+1]*d+r[2*f]*p),h[2*f]+=n,h[2*f+1]+=i;if(l>0){var g=wr(h,-l);u=Tr(g)}else u=h;return br(t,e,u)},Tr=function(t){for(var e,r,n,i,a,o,s,l,c=new Array(t.length/2),h=0;h<t.length/4;h++){e=t[4*h],r=t[4*h+1],n=t[4*h+2],i=t[4*h+3],h<t.length/4-1?(a=t[4*(h+1)],o=t[4*(h+1)+1],s=t[4*(h+1)+2],l=t[4*(h+1)+3]):(a=t[0],o=t[1],s=t[2],l=t[3]);var u=Sr(e,r,n,i,a,o,s,l,!0);c[2*h]=u[0],c[2*h+1]=u[1]}return c},wr=function(t,e){for(var r,n,i,a,o=new Array(2*t.length),s=0;s<t.length/2;s++){r=t[2*s],n=t[2*s+1],s<t.length/2-1?(i=t[2*(s+1)],a=t[2*(s+1)+1]):(i=t[0],a=t[1]);var l=a-n,c=-(i-r),h=Math.sqrt(l*l+c*c),u=l/h,d=c/h;o[4*s]=r+u*e,o[4*s+1]=n+d*e,o[4*s+2]=i+u*e,o[4*s+3]=a+d*e}return o},kr=function(t,e,r,n,i,a,o){return t-=i,e-=a,(t/=r/2+o)*t+(e/=n/2+o)*e<=1},Cr=function(t,e,r,n,i,a,o){var s=[r-t,n-e],l=[t-i,e-a],c=s[0]*s[0]+s[1]*s[1],h=2*(l[0]*s[0]+l[1]*s[1]),u=h*h-4*c*(l[0]*l[0]+l[1]*l[1]-o*o);if(u<0)return[];var d=(-h+Math.sqrt(u))/(2*c),p=(-h-Math.sqrt(u))/(2*c),f=Math.min(d,p),g=Math.max(d,p),m=[];if(f>=0&&f<=1&&m.push(f),g>=0&&g<=1&&m.push(g),0===m.length)return[];var y=m[0]*s[0]+t,v=m[0]*s[1]+e;return m.length>1?m[0]==m[1]?[y,v]:[y,v,m[1]*s[0]+t,m[1]*s[1]+e]:[y,v]},Er=function(t,e,r){return e<=t&&t<=r||r<=t&&t<=e?t:t<=e&&e<=r||r<=e&&e<=t?e:r},Sr=function(t,e,r,n,i,a,o,s,l){var c=t-i,h=r-t,u=o-i,d=e-a,p=n-e,f=s-a,g=u*d-f*c,m=h*d-p*c,y=f*h-u*p;if(0!==y){var v=g/y,b=m/y,x=-.001;return x<=v&&v<=1.001&&x<=b&&b<=1.001||l?[t+v*h,e+v*p]:[]}return 0===g||0===m?Er(t,r,o)===o?[o,s]:Er(t,r,i)===i?[i,a]:Er(i,o,r)===r?[r,n]:[]:[]},_r=function(t,e,r,n,i){var a=[],o=n/2,s=i/2,l=e,c=r;a.push({x:l+o*t[0],y:c+s*t[1]});for(var h=1;h<t.length/2;h++)a.push({x:l+o*t[2*h],y:c+s*t[2*h+1]});return a},Ar=function(t,e,r,n,i,a,o,s){var l,c,h,u,d,p,f=[],g=new Array(r.length),m=!0;if(null==a&&(m=!1),m){for(var y=0;y<g.length/2;y++)g[2*y]=r[2*y]*a+n,g[2*y+1]=r[2*y+1]*o+i;if(s>0){var v=wr(g,-s);c=Tr(v)}else c=g}else c=r;for(var b=0;b<c.length/2;b++)h=c[2*b],u=c[2*b+1],b<c.length/2-1?(d=c[2*(b+1)],p=c[2*(b+1)+1]):(d=c[0],p=c[1]),0!==(l=Sr(t,e,n,i,h,u,d,p)).length&&f.push(l[0],l[1]);return f},Rr=function(t,e,r){var n=[t[0]-e[0],t[1]-e[1]],i=Math.sqrt(n[0]*n[0]+n[1]*n[1]),a=(i-r)/i;return a<0&&(a=1e-5),[e[0]+a*n[0],e[1]+a*n[1]]},Lr=function(t,e){var r=Dr(t,e);return r=Ir(r)},Ir=function(t){for(var e,r,n=t.length/2,i=1/0,a=1/0,o=-1/0,s=-1/0,l=0;l<n;l++)e=t[2*l],r=t[2*l+1],i=Math.min(i,e),o=Math.max(o,e),a=Math.min(a,r),s=Math.max(s,r);for(var c=2/(o-i),h=2/(s-a),u=0;u<n;u++)e=t[2*u]=t[2*u]*c,r=t[2*u+1]=t[2*u+1]*h,i=Math.min(i,e),o=Math.max(o,e),a=Math.min(a,r),s=Math.max(s,r);if(a<-1)for(var d=0;d<n;d++)r=t[2*d+1]=t[2*d+1]+(-1-a);return t},Dr=function(t,e){var r=1/t*2*Math.PI,n=t%2==0?Math.PI/2+r/2:Math.PI/2;n+=e;for(var i,a=new Array(2*t),o=0;o<t;o++)i=o*r+n,a[2*o]=Math.cos(i),a[2*o+1]=Math.sin(-i);return a},Nr=function(t,e){return Math.min(t/4,e/4,8)},Mr=function(t,e){return Math.min(t/10,e/10,8)},Or=function(t,e){return{heightOffset:Math.min(15,.05*e),widthOffset:Math.min(100,.25*t),ctrlPtOffsetPct:.05}};function $r(t,e){function r(t){for(var e=[],r=0;r<t.length;r++){var n=t[r],i=t[(r+1)%t.length],a={x:i.x-n.x,y:i.y-n.y},o={x:-a.y,y:a.x},s=Math.sqrt(o.x*o.x+o.y*o.y);e.push({x:o.x/s,y:o.y/s})}return e}function n(t,e){var r,n=1/0,i=-1/0,a=o(t);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=s.x*e.x+s.y*e.y;n=Math.min(n,l),i=Math.max(i,l)}}catch(c){a.e(c)}finally{a.f()}return{min:n,max:i}}function i(t,e){return!(t.max<e.min||e.max<t.min)}var a,s=o([].concat(c(r(t)),c(r(e))));try{for(s.s();!(a=s.n()).done;){var l=a.value;if(!i(n(t,l),n(e,l)))return!1}}catch(h){s.e(h)}finally{s.f()}return!0}var Pr=de({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(t){return 1}}),Br={pageRank:function(t){for(var e=Pr(t),r=e.dampingFactor,n=e.precision,i=e.iterations,a=e.weight,o=this._private.cy,s=this.byGroup(),l=s.nodes,c=s.edges,h=l.length,u=h*h,d=c.length,p=new Array(u),f=new Array(h),g=(1-r)/h,m=0;m<h;m++){for(var y=0;y<h;y++){p[m*h+y]=0}f[m]=0}for(var v=0;v<d;v++){var b=c[v],x=b.data("source"),T=b.data("target");if(x!==T){var w=l.indexOfId(x),k=l.indexOfId(T),C=a(b);p[k*h+w]+=C,f[w]+=C}}for(var E=1/h+g,S=0;S<h;S++)if(0===f[S])for(var _=0;_<h;_++){p[_*h+S]=E}else for(var A=0;A<h;A++){var R=A*h+S;p[R]=p[R]/f[S]+g}for(var L,I=new Array(h),D=new Array(h),N=0;N<h;N++)I[N]=1;for(var M=0;M<i;M++){for(var O=0;O<h;O++)D[O]=0;for(var $=0;$<h;$++)for(var P=0;P<h;P++){var B=$*h+P;D[$]+=p[B]*I[P]}Qe(D),L=I,I=D,D=L;for(var F=0,z=0;z<h;z++){var K=L[z]-I[z];F+=K*K}if(F<n)break}return{rank:function(t){return t=o.collection(t)[0],I[l.indexOf(t)]}}}},Fr=de({root:null,weight:function(t){return 1},directed:!1,alpha:0}),zr={degreeCentralityNormalized:function(t){t=Fr(t);var e=this.cy(),r=this.nodes(),n=r.length;if(t.directed){for(var i={},a={},o=0,s=0,l=0;l<n;l++){var c=r[l],h=c.id();t.root=c;var u=this.degreeCentrality(t);o<u.indegree&&(o=u.indegree),s<u.outdegree&&(s=u.outdegree),i[h]=u.indegree,a[h]=u.outdegree}return{indegree:function(t){return 0==o?0:(V(t)&&(t=e.filter(t)),i[t.id()]/o)},outdegree:function(t){return 0===s?0:(V(t)&&(t=e.filter(t)),a[t.id()]/s)}}}for(var d={},p=0,f=0;f<n;f++){var g=r[f];t.root=g;var m=this.degreeCentrality(t);p<m.degree&&(p=m.degree),d[g.id()]=m.degree}return{degree:function(t){return 0===p?0:(V(t)&&(t=e.filter(t)),d[t.id()]/p)}}},degreeCentrality:function(t){t=Fr(t);var e=this.cy(),r=this,n=t,i=n.root,a=n.weight,o=n.directed,s=n.alpha;if(i=e.collection(i)[0],o){for(var l=i.connectedEdges(),c=l.filter(function(t){return t.target().same(i)&&r.has(t)}),h=l.filter(function(t){return t.source().same(i)&&r.has(t)}),u=c.length,d=h.length,p=0,f=0,g=0;g<c.length;g++)p+=a(c[g]);for(var m=0;m<h.length;m++)f+=a(h[m]);return{indegree:Math.pow(u,1-s)*Math.pow(p,s),outdegree:Math.pow(d,1-s)*Math.pow(f,s)}}for(var y=i.connectedEdges().intersection(r),v=y.length,b=0,x=0;x<y.length;x++)b+=a(y[x]);return{degree:Math.pow(v,1-s)*Math.pow(b,s)}}};zr.dc=zr.degreeCentrality,zr.dcn=zr.degreeCentralityNormalised=zr.degreeCentralityNormalized;var Kr=de({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),jr={closenessCentralityNormalized:function(t){for(var e=Kr(t),r=e.harmonic,n=e.weight,i=e.directed,a=this.cy(),o={},s=0,l=this.nodes(),c=this.floydWarshall({weight:n,directed:i}),h=0;h<l.length;h++){for(var u=0,d=l[h],p=0;p<l.length;p++)if(h!==p){var f=c.distance(d,l[p]);u+=r?1/f:f}r||(u=1/u),s<u&&(s=u),o[d.id()]=u}return{closeness:function(t){return 0==s?0:(t=V(t)?a.filter(t)[0].id():t.id(),o[t]/s)}}},closenessCentrality:function(t){var e=Kr(t),r=e.root,n=e.weight,i=e.directed,a=e.harmonic;r=this.filter(r)[0];for(var o=this.dijkstra({root:r,weight:n,directed:i}),s=0,l=this.nodes(),c=0;c<l.length;c++){var h=l[c];if(!h.same(r)){var u=o.distanceTo(h);s+=a?1/u:u}}return a?s:1/s}};jr.cc=jr.closenessCentrality,jr.ccn=jr.closenessCentralityNormalised=jr.closenessCentralityNormalized;var qr=de({weight:null,directed:!1}),Wr={betweennessCentrality:function(t){for(var e=qr(t),r=e.directed,n=e.weight,i=null!=n,a=this.cy(),o=this.nodes(),s={},l={},c=0,h=function(t,e){l[t]=e,e>c&&(c=e)},u=function(t){return l[t]},d=0;d<o.length;d++){var p=o[d],f=p.id();s[f]=r?p.outgoers().nodes():p.openNeighborhood().nodes(),h(f,0)}for(var g=function(){for(var t=o[m].id(),e=[],r={},l={},c={},d=new Le(function(t,e){return c[t]-c[e]}),p=0;p<o.length;p++){var f=o[p].id();r[f]=[],l[f]=0,c[f]=1/0}for(l[t]=1,c[t]=0,d.push(t);!d.empty();){var g=d.pop();if(e.push(g),i)for(var y=0;y<s[g].length;y++){var v=s[g][y],b=a.getElementById(g),x=void 0;x=b.edgesTo(v).length>0?b.edgesTo(v)[0]:v.edgesTo(b)[0];var T=n(x);v=v.id(),c[v]>c[g]+T&&(c[v]=c[g]+T,d.nodes.indexOf(v)<0?d.push(v):d.updateItem(v),l[v]=0,r[v]=[]),c[v]==c[g]+T&&(l[v]=l[v]+l[g],r[v].push(g))}else for(var w=0;w<s[g].length;w++){var k=s[g][w].id();c[k]==1/0&&(d.push(k),c[k]=c[g]+1),c[k]==c[g]+1&&(l[k]=l[k]+l[g],r[k].push(g))}}for(var C={},E=0;E<o.length;E++)C[o[E].id()]=0;for(;e.length>0;){for(var S=e.pop(),_=0;_<r[S].length;_++){var A=r[S][_];C[A]=C[A]+l[A]/l[S]*(1+C[S])}S!=o[m].id()&&h(S,u(S)+C[S])}},m=0;m<o.length;m++)g();var y={betweenness:function(t){var e=a.collection(t).id();return u(e)},betweennessNormalized:function(t){if(0==c)return 0;var e=a.collection(t).id();return u(e)/c}};return y.betweennessNormalised=y.betweennessNormalized,y}};Wr.bc=Wr.betweennessCentrality;var Ur=de({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),Gr=function(t,e){for(var r=0,n=0;n<e.length;n++)r+=e[n](t);return r},Yr=function(t,e){for(var r,n=0;n<e;n++){r=0;for(var i=0;i<e;i++)r+=t[i*e+n];for(var a=0;a<e;a++)t[a*e+n]=t[a*e+n]/r}},Vr=function(t,e,r){for(var n=new Array(r*r),i=0;i<r;i++){for(var a=0;a<r;a++)n[i*r+a]=0;for(var o=0;o<r;o++)for(var s=0;s<r;s++)n[i*r+s]+=t[i*r+o]*e[o*r+s]}return n},Hr=function(t,e,r){for(var n=t.slice(0),i=1;i<r;i++)t=Vr(t,n,e);return t},Xr=function(t,e,r){for(var n=new Array(e*e),i=0;i<e*e;i++)n[i]=Math.pow(t[i],r);return Yr(n,e),n},Zr=function(t,e,r,n){for(var i=0;i<r;i++){if(Math.round(t[i]*Math.pow(10,n))/Math.pow(10,n)!==Math.round(e[i]*Math.pow(10,n))/Math.pow(10,n))return!1}return!0},Qr=function(t,e){for(var r=0;r<t.length;r++)if(!e[r]||t[r].id()!==e[r].id())return!1;return!0},Jr=function(t){for(var e=this.nodes(),r=this.edges(),n=this.cy(),i=function(t){return Ur(t)}(t),a={},o=0;o<e.length;o++)a[e[o].id()]=o;for(var s,l=e.length,c=l*l,h=new Array(c),u=0;u<c;u++)h[u]=0;for(var d=0;d<r.length;d++){var p=r[d],f=a[p.source().id()],g=a[p.target().id()],m=Gr(p,i.attributes);h[f*l+g]+=m,h[g*l+f]+=m}!function(t,e,r){for(var n=0;n<e;n++)t[n*e+n]=r}(h,l,i.multFactor),Yr(h,l);for(var y=!0,v=0;y&&v<i.maxIterations;)y=!1,s=Hr(h,l,i.expandFactor),h=Xr(s,l,i.inflateFactor),Zr(h,s,c,4)||(y=!0),v++;var b=function(t,e,r,n){for(var i=[],a=0;a<e;a++){for(var o=[],s=0;s<e;s++)Math.round(1e3*t[a*e+s])/1e3>0&&o.push(r[s]);0!==o.length&&i.push(n.collection(o))}return i}(h,l,e,n);return b=function(t){for(var e=0;e<t.length;e++)for(var r=0;r<t.length;r++)e!=r&&Qr(t[e],t[r])&&t.splice(r,1);return t}(b),b},tn={markovClustering:Jr,mcl:Jr},en=function(t){return t},rn=function(t,e){return Math.abs(e-t)},nn=function(t,e,r){return t+rn(e,r)},an=function(t,e,r){return t+Math.pow(r-e,2)},on=function(t){return Math.sqrt(t)},sn=function(t,e,r){return Math.max(t,rn(e,r))},ln=function(t,e,r,n,i){for(var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:en,o=n,s=0;s<t;s++)o=i(o,e(s),r(s));return a(o)},cn={euclidean:function(t,e,r){return t>=2?ln(t,e,r,0,an,on):ln(t,e,r,0,nn)},squaredEuclidean:function(t,e,r){return ln(t,e,r,0,an)},manhattan:function(t,e,r){return ln(t,e,r,0,nn)},max:function(t,e,r){return ln(t,e,r,-1/0,sn)}};function hn(t,e,r,n,i,a){var o;return o=H(t)?t:cn[t]||cn.euclidean,0===e&&H(t)?o(i,a):o(e,r,n,i,a)}cn["squared-euclidean"]=cn.squaredEuclidean,cn.squaredeuclidean=cn.squaredEuclidean;var un=de({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),dn=function(t){return un(t)},pn=function(t,e,r,n,i){var a="kMedoids"!==i?function(t){return r[t]}:function(t){return n[t](r)},o=r,s=e;return hn(t,n.length,a,function(t){return n[t](e)},o,s)},fn=function(t,e,r){for(var n=r.length,i=new Array(n),a=new Array(n),o=new Array(e),s=null,l=0;l<n;l++)i[l]=t.min(r[l]).value,a[l]=t.max(r[l]).value;for(var c=0;c<e;c++){s=[];for(var h=0;h<n;h++)s[h]=Math.random()*(a[h]-i[h])+i[h];o[c]=s}return o},gn=function(t,e,r,n,i){for(var a=1/0,o=0,s=0;s<e.length;s++){var l=pn(r,t,e[s],n,i);l<a&&(a=l,o=s)}return o},mn=function(t,e,r){for(var n=[],i=null,a=0;a<e.length;a++)r[(i=e[a]).id()]===t&&n.push(i);return n},yn=function(t,e,r){return Math.abs(e-t)<=r},vn=function(t,e,r){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++){if(Math.abs(t[n][i]-e[n][i])>r)return!1}return!0},bn=function(t,e,r){for(var n=0;n<r;n++)if(t===e[n])return!0;return!1},xn=function(t,e){var r=new Array(e);if(t.length<50)for(var n=0;n<e;n++){for(var i=t[Math.floor(Math.random()*t.length)];bn(i,r,n);)i=t[Math.floor(Math.random()*t.length)];r[n]=i}else for(var a=0;a<e;a++)r[a]=t[Math.floor(Math.random()*t.length)];return r},Tn=function(t,e,r){for(var n=0,i=0;i<e.length;i++)n+=pn("manhattan",e[i],t,r,"kMedoids");return n},wn=function(t,e,r,n,i){for(var a,o,s=0;s<e.length;s++)for(var l=0;l<t.length;l++)n[s][l]=Math.pow(r[s][l],i.m);for(var c=0;c<t.length;c++)for(var h=0;h<i.attributes.length;h++){a=0,o=0;for(var u=0;u<e.length;u++)a+=n[u][c]*i.attributes[h](e[u]),o+=n[u][c];t[c][h]=a/o}},kn=function(t,e,r,n,i){for(var a=0;a<t.length;a++)e[a]=t[a].slice();for(var o,s,l,c=2/(i.m-1),h=0;h<r.length;h++)for(var u=0;u<n.length;u++){o=0;for(var d=0;d<r.length;d++)s=pn(i.distance,n[u],r[h],i.attributes,"cmeans"),l=pn(i.distance,n[u],r[d],i.attributes,"cmeans"),o+=Math.pow(s/l,c);t[u][h]=1/o}},Cn=function(t){var e,r,n,i,a,o=this.cy(),s=this.nodes(),l=dn(t);i=new Array(s.length);for(var c=0;c<s.length;c++)i[c]=new Array(l.k);n=new Array(s.length);for(var h=0;h<s.length;h++)n[h]=new Array(l.k);for(var u=0;u<s.length;u++){for(var d=0,p=0;p<l.k;p++)n[u][p]=Math.random(),d+=n[u][p];for(var f=0;f<l.k;f++)n[u][f]=n[u][f]/d}r=new Array(l.k);for(var g=0;g<l.k;g++)r[g]=new Array(l.attributes.length);a=new Array(s.length);for(var m=0;m<s.length;m++)a[m]=new Array(l.k);for(var y=!0,v=0;y&&v<l.maxIterations;)y=!1,wn(r,s,n,a,l),kn(n,i,r,s,l),vn(n,i,l.sensitivityThreshold)||(y=!0),v++;return e=function(t,e,r,n){for(var i,a,o=new Array(r.k),s=0;s<o.length;s++)o[s]=[];for(var l=0;l<e.length;l++){i=-1/0,a=-1;for(var c=0;c<e[0].length;c++)e[l][c]>i&&(i=e[l][c],a=c);o[a].push(t[l])}for(var h=0;h<o.length;h++)o[h]=n.collection(o[h]);return o}(s,n,l,o),{clusters:e,degreeOfMembership:n}},En={kMeans:function(t){var e,r=this.cy(),n=this.nodes(),i=null,a=dn(t),o=new Array(a.k),s={};a.testMode?"number"==typeof a.testCentroids?(a.testCentroids,e=fn(n,a.k,a.attributes)):e="object"===u(a.testCentroids)?a.testCentroids:fn(n,a.k,a.attributes):e=fn(n,a.k,a.attributes);for(var l=!0,c=0;l&&c<a.maxIterations;){for(var h=0;h<n.length;h++)s[(i=n[h]).id()]=gn(i,e,a.distance,a.attributes,"kMeans");l=!1;for(var d=0;d<a.k;d++){var p=mn(d,n,s);if(0!==p.length){for(var f=a.attributes.length,g=e[d],m=new Array(f),y=new Array(f),v=0;v<f;v++){y[v]=0;for(var b=0;b<p.length;b++)i=p[b],y[v]+=a.attributes[v](i);m[v]=y[v]/p.length,yn(m[v],g[v],a.sensitivityThreshold)||(l=!0)}e[d]=m,o[d]=r.collection(p)}}c++}return o},kMedoids:function(t){var e,r,n=this.cy(),i=this.nodes(),a=null,o=dn(t),s=new Array(o.k),l={},c=new Array(o.k);o.testMode?"number"==typeof o.testCentroids||(e="object"===u(o.testCentroids)?o.testCentroids:xn(i,o.k)):e=xn(i,o.k);for(var h=!0,d=0;h&&d<o.maxIterations;){for(var p=0;p<i.length;p++)l[(a=i[p]).id()]=gn(a,e,o.distance,o.attributes,"kMedoids");h=!1;for(var f=0;f<e.length;f++){var g=mn(f,i,l);if(0!==g.length){c[f]=Tn(e[f],g,o.attributes);for(var m=0;m<g.length;m++)(r=Tn(g[m],g,o.attributes))<c[f]&&(c[f]=r,e[f]=g[m],h=!0);s[f]=n.collection(g)}}d++}return s},fuzzyCMeans:Cn,fcm:Cn},Sn=de({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),_n={single:"min",complete:"max"},An=function(t,e,r,n,i){for(var a,o=0,s=1/0,l=i.attributes,c=function(t,e){return hn(i.distance,l.length,function(e){return l[e](t)},function(t){return l[t](e)},t,e)},h=0;h<t.length;h++){var u=t[h].key,d=r[u][n[u]];d<s&&(o=u,s=d)}if("threshold"===i.mode&&s>=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p,f=e[o],g=e[n[o]];p="dendrogram"===i.mode?{left:f,right:g,key:f.key}:{value:f.value.concat(g.value),key:f.key},t[f.index]=p,t.splice(g.index,1),e[f.key]=p;for(var m=0;m<t.length;m++){var y=t[m];f.key===y.key?a=1/0:"min"===i.linkage?(a=r[f.key][y.key],r[f.key][y.key]>r[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[f.key][y.key],r[f.key][y.key]<r[g.key][y.key]&&(a=r[g.key][y.key])):a="mean"===i.linkage?(r[f.key][y.key]*f.size+r[g.key][y.key]*g.size)/(f.size+g.size):"dendrogram"===i.mode?c(y.value,f.value):c(y.value[0],f.value[0]),r[f.key][y.key]=r[y.key][f.key]=a}for(var v=0;v<t.length;v++){var b=t[v].key;if(n[b]===f.key||n[b]===g.key){for(var x=b,T=0;T<t.length;T++){var w=t[T].key;r[b][w]<r[b][x]&&(x=w)}n[b]=x}t[v].index=v}return f.key=g.key=f.index=g.index=null,!0},Rn=function(t,e,r){t&&(t.value?e.push(t.value):(t.left&&Rn(t.left,e),t.right&&Rn(t.right,e)))},Ln=function(t,e){if(!t)return"";if(t.left&&t.right){var r=Ln(t.left,e),n=Ln(t.right,e),i=e.add({group:"nodes",data:{id:r+","+n}});return e.add({group:"edges",data:{source:r,target:i.id()}}),e.add({group:"edges",data:{source:n,target:i.id()}}),i.id()}return t.value?t.value.id():void 0},In=function(t,e,r){if(!t)return[];var n=[],i=[],a=[];return 0===e?(t.left&&Rn(t.left,n),t.right&&Rn(t.right,i),a=n.concat(i),[r.collection(a)]):1===e?t.value?[r.collection(t.value)]:(t.left&&Rn(t.left,n),t.right&&Rn(t.right,i),[r.collection(n),r.collection(i)]):t.value?[r.collection(t.value)]:(t.left&&(n=In(t.left,e-1,r)),t.right&&(i=In(t.right,e-1,r)),n.concat(i))},Dn=function(t){for(var e=this.cy(),r=this.nodes(),n=function(t){var e=Sn(t),r=_n[e.linkage];return null!=r&&(e.linkage=r),e}(t),i=n.attributes,a=function(t,e){return hn(n.distance,i.length,function(e){return i[e](t)},function(t){return i[t](e)},t,e)},o=[],s=[],l=[],c=[],h=0;h<r.length;h++){var u={value:"dendrogram"===n.mode?r[h]:[r[h]],key:h,index:h};o[h]=u,c[h]=u,s[h]=[],l[h]=0}for(var d=0;d<o.length;d++)for(var p=0;p<=d;p++){var f=void 0;f="dendrogram"===n.mode?d===p?1/0:a(o[d].value,o[p].value):d===p?1/0:a(o[d].value[0],o[p].value[0]),s[d][p]=f,s[p][d]=f,f<s[d][l[d]]&&(l[d]=p)}for(var g,m=An(o,c,s,l,n);m;)m=An(o,c,s,l,n);return"dendrogram"===n.mode?(g=In(o[0],n.dendrogramDepth,e),n.addDendrogram&&Ln(o[0],e)):(g=new Array(o.length),o.forEach(function(t,r){t.key=t.index=null,g[r]=e.collection(t.value)})),g},Nn={hierarchicalClustering:Dn,hca:Dn},Mn=de({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),On=function(t,e,r,n){var i=function(t,e){return n[e](t)};return-hn(t,n.length,function(t){return i(e,t)},function(t){return i(r,t)},e,r)},$n=function(t,e){var r=null;return r="median"===e?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(r<t.length&&t.splice(r,t.length-r),e>0&&t.splice(0,e)):t=t.slice(e,r);for(var a=0,o=t.length-1;o>=0;o--){var s=t[o];i?isFinite(s)||(t[o]=-1/0,a++):t.splice(o,1)}n&&t.sort(function(t,e){return t-e});var l=t.length,c=Math.floor(l/2);return l%2!=0?t[c+1+a]:(t[c-1+a]+t[c+a])/2}(t):"mean"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=0,i=0,a=e;a<r;a++){var o=t[a];isFinite(o)&&(n+=o,i++)}return n/i}(t):"min"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.min(a,n))}return n}(t):"max"===e?function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,n=-1/0,i=e;i<r;i++){var a=t[i];isFinite(a)&&(n=Math.max(a,n))}return n}(t):e,r},Pn=function(t,e,r){for(var n=[],i=0;i<t;i++){for(var a=-1,o=-1/0,s=0;s<r.length;s++){var l=r[s];e[i*t+l]>o&&(a=l,o=e[i*t+l])}a>0&&n.push(a)}for(var c=0;c<r.length;c++)n[r[c]]=r[c];return n},Bn=function(t){for(var e,r,n,i,a,o,s=this.cy(),l=this.nodes(),c=function(t){var e=t.damping,r=t.preference;.5<=e&&e<1||ae("Damping must range on [0.5, 1). Got: ".concat(e));var n=["median","mean","min","max"];return n.some(function(t){return t===r})||Q(r)||ae("Preference must be one of [".concat(n.map(function(t){return"'".concat(t,"'")}).join(", "),"] or a number. Got: ").concat(r)),Mn(t)}(t),h={},u=0;u<l.length;u++)h[l[u].id()]=u;r=(e=l.length)*e,n=new Array(r);for(var d=0;d<r;d++)n[d]=-1/0;for(var p=0;p<e;p++)for(var f=0;f<e;f++)p!==f&&(n[p*e+f]=On(c.distance,l[p],l[f],c.attributes));i=$n(n,c.preference);for(var g=0;g<e;g++)n[g*e+g]=i;a=new Array(r);for(var m=0;m<r;m++)a[m]=0;o=new Array(r);for(var y=0;y<r;y++)o[y]=0;for(var v=new Array(e),b=new Array(e),x=new Array(e),T=0;T<e;T++)v[T]=0,b[T]=0,x[T]=0;for(var w,k=new Array(e*c.minIterations),C=0;C<k.length;C++)k[C]=0;for(w=0;w<c.maxIterations;w++){for(var E=0;E<e;E++){for(var S=-1/0,_=-1/0,A=-1,R=0,L=0;L<e;L++)v[L]=a[E*e+L],(R=o[E*e+L]+n[E*e+L])>=S?(_=S,S=R,A=L):R>_&&(_=R);for(var I=0;I<e;I++)a[E*e+I]=(1-c.damping)*(n[E*e+I]-S)+c.damping*v[I];a[E*e+A]=(1-c.damping)*(n[E*e+A]-_)+c.damping*v[A]}for(var D=0;D<e;D++){for(var N=0,M=0;M<e;M++)v[M]=o[M*e+D],b[M]=Math.max(0,a[M*e+D]),N+=b[M];N-=b[D],b[D]=a[D*e+D],N+=b[D];for(var O=0;O<e;O++)o[O*e+D]=(1-c.damping)*Math.min(0,N-b[O])+c.damping*v[O];o[D*e+D]=(1-c.damping)*(N-b[D])+c.damping*v[D]}for(var $=0,P=0;P<e;P++){var B=o[P*e+P]+a[P*e+P]>0?1:0;k[w%c.minIterations*e+P]=B,$+=B}if($>0&&(w>=c.minIterations-1||w==c.maxIterations-1)){for(var F=0,z=0;z<e;z++){x[z]=0;for(var K=0;K<c.minIterations;K++)x[z]+=k[K*e+z];0!==x[z]&&x[z]!==c.minIterations||F++}if(F===e)break}}for(var j=function(t,e,r){for(var n=[],i=0;i<t;i++)e[i*t+i]+r[i*t+i]>0&&n.push(i);return n}(e,a,o),q=function(t,e,r){for(var n=Pn(t,e,r),i=0;i<r.length;i++){for(var a=[],o=0;o<n.length;o++)n[o]===r[i]&&a.push(o);for(var s=-1,l=-1/0,c=0;c<a.length;c++){for(var h=0,u=0;u<a.length;u++)h+=e[a[u]*t+a[c]];h>l&&(s=c,l=h)}r[i]=a[s]}return Pn(t,e,r)}(e,n,j),W={},U=0;U<j.length;U++)W[j[U]]=[];for(var G=0;G<l.length;G++){var Y=q[h[l[G].id()]];null!=Y&&W[Y].push(l[G])}for(var V=new Array(j.length),H=0;H<j.length;H++)V[H]=s.collection(W[j[H]]);return V},Fn={affinityPropagation:Bn,ap:Bn},zn=de({root:void 0,directed:!1}),Kn={hierholzer:function(t){if(!Z(t)){var e=arguments;t={root:e[0],directed:e[1]}}var r,n,i,a=zn(t),o=a.root,s=a.directed,l=this,c=!1;o&&(i=V(o)?this.filter(o)[0].id():o[0].id());var h={},u={};s?l.forEach(function(t){var e=t.id();if(t.isNode()){var i=t.indegree(!0),a=t.outdegree(!0),o=i-a,s=a-i;1==o?r?c=!0:r=e:1==s?n?c=!0:n=e:(s>1||o>1)&&(c=!0),h[e]=[],t.outgoers().forEach(function(t){t.isEdge()&&h[e].push(t.id())})}else u[e]=[void 0,t.target().id()]}):l.forEach(function(t){var e=t.id();t.isNode()?(t.degree(!0)%2&&(r?n?c=!0:n=e:r=e),h[e]=[],t.connectedEdges().forEach(function(t){return h[e].push(t.id())})):u[e]=[t.source().id(),t.target().id()]});var d={found:!1,trail:void 0};if(c)return d;if(n&&r)if(s){if(i&&n!=i)return d;i=n}else{if(i&&n!=i&&r!=i)return d;i||(i=n)}else i||(i=l[0].id());var p=function(t){for(var e,r,n,i=t,a=[t];h[i].length;)e=h[i].shift(),r=u[e][0],i!=(n=u[e][1])?(h[n]=h[n].filter(function(t){return t!=e}),i=n):s||i==r||(h[r]=h[r].filter(function(t){return t!=e}),i=r),a.unshift(e),a.unshift(i);return a},f=[],g=[];for(g=p(i);1!=g.length;)0==h[g[0]].length?(f.unshift(l.getElementById(g.shift())),f.unshift(l.getElementById(g.shift()))):g=p(g.shift()).concat(g);for(var m in f.unshift(l.getElementById(g.shift())),h)if(h[m].length)return d;return d.found=!0,d.trail=this.spawn(f,!0),d}},jn=function(){var t=this,e={},r=0,n=0,i=[],a=[],o={},s=function(l,c,h){l===h&&(n+=1),e[c]={id:r,low:r++,cutVertex:!1};var u,d,p,f,g=t.getElementById(c).connectedEdges().intersection(t);0===g.size()?i.push(t.spawn(t.getElementById(c))):g.forEach(function(r){u=r.source().id(),d=r.target().id(),(p=u===c?d:u)!==h&&(f=r.id(),o[f]||(o[f]=!0,a.push({x:c,y:p,edge:r})),p in e?e[c].low=Math.min(e[c].low,e[p].id):(s(l,p,c),e[c].low=Math.min(e[c].low,e[p].low),e[c].id<=e[p].low&&(e[c].cutVertex=!0,function(r,n){for(var o=a.length-1,s=[],l=t.spawn();a[o].x!=r||a[o].y!=n;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach(function(r){var n=r.connectedNodes().intersection(t);l.merge(r),n.forEach(function(r){var n=r.id(),i=r.connectedEdges().intersection(t);l.merge(r),e[n].cutVertex?l.merge(i.filter(function(t){return t.isLoop()})):l.merge(i)})}),i.push(l)}(c,p))))})};t.forEach(function(t){if(t.isNode()){var r=t.id();r in e||(n=0,s(r,r),e[r].cutVertex=n>1)}});var l=Object.keys(e).filter(function(t){return e[t].cutVertex}).map(function(e){return t.getElementById(e)});return{cut:t.spawn(l),components:i}},qn=function(){var t=this,e={},r=0,n=[],i=[],a=t.spawn(t),o=function(s){if(i.push(s),e[s]={index:r,low:r++,explored:!1},t.getElementById(s).connectedEdges().intersection(t).forEach(function(t){var r=t.target().id();r!==s&&(r in e||o(r),e[r].explored||(e[s].low=Math.min(e[s].low,e[r].low)))}),e[s].index===e[s].low){for(var l=t.spawn();;){var c=i.pop();if(l.merge(t.getElementById(c)),e[c].low=e[s].index,e[c].explored=!0,c===s)break}var h=l.edgesWith(l),u=l.merge(h);n.push(u),a=a.difference(u)}};return t.forEach(function(t){if(t.isNode()){var r=t.id();r in e||o(r)}}),{cut:a,components:n}},Wn={};[we,De,Ne,Oe,Pe,Fe,qe,Br,zr,jr,Wr,tn,En,Nn,Fn,Kn,{hopcroftTarjanBiconnected:jn,htbc:jn,htb:jn,hopcroftTarjanBiconnectedComponents:jn},{tarjanStronglyConnected:qn,tsc:qn,tscc:qn,tarjanStronglyConnectedComponents:qn}].forEach(function(t){bt(Wn,t)});var Un=function(t){if(!(this instanceof Un))return new Un(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Un.prototype={fulfill:function(t){return Gn(this,1,"fulfillValue",t)},reject:function(t){return Gn(this,2,"rejectReason",t)},then:function(t,e){var r=this,n=new Un;return r.onFulfilled.push(Hn(t,n,"fulfill")),r.onRejected.push(Hn(e,n,"reject")),Yn(r),n.proxy}};var Gn=function(t,e,r,n){return 0===t.state&&(t.state=e,t[r]=n,Yn(t)),t},Yn=function(t){1===t.state?Vn(t,"onFulfilled",t.fulfillValue):2===t.state&&Vn(t,"onRejected",t.rejectReason)},Vn=function(t,e,r){if(0!==t[e].length){var n=t[e];t[e]=[];var i=function(){for(var t=0;t<n.length;t++)n[t](r)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},Hn=function(t,e,r){return function(n){if("function"!=typeof t)e[r].call(e,n);else{var i;try{i=t(n)}catch(a){return void e.reject(a)}Xn(e,i)}}},Xn=function(t,e){if(t!==e&&t.proxy!==e){var r;if("object"===u(e)&&null!==e||"function"==typeof e)try{r=e.then}catch(i){return void t.reject(i)}if("function"!=typeof r)t.fulfill(e);else{var n=!1;try{r.call(e,function(r){n||(n=!0,r===e?t.reject(new TypeError("circular thenable chain")):Xn(t,r))},function(e){n||(n=!0,t.reject(e))})}catch(i){n||t.reject(i)}}}else t.reject(new TypeError("cannot resolve promise with itself"))};Un.all=function(t){return new Un(function(e,r){for(var n=new Array(t.length),i=0,a=function(r,a){n[r]=a,++i===t.length&&e(n)},o=0;o<t.length;o++)(function(e){var n=t[e];null!=n&&null!=n.then?n.then(function(t){a(e,t)},function(t){r(t)}):a(e,n)})(o)})},Un.resolve=function(t){return new Un(function(e,r){e(t)})},Un.reject=function(t){return new Un(function(e,r){r(t)})};var Zn="undefined"!=typeof Promise?Promise:Un,Qn=function(t,e,r){var n=nt(t),i=!n,a=this._private=bt({duration:1e3},e,r);if(a.target=t,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&H(a.complete)&&a.completes.push(a.complete),i){var o=t.position();a.startPosition=a.startPosition||{x:o.x,y:o.y},a.startStyle=a.startStyle||t.cy().style().getAnimationStartStyle(t,a.style)}if(n){var s=t.pan();a.startPan={x:s.x,y:s.y},a.startZoom=t.zoom()}this.length=1,this[0]=this},Jn=Qn.prototype;bt(Jn,{instanceString:function(){return"animation"},hook:function(){var t=this._private;if(!t.hooked){var e=t.target._private.animation;(t.queue?e.queue:e.current).push(this),tt(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0}return this},play:function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var t=this._private;return t.playing=!1,t.started=!1,this},stop:function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},progress:function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var t=this._private,e=t.playing;e&&this.pause(),t.progress=1-t.progress,t.started=!1;var r=function(e,r){var n=t[e];null!=n&&(t[e]=t[r],t[r]=n)};if(r("zoom","startZoom"),r("pan","startPan"),r("position","startPosition"),t.style)for(var n=0;n<t.style.length;n++){var i=t.style[n],a=i.name,o=t.startStyle[a];t.startStyle[a]=i,t.style[n]=o}return e&&this.play(),this},promise:function(t){var e,r=this._private;if("frame"===t)e=r.frames;else e=r.completes;return new Zn(function(t,r){e.push(function(){t()})})}}),Jn.complete=Jn.completed,Jn.run=Jn.play,Jn.running=Jn.playing;var ti,ei,ri,ni,ii,ai,oi,si,li,ci,hi,ui,di,pi,fi,gi,mi,yi,vi,bi,xi,Ti,wi,ki,Ci,Ei,Si,_i,Ai,Ri,Li,Ii,Di,Ni,Mi,Oi,$i,Pi,Bi,Fi,zi,Ki,ji,qi,Wi,Ui,Gi,Yi,Vi,Hi,Xi,Zi,Qi,Ji,ta,ea,ra,na,ia,aa,oa,sa,la,ca,ha,ua,da,pa,fa,ga,ma,ya,va,ba,xa,Ta,wa,ka,Ca,Ea,Sa,_a,Aa,Ra,La,Ia,Da={animated:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return!1;var r=e[0];return r?r._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var r=0;r<e.length;r++){e[r]._private.animation.queue=[]}return this}},delay:function(){return function(t,e){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:e}):this}},delayAnimation:function(){return function(t,e){return(this._private.cy||this).styleEnabled()?this.animation({delay:t,duration:t,complete:e}):this}},animation:function(){return function(t,e){var r=this,n=void 0!==r.length,i=n?r:[r],a=this._private.cy||this,o=!n,s=!o;if(!a.styleEnabled())return this;var l=a.style();if(t=bt({},t,e),0===Object.keys(t).length)return new Qn(i[0],t);switch(void 0===t.duration&&(t.duration=400),t.duration){case"slow":t.duration=600;break;case"fast":t.duration=200}if(s&&(t.style=l.getPropsList(t.style||t.css),t.css=void 0),s&&null!=t.renderedPosition){var c=t.renderedPosition,h=a.pan(),u=a.zoom();t.position=Ue(c,u,h)}if(o&&null!=t.panBy){var d=t.panBy,p=a.pan();t.pan={x:p.x+d.x,y:p.y+d.y}}var f=t.center||t.centre;if(o&&null!=f){var g=a.getCenterPan(f.eles,t.zoom);null!=g&&(t.pan=g)}if(o&&null!=t.fit){var m=t.fit,y=a.getFitViewport(m.eles||m.boundingBox,m.padding);null!=y&&(t.pan=y.pan,t.zoom=y.zoom)}if(o&&Z(t.zoom)){var v=a.getZoomedViewport(t.zoom);null!=v?(v.zoomed&&(t.zoom=v.zoom),v.panned&&(t.pan=v.pan)):t.zoom=null}return new Qn(i[0],t)}},animate:function(){return function(t,e){var r=this,n=void 0!==r.length?r:[r];if(!(this._private.cy||this).styleEnabled())return this;e&&(t=bt({},t,e));for(var i=0;i<n.length;i++){var a=n[i],o=a.animated()&&(void 0===t.queue||t.queue);a.animation(t,o?{queue:!0}:void 0).play()}return this}},stop:function(){return function(t,e){var r=this,n=void 0!==r.length?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var a=0;a<n.length;a++){for(var o=n[a]._private,s=o.animation.current,l=0;l<s.length;l++){var c=s[l]._private;e&&(c.duration=0)}t&&(o.animation.queue=[]),e||(o.animation.current=[])}return i.notify("draw"),this}}};function Na(){if(ei)return ti;ei=1;var t=Array.isArray;return ti=t}function Ma(){if(ci)return li;ci=1;var t,e=function(){if(si)return oi;si=1;var t=_t()["__core-js_shared__"];return oi=t}(),r=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return li=function(t){return!!r&&r in t}}function Oa(){if(pi)return di;pi=1;var t=function(){if(ai)return ii;ai=1;var t=Lt(),e=St();return ii=function(r){if(!e(r))return!1;var n=t(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}(),e=Ma(),r=St(),n=function(){if(ui)return hi;ui=1;var t=Function.prototype.toString;return hi=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}}(),i=/^\[object .+?Constructor\]$/,a=Function.prototype,o=Object.prototype,s=a.toString,l=o.hasOwnProperty,c=RegExp("^"+s.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return di=function(a){return!(!r(a)||e(a))&&(t(a)?c:i).test(n(a))}}function $a(){if(yi)return mi;yi=1;var t=Oa(),e=(gi||(gi=1,fi=function(t,e){return null==t?void 0:t[e]}),fi);return mi=function(r,n){var i=e(r,n);return t(i)?i:void 0},mi}function Pa(){if(bi)return vi;bi=1;var t=$a()(Object,"create");return vi=t}function Ba(){if(Ii)return Li;Ii=1;var t=function(){if(Ti)return xi;Ti=1;var t=Pa();return xi=function(){this.__data__=t?t(null):{},this.size=0}}(),e=ki?wi:(ki=1,wi=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),r=function(){if(Ei)return Ci;Ei=1;var t=Pa(),e=Object.prototype.hasOwnProperty;return Ci=function(r){var n=this.__data__;if(t){var i=n[r];return"__lodash_hash_undefined__"===i?void 0:i}return e.call(n,r)?n[r]:void 0},Ci}(),n=function(){if(_i)return Si;_i=1;var t=Pa(),e=Object.prototype.hasOwnProperty;return Si=function(r){var n=this.__data__;return t?void 0!==n[r]:e.call(n,r)},Si}(),i=function(){if(Ri)return Ai;Ri=1;var t=Pa();return Ai=function(e,r){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=t&&void 0===r?"__lodash_hash_undefined__":r,this},Ai}();function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Li=a}function Fa(){if(Oi)return Mi;return Oi=1,Mi=function(t,e){return t===e||t!=t&&e!=e}}function za(){if(Pi)return $i;Pi=1;var t=Fa();return $i=function(e,r){for(var n=e.length;n--;)if(t(e[n][0],r))return n;return-1},$i}function Ka(){if(Yi)return Gi;Yi=1;var t=Ni?Di:(Ni=1,Di=function(){this.__data__=[],this.size=0}),e=function(){if(Fi)return Bi;Fi=1;var t=za(),e=Array.prototype.splice;return Bi=function(r){var n=this.__data__,i=t(n,r);return!(i<0||(i==n.length-1?n.pop():e.call(n,i,1),--this.size,0))},Bi}(),r=function(){if(Ki)return zi;Ki=1;var t=za();return zi=function(e){var r=this.__data__,n=t(r,e);return n<0?void 0:r[n][1]},zi}(),n=function(){if(qi)return ji;qi=1;var t=za();return ji=function(e){return t(this.__data__,e)>-1}}(),i=function(){if(Ui)return Wi;Ui=1;var t=za();return Wi=function(e,r){var n=this.__data__,i=t(n,e);return i<0?(++this.size,n.push([e,r])):n[i][1]=r,this},Wi}();function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Gi=a}function ja(){if(Zi)return Xi;Zi=1;var t=Ba(),e=Ka(),r=function(){if(Hi)return Vi;Hi=1;var t=$a()(_t(),"Map");return Vi=t}();return Xi=function(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}}function qa(){if(ea)return ta;ea=1;var t=Ji?Qi:(Ji=1,Qi=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return ta=function(e,r){var n=e.__data__;return t(r)?n["string"==typeof r?"string":"hash"]:n.map},ta}function Wa(){if(ua)return ha;ua=1;var t=ja(),e=function(){if(na)return ra;na=1;var t=qa();return ra=function(e){var r=t(this,e).delete(e);return this.size-=r?1:0,r}}(),r=function(){if(aa)return ia;aa=1;var t=qa();return ia=function(e){return t(this,e).get(e)}}(),n=function(){if(sa)return oa;sa=1;var t=qa();return oa=function(e){return t(this,e).has(e)}}(),i=function(){if(ca)return la;ca=1;var t=qa();return la=function(e,r){var n=t(this,e),i=n.size;return n.set(e,r),this.size+=n.size==i?0:1,this},la}();function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,ha=a}function Ua(){if(ga)return fa;ga=1;var t=function(){if(pa)return da;pa=1;var t=Wa();function e(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var i=function(){var t=arguments,e=n?n.apply(this,t):t[0],a=i.cache;if(a.has(e))return a.get(e);var o=r.apply(this,t);return i.cache=a.set(e,o)||a,o};return i.cache=new(e.Cache||t),i}return e.Cache=t,da=e}();return fa=function(e){var r=t(e,function(t){return 500===n.size&&n.clear(),t}),n=r.cache;return r},fa}function Ga(){if(ya)return ma;ya=1;var t=Ua(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(e,function(t,e,i,a){n.push(i?a.replace(r,"$1"):e||t)}),n});return ma=n}function Ya(){if(ba)return va;return ba=1,va=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},va}function Va(){if(ka)return wa;ka=1;var t=function(){if(Ta)return xa;Ta=1;var t=Rt(),e=Ya(),r=Na(),n=It(),i=t?t.prototype:void 0,a=i?i.toString:void 0;return xa=function t(i){if("string"==typeof i)return i;if(r(i))return e(i,t)+"";if(n(i))return a?a.call(i):"";var o=i+"";return"0"==o&&1/i==-1/0?"-0":o},xa}();return wa=function(e){return null==e?"":t(e)}}function Ha(){if(Ea)return Ca;Ea=1;var t=Na(),e=function(){if(ni)return ri;ni=1;var t=Na(),e=It(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return ri=function(i,a){if(t(i))return!1;var o=typeof i;return!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=i&&!e(i))||n.test(i)||!r.test(i)||null!=a&&i in Object(a)},ri}(),r=Ga(),n=Va();return Ca=function(i,a){return t(i)?i:e(i,a)?[i]:r(n(i))},Ca}function Xa(){if(_a)return Sa;_a=1;var t=It();return Sa=function(e){if("string"==typeof e||t(e))return e;var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}}var Za,Qa,Ja,to,eo,ro,no,io,ao,oo,so,lo,co=function(){if(Ia)return La;Ia=1;var t=function(){if(Ra)return Aa;Ra=1;var t=Ha(),e=Xa();return Aa=function(r,n){for(var i=0,a=(n=t(n,r)).length;null!=r&&i<a;)r=r[e(n[i++])];return i&&i==a?r:void 0},Aa}();return La=function(e,r,n){var i=null==e?void 0:t(e,r);return void 0===i?n:i},La}(),ho=Et(co);function uo(){if(to)return Ja;to=1;var t=function(){if(Qa)return Za;Qa=1;var t=$a(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(r){}}();return Za=e}();return Ja=function(e,r,n){"__proto__"==r&&t?t(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[r]=n},Ja}function po(){if(oo)return ao;oo=1;var t=function(){if(ro)return eo;ro=1;var t=uo(),e=Fa(),r=Object.prototype.hasOwnProperty;return eo=function(n,i,a){var o=n[i];r.call(n,i)&&e(o,a)&&(void 0!==a||i in n)||t(n,i,a)},eo}(),e=Ha(),r=function(){if(io)return no;io=1;var t=/^(?:0|[1-9]\d*)$/;return no=function(e,r){var n=typeof e;return!!(r=r??9007199254740991)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}}(),n=St(),i=Xa();return ao=function(a,o,s,l){if(!n(a))return a;for(var c=-1,h=(o=e(o,a)).length,u=h-1,d=a;null!=d&&++c<h;){var p=i(o[c]),f=s;if("__proto__"===p||"constructor"===p||"prototype"===p)return a;if(c!=u){var g=d[p];void 0===(f=l?l(g,p,d):void 0)&&(f=n(g)?g:r(o[c+1])?[]:{})}t(d,p,f),d=d[p]}return a},ao}var fo,go,mo,yo,vo=function(){if(lo)return so;lo=1;var t=po();return so=function(e,r,n){return null==e?e:t(e,r,n)},so}(),bo=Et(vo);var xo=function(){if(yo)return mo;yo=1;var t=Ya(),e=(go||(go=1,fo=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}),fo),r=Na(),n=It(),i=Ga(),a=Xa(),o=Va();return mo=function(s){return r(s)?t(s,a):n(s)?[s]:e(i(o(s)))}}(),To=Et(xo),wo={data:function(t){return t=bt({},{field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(t){},beforeSet:function(t,e){},onSet:function(t){},canSet:function(t){return!0}},t),function(e,r){var n=t,i=this,a=void 0!==i.length,o=a?i:[i],l=a?i[0]:i;if(V(e)){var c,h=-1!==e.indexOf(".")&&To(e);if(n.allowGetting&&void 0===r)return l&&(n.beforeGet(l),c=h&&void 0===l._private[n.field][e]?ho(l._private[n.field],h):l._private[n.field][e]),c;if(n.allowSetting&&void 0!==r&&!n.immutableKeys[e]){var u=s({},e,r);n.beforeSet(i,u);for(var d=0,p=o.length;d<p;d++){var f=o[d];n.canSet(f)&&(h&&void 0===l._private[n.field][e]?bo(f._private[n.field],h,r):f._private[n.field][e]=r)}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}}else if(n.allowSetting&&Z(e)){var g,m,y=e,v=Object.keys(y);n.beforeSet(i,y);for(var b=0;b<v.length;b++){if(m=y[g=v[b]],!n.immutableKeys[g])for(var x=0;x<o.length;x++){var T=o[x];n.canSet(T)&&(T._private[n.field][g]=m)}}n.updateStyle&&i.updateStyle(),n.onSet(i),n.settingTriggersEvent&&i[n.triggerFnName](n.settingEvent)}else if(n.allowBinding&&H(e)){var w=e;i.on(n.bindingEvent,w)}else if(n.allowGetting&&void 0===e){var k;return l&&(n.beforeGet(l),k=l._private[n.field]),k}return i}},removeData:function(t){return t=bt({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},t),function(e){var r=t,n=this,i=void 0!==n.length?n:[n];if(V(e)){for(var a=e.split(/\s+/),o=a.length,s=0;s<o;s++){var l=a[s];if(!at(l))if(!r.immutableKeys[l])for(var c=0,h=i.length;c<h;c++)i[c]._private[r.field][l]=void 0}r.triggerEvent&&n[r.triggerFnName](r.event)}else if(void 0===e){for(var u=0,d=i.length;u<d;u++)for(var p=i[u]._private[r.field],f=Object.keys(p),g=0;g<f.length;g++){var m=f[g];!r.immutableKeys[m]&&(p[m]=void 0)}r.triggerEvent&&n[r.triggerFnName](r.event)}return n}}},ko={eventAliasesOn:function(t){var e=t;e.addListener=e.listen=e.bind=e.on,e.unlisten=e.unbind=e.off=e.removeListener,e.trigger=e.emit,e.pon=e.promiseOn=function(t,e){var r=this,n=Array.prototype.slice.call(arguments,0);return new Zn(function(t,e){var i=n.concat([function(e){r.off.apply(r,a),t(e)}]),a=i.concat([]);r.on.apply(r,i)})}}},Co={};[Da,wo,ko].forEach(function(t){bt(Co,t)});var Eo={animate:Co.animate(),animation:Co.animation(),animated:Co.animated(),clearQueue:Co.clearQueue(),delay:Co.delay(),delayAnimation:Co.delayAnimation(),stop:Co.stop()},So={classes:function(t){var e=this;if(void 0===t){var r=[];return e[0]._private.classes.forEach(function(t){return r.push(t)}),r}X(t)||(t=(t||"").match(/\S+/g)||[]);for(var n=[],i=new be(t),a=0;a<e.length;a++){for(var o=e[a],s=o._private,l=s.classes,c=!1,h=0;h<t.length;h++){var u=t[h];if(!l.has(u)){c=!0;break}}c||(c=l.size!==t.length),c&&(s.classes=i,n.push(o))}return n.length>0&&this.spawn(n).updateStyle().emit("class"),e},addClass:function(t){return this.toggleClass(t,!0)},hasClass:function(t){var e=this[0];return null!=e&&e._private.classes.has(t)},toggleClass:function(t,e){X(t)||(t=t.match(/\S+/g)||[]);for(var r=this,n=void 0===e,i=[],a=0,o=r.length;a<o;a++)for(var s=r[a],l=s._private.classes,c=!1,h=0;h<t.length;h++){var u=t[h],d=l.has(u),p=!1;e||n&&!d?(l.add(u),p=!0):(!e||n&&d)&&(l.delete(u),p=!0),!c&&p&&(i.push(s),c=!0)}return i.length>0&&this.spawn(i).updateStyle().emit("class"),r},removeClass:function(t){return this.toggleClass(t,!1)},flashClass:function(t,e){var r=this;if(null==e)e=250;else if(0===e)return r;return r.addClass(t),setTimeout(function(){r.removeClass(t)},e),r}};So.className=So.classNames=So.classes;var _o={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:pt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};_o.variable="(?:[\\w-.]|(?:\\\\"+_o.metaChar+"))+",_o.className="(?:[\\w-]|(?:\\\\"+_o.metaChar+"))+",_o.value=_o.string+"|"+_o.number,_o.id=_o.variable,function(){var t,e,r;for(t=_o.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],_o.comparatorOp+="|@"+e;for(t=_o.comparatorOp.split("|"),r=0;r<t.length;r++)(e=t[r]).indexOf("!")>=0||"="!==e&&(_o.comparatorOp+="|\\!"+e)}();var Ao=0,Ro=1,Lo=2,Io=3,Do=4,No=5,Mo=6,Oo=7,$o=8,Po=9,Bo=10,Fo=11,zo=12,Ko=13,jo=14,qo=15,Wo=16,Uo=17,Go=18,Yo=19,Vo=20,Ho=[{selector:":selected",matches:function(t){return t.selected()}},{selector:":unselected",matches:function(t){return!t.selected()}},{selector:":selectable",matches:function(t){return t.selectable()}},{selector:":unselectable",matches:function(t){return!t.selectable()}},{selector:":locked",matches:function(t){return t.locked()}},{selector:":unlocked",matches:function(t){return!t.locked()}},{selector:":visible",matches:function(t){return t.visible()}},{selector:":hidden",matches:function(t){return!t.visible()}},{selector:":transparent",matches:function(t){return t.transparent()}},{selector:":grabbed",matches:function(t){return t.grabbed()}},{selector:":free",matches:function(t){return!t.grabbed()}},{selector:":removed",matches:function(t){return t.removed()}},{selector:":inside",matches:function(t){return!t.removed()}},{selector:":grabbable",matches:function(t){return t.grabbable()}},{selector:":ungrabbable",matches:function(t){return!t.grabbable()}},{selector:":animated",matches:function(t){return t.animated()}},{selector:":unanimated",matches:function(t){return!t.animated()}},{selector:":parent",matches:function(t){return t.isParent()}},{selector:":childless",matches:function(t){return t.isChildless()}},{selector:":child",matches:function(t){return t.isChild()}},{selector:":orphan",matches:function(t){return t.isOrphan()}},{selector:":nonorphan",matches:function(t){return t.isChild()}},{selector:":compound",matches:function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()}},{selector:":loop",matches:function(t){return t.isLoop()}},{selector:":simple",matches:function(t){return t.isSimple()}},{selector:":active",matches:function(t){return t.active()}},{selector:":inactive",matches:function(t){return!t.active()}},{selector:":backgrounding",matches:function(t){return t.backgrounding()}},{selector:":nonbackgrounding",matches:function(t){return!t.backgrounding()}}].sort(function(t,e){return function(t,e){return-1*vt(t,e)}(t.selector,e.selector)}),Xo=function(){for(var t,e={},r=0;r<Ho.length;r++)e[(t=Ho[r]).selector]=t.matches;return e}(),Zo="("+Ho.map(function(t){return t.selector}).join("|")+")",Qo=function(t){return t.replace(new RegExp("\\\\("+_o.metaChar+")","g"),function(t,e){return e})},Jo=function(t,e,r){t[t.length-1]=r},ts=[{name:"group",query:!0,regex:"("+_o.group+")",populate:function(t,e,r){var n=l(r,1)[0];e.checks.push({type:Ao,value:"*"===n?n:n+"s"})}},{name:"state",query:!0,regex:Zo,populate:function(t,e,r){var n=l(r,1)[0];e.checks.push({type:Oo,value:n})}},{name:"id",query:!0,regex:"\\#("+_o.id+")",populate:function(t,e,r){var n=l(r,1)[0];e.checks.push({type:$o,value:Qo(n)})}},{name:"className",query:!0,regex:"\\.("+_o.className+")",populate:function(t,e,r){var n=l(r,1)[0];e.checks.push({type:Po,value:Qo(n)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+_o.variable+")\\s*\\]",populate:function(t,e,r){var n=l(r,1)[0];e.checks.push({type:Do,field:Qo(n)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+_o.variable+")\\s*("+_o.comparatorOp+")\\s*("+_o.value+")\\s*\\]",populate:function(t,e,r){var n=l(r,3),i=n[0],a=n[1],o=n[2];o=null!=new RegExp("^"+_o.string+"$").exec(o)?o.substring(1,o.length-1):parseFloat(o),e.checks.push({type:Io,field:Qo(i),operator:a,value:o})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+_o.boolOp+")\\s*("+_o.variable+")\\s*\\]",populate:function(t,e,r){var n=l(r,2),i=n[0],a=n[1];e.checks.push({type:No,field:Qo(a),operator:i})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+_o.meta+")\\s*("+_o.comparatorOp+")\\s*("+_o.number+")\\s*\\]\\]",populate:function(t,e,r){var n=l(r,3),i=n[0],a=n[1],o=n[2];e.checks.push({type:Mo,field:Qo(i),operator:a,value:parseFloat(o)})}},{name:"nextQuery",separator:!0,regex:_o.separator,populate:function(t,e){var r=t.currentSubject,n=t.edgeCount,i=t.compoundCount,a=t[t.length-1];return null!=r&&(a.subject=r,t.currentSubject=null),a.edgeCount=n,a.compoundCount=i,t.edgeCount=0,t.compoundCount=0,t[t.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:_o.directedEdge,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n=e,i={checks:[]};return r.checks.push({type:Fo,source:n,target:i}),Jo(t,0,r),t.edgeCount++,i}var a={checks:[]},o=e,s={checks:[]};return a.checks.push({type:zo,source:o,target:s}),Jo(t,0,a),t.edgeCount++,s}},{name:"undirectedEdge",separator:!0,regex:_o.undirectedEdge,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n=e,i={checks:[]};return r.checks.push({type:Bo,nodes:[n,i]}),Jo(t,0,r),t.edgeCount++,i}var a={checks:[]},o=e,s={checks:[]};return a.checks.push({type:jo,node:o,neighbor:s}),Jo(t,0,a),s}},{name:"child",separator:!0,regex:_o.child,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n={checks:[]},i=t[t.length-1];return r.checks.push({type:qo,parent:i,child:n}),Jo(t,0,r),t.compoundCount++,n}if(t.currentSubject===e){var a={checks:[]},o=t[t.length-1],s={checks:[]},l={checks:[]},c={checks:[]},h={checks:[]};return a.checks.push({type:Yo,left:o,right:s,subject:l}),l.checks=e.checks,e.checks=[{type:Vo}],h.checks.push({type:Vo}),s.checks.push({type:Uo,parent:h,child:c}),Jo(t,0,a),t.currentSubject=l,t.compoundCount++,c}var u={checks:[]},d={checks:[]},p=[{type:Uo,parent:u,child:d}];return u.checks=e.checks,e.checks=p,t.compoundCount++,d}},{name:"descendant",separator:!0,regex:_o.descendant,populate:function(t,e){if(null==t.currentSubject){var r={checks:[]},n={checks:[]},i=t[t.length-1];return r.checks.push({type:Wo,ancestor:i,descendant:n}),Jo(t,0,r),t.compoundCount++,n}if(t.currentSubject===e){var a={checks:[]},o=t[t.length-1],s={checks:[]},l={checks:[]},c={checks:[]},h={checks:[]};return a.checks.push({type:Yo,left:o,right:s,subject:l}),l.checks=e.checks,e.checks=[{type:Vo}],h.checks.push({type:Vo}),s.checks.push({type:Go,ancestor:h,descendant:c}),Jo(t,0,a),t.currentSubject=l,t.compoundCount++,c}var u={checks:[]},d={checks:[]},p=[{type:Go,ancestor:u,descendant:d}];return u.checks=e.checks,e.checks=p,t.compoundCount++,d}},{name:"subject",modifier:!0,regex:_o.subject,populate:function(t,e){if(null!=t.currentSubject&&t.currentSubject!==e)return se("Redefinition of subject in selector `"+t.toString()+"`"),!1;t.currentSubject=e;var r=t[t.length-1].checks[0],n=null==r?null:r.type;n===Fo?r.type=Ko:n===Bo&&(r.type=jo,r.node=r.nodes[1],r.neighbor=r.nodes[0],r.nodes=null)}}];ts.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var es=function(t){for(var e,r,n,i=0;i<ts.length;i++){var a=ts[i],o=a.name,s=t.match(a.regexObj);if(null!=s){r=s,e=a,n=o;var l=s[0];t=t.substring(l.length);break}}return{expr:e,match:r,name:n,remaining:t}},rs={parse:function(t){var e=this,r=e.inputText=t,n=e[0]={checks:[]};for(e.length=1,r=function(t){var e=t.match(/^\s+/);if(e){var r=e[0];t=t.substring(r.length)}return t}(r);;){var i=es(r);if(null==i.expr)return se("The selector `"+t+"`is invalid"),!1;var a=i.match.slice(1),o=i.expr.populate(e,n,a);if(!1===o)return!1;if(null!=o&&(n=o),(r=i.remaining).match(/^\s*$/))break}var s=e[e.length-1];null!=e.currentSubject&&(s.subject=e.currentSubject),s.edgeCount=e.edgeCount,s.compoundCount=e.compoundCount;for(var l=0;l<e.length;l++){var c=e[l];if(c.compoundCount>0&&c.edgeCount>0)return se("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return se("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;1===c.edgeCount&&se("The selector `"+t+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var t=function(t){return t??""},e=function(e){return V(e)?'"'+e+'"':t(e)},r=function(t){return" "+t+" "},n=function(n,a){var o=n.type,s=n.value;switch(o){case Ao:var l=t(s);return l.substring(0,l.length-1);case Io:var c=n.field,h=n.operator;return"["+c+r(t(h))+e(s)+"]";case No:var u=n.operator,d=n.field;return"["+t(u)+d+"]";case Do:return"["+n.field+"]";case Mo:var p=n.operator;return"[["+n.field+r(t(p))+e(s)+"]]";case Oo:return s;case $o:return"#"+s;case Po:return"."+s;case Uo:case qo:return i(n.parent,a)+r(">")+i(n.child,a);case Go:case Wo:return i(n.ancestor,a)+" "+i(n.descendant,a);case Yo:var f=i(n.left,a),g=i(n.subject,a),m=i(n.right,a);return f+(f.length>0?" ":"")+g+m;case Vo:return""}},i=function(t,e){return t.checks.reduce(function(r,i,a){return r+(e===t&&0===a?"$":"")+n(i,e)},"")},a="",o=0;o<this.length;o++){var s=this[o];a+=i(s,s.subject),this.length>1&&o<this.length-1&&(a+=", ")}return this.toStringCache=a,a}},ns=function(t,e,r){var n,i,a,o=V(t),s=Q(t),l=V(r),c=!1,h=!1,u=!1;switch(e.indexOf("!")>=0&&(e=e.replace("!",""),h=!0),e.indexOf("@")>=0&&(e=e.replace("@",""),c=!0),(o||l||c)&&(i=o||s?""+t:"",a=""+r),c&&(t=i=i.toLowerCase(),r=a=a.toLowerCase()),e){case"*=":n=i.indexOf(a)>=0;break;case"$=":n=i.indexOf(a,i.length-a.length)>=0;break;case"^=":n=0===i.indexOf(a);break;case"=":n=t===r;break;case">":u=!0,n=t>r;break;case">=":u=!0,n=t>=r;break;case"<":u=!0,n=t<r;break;case"<=":u=!0,n=t<=r;break;default:n=!1}return!h||null==t&&u||(n=!n),n},is=function(t,e){return t.data(e)},as=[],os=function(t,e){return t.checks.every(function(t){return as[t.type](t,e)})};as[Ao]=function(t,e){var r=t.value;return"*"===r||r===e.group()},as[Oo]=function(t,e){return function(t,e){return Xo[t](e)}(t.value,e)},as[$o]=function(t,e){var r=t.value;return e.id()===r},as[Po]=function(t,e){var r=t.value;return e.hasClass(r)},as[Mo]=function(t,e){var r=t.field,n=t.operator,i=t.value;return ns(function(t,e){return t[e]()}(e,r),n,i)},as[Io]=function(t,e){var r=t.field,n=t.operator,i=t.value;return ns(is(e,r),n,i)},as[No]=function(t,e){var r=t.field,n=t.operator;return function(t,e){switch(e){case"?":return!!t;case"!":return!t;case"^":return void 0===t}}(is(e,r),n)},as[Do]=function(t,e){var r=t.field;return t.operator,void 0!==is(e,r)},as[Bo]=function(t,e){var r=t.nodes[0],n=t.nodes[1],i=e.source(),a=e.target();return os(r,i)&&os(n,a)||os(n,i)&&os(r,a)},as[jo]=function(t,e){return os(t.node,e)&&e.neighborhood().some(function(e){return e.isNode()&&os(t.neighbor,e)})},as[Fo]=function(t,e){return os(t.source,e.source())&&os(t.target,e.target())},as[zo]=function(t,e){return os(t.source,e)&&e.outgoers().some(function(e){return e.isNode()&&os(t.target,e)})},as[Ko]=function(t,e){return os(t.target,e)&&e.incomers().some(function(e){return e.isNode()&&os(t.source,e)})},as[qo]=function(t,e){return os(t.child,e)&&os(t.parent,e.parent())},as[Uo]=function(t,e){return os(t.parent,e)&&e.children().some(function(e){return os(t.child,e)})},as[Wo]=function(t,e){return os(t.descendant,e)&&e.ancestors().some(function(e){return os(t.ancestor,e)})},as[Go]=function(t,e){return os(t.ancestor,e)&&e.descendants().some(function(e){return os(t.descendant,e)})},as[Yo]=function(t,e){return os(t.subject,e)&&os(t.left,e)&&os(t.right,e)},as[Vo]=function(){return!0},as[Ro]=function(t,e){return t.value.has(e)},as[Lo]=function(t,e){return(0,t.value)(e)};var ss={matches:function(t){for(var e=0;e<this.length;e++){var r=this[e];if(os(r,t))return!0}return!1},filter:function(t){var e=this;if(1===e.length&&1===e[0].checks.length&&e[0].checks[0].type===$o)return t.getElementById(e[0].checks[0].value).collection();var r=function(t){for(var r=0;r<e.length;r++){var n=e[r];if(os(n,t))return!0}return!1};return null==e.text()&&(r=function(){return!0}),t.filter(r)}},ls=function(t){this.inputText=t,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==t||V(t)&&t.match(/^\s*$/)||(tt(t)?this.addQuery({checks:[{type:Ro,value:t.collection()}]}):H(t)?this.addQuery({checks:[{type:Lo,value:t}]}):V(t)?this.parse(t)||(this.invalid=!0):ae("A selector must be created from a string; found "))},cs=ls.prototype;[rs,ss].forEach(function(t){return bt(cs,t)}),cs.text=function(){return this.inputText},cs.size=function(){return this.length},cs.eq=function(t){return this[t]},cs.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},cs.addQuery=function(t){this[this.length++]=t},cs.selector=cs.toString;var hs={allAre:function(t){var e=new ls(t);return this.every(function(t){return e.matches(t)})},is:function(t){var e=new ls(t);return this.some(function(t){return e.matches(t)})},some:function(t,e){for(var r=0;r<this.length;r++){if(e?t.apply(e,[this[r],r,this]):t(this[r],r,this))return!0}return!1},every:function(t,e){for(var r=0;r<this.length;r++){if(!(e?t.apply(e,[this[r],r,this]):t(this[r],r,this)))return!1}return!0},same:function(t){if(this===t)return!0;t=this.cy().collection(t);var e=this.length;return e===t.length&&(1===e?this[0]===t[0]:this.every(function(e){return t.hasElementWithId(e.id())}))},anySame:function(t){return t=this.cy().collection(t),this.some(function(e){return t.hasElementWithId(e.id())})},allAreNeighbors:function(t){t=this.cy().collection(t);var e=this.neighborhood();return t.every(function(t){return e.hasElementWithId(t.id())})},contains:function(t){t=this.cy().collection(t);var e=this;return t.every(function(t){return e.hasElementWithId(t.id())})}};hs.allAreNeighbours=hs.allAreNeighbors,hs.has=hs.contains,hs.equal=hs.equals=hs.same;var us,ds,ps=function(t,e){return function(r,n,i,a){var o,s=r,l=this;if(null==s?o="":tt(s)&&1===s.length&&(o=s.id()),1===l.length&&o){var c=l[0]._private,h=c.traversalCache=c.traversalCache||{},u=h[e]=h[e]||[],d=Yt(o),p=u[d];return p||(u[d]=t.call(l,r,n,i,a))}return t.call(l,r,n,i,a)}},fs={parent:function(t){var e=[];if(1===this.length){var r=this[0]._private.parent;if(r)return r}for(var n=0;n<this.length;n++){var i=this[n]._private.parent;i&&e.push(i)}return this.spawn(e,!0).filter(t)},parents:function(t){for(var e=[],r=this.parent();r.nonempty();){for(var n=0;n<r.length;n++){var i=r[n];e.push(i)}r=r.parent()}return this.spawn(e,!0).filter(t)},commonAncestors:function(t){for(var e,r=0;r<this.length;r++){var n=this[r].parents();e=(e=e||n).intersect(n)}return e.filter(t)},orphans:function(t){return this.stdFilter(function(t){return t.isOrphan()}).filter(t)},nonorphans:function(t){return this.stdFilter(function(t){return t.isChild()}).filter(t)},children:ps(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r]._private.children,i=0;i<n.length;i++)e.push(n[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:function(t){return this.parent().children().not(this).filter(t)},isParent:function(){var t=this[0];if(t)return t.isNode()&&0!==t._private.children.length},isChildless:function(){var t=this[0];if(t)return t.isNode()&&0===t._private.children.length},isChild:function(){var t=this[0];if(t)return t.isNode()&&null!=t._private.parent},isOrphan:function(){var t=this[0];if(t)return t.isNode()&&null==t._private.parent},descendants:function(t){var e=[];return function t(r){for(var n=0;n<r.length;n++){var i=r[n];e.push(i),i.children().nonempty()&&t(i.children())}}(this.children()),this.spawn(e,!0).filter(t)}};function gs(t,e,r,n){for(var i=[],a=new be,o=t.cy().hasCompoundNodes(),s=0;s<t.length;s++){var l=t[s];r?i.push(l):o&&n(i,a,l)}for(;i.length>0;){var c=i.shift();e(c),a.add(c.id()),o&&n(i,a,c)}return t}function ms(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i<n.length;i++){var a=n[i];e.has(a.id())||t.push(a)}}function ys(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}function vs(t,e,r){ys(t,e,r),ms(t,e,r)}fs.forEachDown=function(t){return gs(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ms)},fs.forEachUp=function(t){return gs(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ys)},fs.forEachUpAndDown=function(t){return gs(this,t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],vs)},fs.ancestors=fs.parents,(us=ds={data:Co.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Co.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Co.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Co.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Co.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Co.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var t=this[0];if(t)return t._private.data.id}}).attr=us.data,us.removeAttr=us.removeData;var bs,xs,Ts=ds,ws={};function ks(t){return function(e){var r=this;if(void 0===e&&(e=!0),0!==r.length&&r.isNode()&&!r.removed()){for(var n=0,i=r[0],a=i._private.edges,o=0;o<a.length;o++){var s=a[o];!e&&s.isLoop()||(n+=t(i,s))}return n}}}function Cs(t,e){return function(r){for(var n,i=this.nodes(),a=0;a<i.length;a++){var o=i[a][t](r);void 0===o||void 0!==n&&!e(o,n)||(n=o)}return n}}bt(ws,{degree:ks(function(t,e){return e.source().same(e.target())?2:1}),indegree:ks(function(t,e){return e.target().same(t)?1:0}),outdegree:ks(function(t,e){return e.source().same(t)?1:0})}),bt(ws,{minDegree:Cs("degree",function(t,e){return t<e}),maxDegree:Cs("degree",function(t,e){return t>e}),minIndegree:Cs("indegree",function(t,e){return t<e}),maxIndegree:Cs("indegree",function(t,e){return t>e}),minOutdegree:Cs("outdegree",function(t,e){return t<e}),maxOutdegree:Cs("outdegree",function(t,e){return t>e})}),bt(ws,{totalDegree:function(t){for(var e=0,r=this.nodes(),n=0;n<r.length;n++)e+=r[n].degree(t);return e}});var Es=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(!i.locked()){var a=i._private.position,o={x:null!=e.x?e.x-a.x:0,y:null!=e.y?e.y-a.y:0};!i.isParent()||0===o.x&&0===o.y||i.children().shift(o,r),i.dirtyBoundingBoxCache()}}},Ss={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(t){t.updateCompoundBounds()},beforeSet:function(t,e){Es(t,e,!1)},onSet:function(t){t.dirtyCompoundBoundsCache()},canSet:function(t){return!t.locked()}};bs=xs={position:Co.data(Ss),silentPosition:Co.data(bt({},Ss,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(t,e){Es(t,e,!0)},onSet:function(t){t.dirtyCompoundBoundsCache()}})),positions:function(t,e){if(Z(t))e?this.silentPosition(t):this.position(t);else if(H(t)){var r=t,n=this.cy();n.startBatch();for(var i=0;i<this.length;i++){var a,o=this[i];(a=r(o,i))&&(e?o.silentPosition(a):o.position(a))}n.endBatch()}return this},silentPositions:function(t){return this.positions(t,!0)},shift:function(t,e,r){var n;if(Z(t)?(n={x:Q(t.x)?t.x:0,y:Q(t.y)?t.y:0},r=e):V(t)&&Q(e)&&((n={x:0,y:0})[t]=e),null!=n){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var o=this[a];if(!(i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var s=o.position(),l={x:s.x+n.x,y:s.y+n.y};r?o.silentPosition(l):o.position(l)}}i.endBatch()}return this},silentShift:function(t,e){return Z(t)?this.shift(t,!0):V(t)&&Q(e)&&this.shift(t,e,!0),this},renderedPosition:function(t,e){var r=this[0],n=this.cy(),i=n.zoom(),a=n.pan(),o=Z(t)?t:void 0,s=void 0!==o||void 0!==e&&V(t);if(r&&r.isNode()){if(!s){var l=r.position();return o=We(l,i,a),void 0===t?o:o[t]}for(var c=0;c<this.length;c++){var h=this[c];void 0!==e?h.position(t,(e-a[t])/i):void 0!==o&&h.position(Ue(o,i,a))}}else if(!s)return;return this},relativePosition:function(t,e){var r=this[0],n=this.cy(),i=Z(t)?t:void 0,a=void 0!==i||void 0!==e&&V(t),o=n.hasCompoundNodes();if(r&&r.isNode()){if(!a){var s=r.position(),l=o?r.parent():null,c=l&&l.length>0,h=c;c&&(l=l[0]);var u=h?l.position():{x:0,y:0};return i={x:s.x-u.x,y:s.y-u.y},void 0===t?i:i[t]}for(var d=0;d<this.length;d++){var p=this[d],f=o?p.parent():null,g=f&&f.length>0,m=g;g&&(f=f[0]);var y=m?f.position():{x:0,y:0};void 0!==e?p.position(t,e+y[t]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}},bs.modelPosition=bs.point=bs.position,bs.modelPositions=bs.points=bs.positions,bs.renderedPoint=bs.renderedPosition,bs.relativePoint=bs.relativePosition;var _s,As,Rs=xs;_s=As={},As.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,o=e.x2*n+i.x,s=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},As.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();return e.styleEnabled()&&e.hasCompoundNodes()?(this.forEachUp(function(e){if(e.isParent()){var r=e._private;r.compoundBoundsClean=!1,r.bbCache=null,t||e.emitAndNotify("bounds")}}),this):this},As.updateCompoundBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(t){if(t.isParent()){var e=t._private,r=t.children(),n="include"===t.pstyle("compound-sizing-wrt-labels").value,i={width:{val:t.pstyle("min-width").pfValue,left:t.pstyle("min-width-bias-left"),right:t.pstyle("min-width-bias-right")},height:{val:t.pstyle("min-height").pfValue,top:t.pstyle("min-height-bias-top"),bottom:t.pstyle("min-height-bias-bottom")}},a=r.boundingBox({includeLabels:n,includeOverlays:!1,useCache:!1}),o=e.position;0!==a.w&&0!==a.h||((a={w:t.pstyle("width").pfValue,h:t.pstyle("height").pfValue}).x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var l=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var c=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(c=100*c/i.height.val);var h=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(h=100*h/i.height.val);var u=y(i.width.val-a.w,s,l),d=u.biasDiff,p=u.biasComplementDiff,f=y(i.height.val-a.h,c,h),g=f.biasDiff,m=f.biasComplementDiff;e.autoPadding=function(t,e,r,n){if("%"!==r.units)return"px"===r.units?r.pfValue:0;switch(n){case"width":return t>0?r.pfValue*t:0;case"height":return e>0?r.pfValue*e:0;case"average":return t>0&&e>0?r.pfValue*(t+e)/2:0;case"min":return t>0&&e>0?t>e?r.pfValue*e:r.pfValue*t:0;case"max":return t>0&&e>0?t>e?r.pfValue*t:r.pfValue*e:0;default:return 0}}(a.w,a.h,t.pstyle("padding"),t.pstyle("padding-relative-to").value),e.autoWidth=Math.max(a.w,i.width.val),o.x=(-d+a.x1+a.x2+p)/2,e.autoHeight=Math.max(a.h,i.height.val),o.y=(-g+a.y1+a.y2+m)/2}function y(t,e,r){var n=0,i=0,a=e+r;return t>0&&a>0&&(n=e/a*t,i=r/a*t),{biasDiff:n,biasComplementDiff:i}}}for(var n=0;n<this.length;n++){var i=this[n],a=i._private;a.compoundBoundsClean&&!t||(r(i),e.batching()||(a.compoundBoundsClean=!0))}return this};var Ls=function(t){return t===1/0||t===-1/0?0:t},Is=function(t,e,r,n,i){n-e!==0&&i-r!==0&&null!=e&&null!=r&&null!=n&&null!=i&&(t.x1=e<t.x1?e:t.x1,t.x2=n>t.x2?n:t.x2,t.y1=r<t.y1?r:t.y1,t.y2=i>t.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},Ds=function(t,e){return null==e?t:Is(t,e.x1,e.y1,e.x2,e.y2)},Ns=function(t,e,r){return ge(t,e,r)},Ms=function(t,e,r){if(!e.cy().headless()){var n,i,a=e._private,o=a.rstyle,s=o.arrowWidth/2;if("none"!==e.pstyle(r+"-arrow-shape").value){"source"===r?(n=o.srcX,i=o.srcY):"target"===r?(n=o.tgtX,i=o.tgtY):(n=o.midX,i=o.midY);var l=a.arrowBounds=a.arrowBounds||{},c=l[r]=l[r]||{};c.x1=n-s,c.y1=i-s,c.x2=n+s,c.y2=i+s,c.w=c.x2-c.x1,c.h=c.y2-c.y1,ar(c,1),Is(t,c.x1,c.y1,c.x2,c.y2)}}},Os=function(t,e,r){if(!e.cy().headless()){var n;n=r?r+"-":"";var i=e._private,a=i.rstyle;if(e.pstyle(n+"label").strValue){var o,s,l,c,h=e.pstyle("text-halign"),u=e.pstyle("text-valign"),d=Ns(a,"labelWidth",r),p=Ns(a,"labelHeight",r),f=Ns(a,"labelX",r),g=Ns(a,"labelY",r),m=e.pstyle(n+"text-margin-x").pfValue,y=e.pstyle(n+"text-margin-y").pfValue,v=e.isEdge(),b=e.pstyle(n+"text-rotation"),x=e.pstyle("text-outline-width").pfValue,T=e.pstyle("text-border-width").pfValue/2,w=e.pstyle("text-background-padding").pfValue,k=p,C=d,E=C/2,S=k/2;if(v)o=f-E,s=f+E,l=g-S,c=g+S;else{switch(h.value){case"left":o=f-C,s=f;break;case"center":o=f-E,s=f+E;break;case"right":o=f,s=f+C}switch(u.value){case"top":l=g-k,c=g;break;case"center":l=g-S,c=g+S;break;case"bottom":l=g,c=g+k}}var _=m-Math.max(x,T)-w-2,A=m+Math.max(x,T)+w+2,R=y-Math.max(x,T)-w-2,L=y+Math.max(x,T)+w+2;o+=_,s+=A,l+=R,c+=L;var I=r||"main",D=i.labelBounds,N=D[I]=D[I]||{};N.x1=o,N.y1=l,N.x2=s,N.y2=c,N.w=s-o,N.h=c-l,N.leftPad=_,N.rightPad=A,N.topPad=R,N.botPad=L;var M=v&&"autorotate"===b.strValue,O=null!=b.pfValue&&0!==b.pfValue;if(M||O){var $=M?Ns(i.rstyle,"labelAngle",r):b.pfValue,P=Math.cos($),B=Math.sin($),F=(o+s)/2,z=(l+c)/2;if(!v){switch(h.value){case"left":F=s;break;case"right":F=o}switch(u.value){case"top":z=c;break;case"bottom":z=l}}var K=function(t,e){return{x:(t-=F)*P-(e-=z)*B+F,y:t*B+e*P+z}},j=K(o,l),q=K(o,c),W=K(s,l),U=K(s,c);o=Math.min(j.x,q.x,W.x,U.x),s=Math.max(j.x,q.x,W.x,U.x),l=Math.min(j.y,q.y,W.y,U.y),c=Math.max(j.y,q.y,W.y,U.y)}var G=I+"Rot",Y=D[G]=D[G]||{};Y.x1=o,Y.y1=l,Y.x2=s,Y.y2=c,Y.w=s-o,Y.h=c-l,Is(t,o,l,s,c),Is(i.labelBounds.all,o,l,s,c)}return t}},$s=function(t,e){if(!e.cy().headless()){var r=e.pstyle("outline-opacity").value,n=e.pstyle("outline-width").value+e.pstyle("outline-offset").value;Ps(t,e,r,n,"outside",n/2)}},Ps=function(t,e,r,n,i,a){if(!(0===r||n<=0||"inside"===i)){var o=e.cy().renderer(),s=o.nodeShapes[o.getNodeShape(e)];if(s){var l=e.position(),c=l.x,h=l.y,u=e.width(),d=e.height();if(s.hasMiterBounds){"center"===i&&(n/=2);var p=s.miterBounds(c,h,u,d,n);Ds(t,p)}else null!=a&&a>0&&or(t,[a,a,a,a])}}},Bs=function(t,e){var r,n,i,a,o,s,l,c=t._private.cy,h=c.styleEnabled(),u=c.headless(),d=rr(),p=t._private,f=t.isNode(),g=t.isEdge(),m=p.rstyle,y=f&&h?t.pstyle("bounds-expansion").pfValue:[0],v=function(t){return"none"!==t.pstyle("display").value},b=!h||v(t)&&(!g||v(t.source())&&v(t.target()));if(b){var x=0;h&&e.includeOverlays&&0!==t.pstyle("overlay-opacity").value&&(x=t.pstyle("overlay-padding").value);var T=0;h&&e.includeUnderlays&&0!==t.pstyle("underlay-opacity").value&&(T=t.pstyle("underlay-padding").value);var w=Math.max(x,T),k=0;if(h&&(k=t.pstyle("width").pfValue/2),f&&e.includeNodes){var C=t.position();o=C.x,s=C.y;var E=t.outerWidth()/2,S=t.outerHeight()/2;Is(d,r=o-E,i=s-S,n=o+E,a=s+S),h&&$s(d,t),h&&e.includeOutlines&&!u&&$s(d,t),h&&function(t,e){if(!e.cy().headless()){var r=e.pstyle("border-opacity").value,n=e.pstyle("border-width").pfValue,i=e.pstyle("border-position").value;Ps(t,e,r,n,i)}}(d,t)}else if(g&&e.includeEdges)if(h&&!u){var _=t.pstyle("curve-style").strValue;if(r=Math.min(m.srcX,m.midX,m.tgtX),n=Math.max(m.srcX,m.midX,m.tgtX),i=Math.min(m.srcY,m.midY,m.tgtY),a=Math.max(m.srcY,m.midY,m.tgtY),Is(d,r-=k,i-=k,n+=k,a+=k),"haystack"===_){var A=m.haystackPts;if(A&&2===A.length){if(r=A[0].x,i=A[0].y,r>(n=A[1].x)){var R=r;r=n,n=R}if(i>(a=A[1].y)){var L=i;i=a,a=L}Is(d,r-k,i-k,n+k,a+k)}}else if("bezier"===_||"unbundled-bezier"===_||dt(_,"segments")||dt(_,"taxi")){var I;switch(_){case"bezier":case"unbundled-bezier":I=m.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":I=m.linePts}if(null!=I)for(var D=0;D<I.length;D++){var N=I[D];r=N.x-k,n=N.x+k,i=N.y-k,a=N.y+k,Is(d,r,i,n,a)}}}else{var M=t.source().position(),O=t.target().position();if((r=M.x)>(n=O.x)){var $=r;r=n,n=$}if((i=M.y)>(a=O.y)){var P=i;i=a,a=P}Is(d,r-=k,i-=k,n+=k,a+=k)}if(h&&e.includeEdges&&g&&(Ms(d,t,"mid-source"),Ms(d,t,"mid-target"),Ms(d,t,"source"),Ms(d,t,"target")),h)if("yes"===t.pstyle("ghost").value){var B=t.pstyle("ghost-offset-x").pfValue,F=t.pstyle("ghost-offset-y").pfValue;Is(d,d.x1+B,d.y1+F,d.x2+B,d.y2+F)}var z=p.bodyBounds=p.bodyBounds||{};sr(z,d),or(z,y),ar(z,1),h&&(r=d.x1,n=d.x2,i=d.y1,a=d.y2,Is(d,r-w,i-w,n+w,a+w));var K=p.overlayBounds=p.overlayBounds||{};sr(K,d),or(K,y),ar(K,1);var j=p.labelBounds=p.labelBounds||{};null!=j.all?((l=j.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):j.all=rr(),h&&e.includeLabels&&(e.includeMainLabels&&Os(d,t,null),g&&(e.includeSourceLabels&&Os(d,t,"source"),e.includeTargetLabels&&Os(d,t,"target")))}return d.x1=Ls(d.x1),d.y1=Ls(d.y1),d.x2=Ls(d.x2),d.y2=Ls(d.y2),d.w=Ls(d.x2-d.x1),d.h=Ls(d.y2-d.y1),d.w>0&&d.h>0&&b&&(or(d,y),ar(d,1)),d},Fs=function(t){var e=0,r=function(t){return(t?1:0)<<e++},n=0;return n+=r(t.incudeNodes),n+=r(t.includeEdges),n+=r(t.includeLabels),n+=r(t.includeMainLabels),n+=r(t.includeSourceLabels),n+=r(t.includeTargetLabels),n+=r(t.includeOverlays),n+=r(t.includeOutlines)},zs=function(t){var e=function(t){return Math.round(t)};if(t.isEdge()){var r=t.source().position(),n=t.target().position();return Gt([e(r.x),e(r.y),e(n.x),e(n.y)])}var i=t.position();return Gt([e(i.x),e(i.y)])},Ks=function(t,e){var r,n=t._private,i=t.isEdge(),a=(null==e?qs:Fs(e))===qs;if(null==n.bbCache?(r=Bs(t,js),n.bbCache=r,n.bbCachePosKey=zs(t)):r=n.bbCache,!a){var o=t.isNode();r=rr(),(e.includeNodes&&o||e.includeEdges&&!o)&&(e.includeOverlays?Ds(r,n.overlayBounds):Ds(r,n.bodyBounds)),e.includeLabels&&(e.includeMainLabels&&(!i||e.includeSourceLabels&&e.includeTargetLabels)?Ds(r,n.labelBounds.all):(e.includeMainLabels&&Ds(r,n.labelBounds.mainRot),e.includeSourceLabels&&Ds(r,n.labelBounds.sourceRot),e.includeTargetLabels&&Ds(r,n.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1}return r},js={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},qs=Fs(js),Ws=de(js);As.boundingBox=function(t){var e,r=void 0===t||void 0===t.useCache||!0===t.useCache,n=st(function(t){var e=t._private;return null==e.bbCache||e.styleDirty||e.bbCachePosKey!==zs(t)},function(t){return t.id()});if(r&&1===this.length&&!n(this[0]))t=void 0===t?js:Ws(t),e=Ks(this[0],t);else{e=rr();var i=Ws(t=t||js),a=this,o=a.cy().styleEnabled();this.edges().forEach(n),this.nodes().forEach(n),o&&this.recalculateRenderedStyle(r),this.updateCompoundBounds(!r);for(var s=0;s<a.length;s++){var l=a[s];n(l)&&l.dirtyBoundingBoxCache(),Ds(e,Ks(l,i))}}return e.x1=Ls(e.x1),e.y1=Ls(e.y1),e.x2=Ls(e.x2),e.y2=Ls(e.y2),e.w=Ls(e.x2-e.x1),e.h=Ls(e.y2-e.y1),e},As.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},As.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),i=r.collection();if(n&&(i=e.filter(function(t){return t.isParent()}),e=e.not(i)),Z(t)){var a=t;t=function(){return a}}r.startBatch(),e.forEach(function(e,r){return e._private.bbAtOldPos=t(e,r)}).silentPositions(t),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var o=function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}}(this.boundingBox({useCache:!1}));return e.silentPositions(function(t){return t._private.bbAtOldPos}),n&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),r.endBatch(),o},_s.boundingbox=_s.bb=_s.boundingBox,_s.renderedBoundingbox=_s.renderedBoundingBox;var Us,Gs,Ys=As;Us=Gs={};var Vs=function(t){t.uppercaseName=ut(t.name),t.autoName="auto"+t.uppercaseName,t.labelName="label"+t.uppercaseName,t.outerName="outer"+t.uppercaseName,t.uppercaseOuterName=ut(t.outerName),Us[t.name]=function(){var e=this[0],r=e._private,n=r.cy._private.styleEnabled;if(e){if(n){if(e.isParent())return e.updateCompoundBounds(),r[t.autoName]||0;var i=e.pstyle(t.name);return"label"===i.strValue?(e.recalculateRenderedStyle(),r.rstyle[t.labelName]||0):i.pfValue}return 1}},Us["outer"+t.uppercaseName]=function(){var e=this[0],r=e._private.cy._private.styleEnabled;if(e){if(r){var n=e[t.name](),i=e.pstyle("border-position").value;return n+("center"===i?e.pstyle("border-width").pfValue:"outside"===i?2*e.pstyle("border-width").pfValue:0)+2*e.padding()}return 1}},Us["rendered"+t.uppercaseName]=function(){var e=this[0];if(e)return e[t.name]()*this.cy().zoom()},Us["rendered"+t.uppercaseOuterName]=function(){var e=this[0];if(e)return e[t.outerName]()*this.cy().zoom()}};Vs({name:"width"}),Vs({name:"height"}),Gs.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),void 0!==e.autoPadding?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue},Gs.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},Gs.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var Hs=Gs,Xs={controlPoints:{get:function(t){return t.renderer().getControlPoints(t)},mult:!0},segmentPoints:{get:function(t){return t.renderer().getSegmentPoints(t)},mult:!0},sourceEndpoint:{get:function(t){return t.renderer().getSourceEndpoint(t)}},targetEndpoint:{get:function(t){return t.renderer().getTargetEndpoint(t)}},midpoint:{get:function(t){return t.renderer().getEdgeMidpoint(t)}}},Zs=Object.keys(Xs).reduce(function(t,e){var r=Xs[e],n=function(t){return"rendered"+t[0].toUpperCase()+t.substr(1)}(e);return t[e]=function(){return function(t,e){if(t.isEdge()&&t.takesUpSpace())return e(t)}(this,r.get)},r.mult?t[n]=function(){return function(t,e){if(t.isEdge()&&t.takesUpSpace()){var r=t.cy(),n=r.pan(),i=r.zoom();return e(t).map(function(t){return We(t,i,n)})}}(this,r.get)}:t[n]=function(){return function(t,e){if(t.isEdge()&&t.takesUpSpace()){var r=t.cy();return We(e(t),r.zoom(),r.pan())}}(this,r.get)},t},{}),Qs=bt({},Rs,Ys,Hs,Zs),Js=function(t,e){this.recycle(t,e)};function tl(){return!1}function el(){return!0}Js.prototype={instanceString:function(){return"event"},recycle:function(t,e){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=tl,null!=t&&t.preventDefault?(this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?el:tl):null!=t&&t.type?e=t:this.type=t,null!=e&&(this.originalEvent=e.originalEvent,this.type=null!=e.type?e.type:this.type,this.cy=e.cy,this.target=e.target,this.position=e.position,this.renderedPosition=e.renderedPosition,this.namespace=e.namespace,this.layout=e.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var r=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:r.x*n+i.x,y:r.y*n+i.y}}this.timeStamp=t&&t.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=el;var t=this.originalEvent;t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.isPropagationStopped=el;var t=this.originalEvent;t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=el,this.stopPropagation()},isDefaultPrevented:tl,isPropagationStopped:tl,isImmediatePropagationStopped:tl};var rl=/^([^.]+)(\.(?:[^.]+))?$/,nl={qualifierCompare:function(t,e){return t===e},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(t){return t},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},il=Object.keys(nl),al={};function ol(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:al,e=arguments.length>1?arguments[1]:void 0,r=0;r<il.length;r++){var n=il[r];this[n]=t[n]||nl[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}var sl=ol.prototype,ll=function(t,e,r,n,i,a,o){H(n)&&(i=n,n=null),o&&(a=null==a?o:bt({},a,o));for(var s=X(r)?r:r.split(/\s+/),l=0;l<s.length;l++){var c=s[l];if(!at(c)){var h=c.match(rl);if(h)if(!1===e(t,c,h[1],h[2]?h[2]:null,n,i,a))break}}},cl=function(t,e){return t.addEventFields(t.context,e),new Js(e.type,e)},hl=function(t,e,r){if("event"!==Y(r))if(Z(r))e(t,cl(t,r));else for(var n=X(r)?r:r.split(/\s+/),i=0;i<n.length;i++){var a=n[i];if(!at(a)){var o=a.match(rl);if(o){var s=o[1],l=o[2]?o[2]:null;e(t,cl(t,{type:s,namespace:l,target:t.context}))}}}else e(t,r)};sl.on=sl.addListener=function(t,e,r,n,i){return ll(this,function(t,e,r,n,i,a,o){H(a)&&t.listeners.push({event:e,callback:a,type:r,namespace:n,qualifier:i,conf:o})},t,e,r,n,i),this},sl.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})},sl.removeListener=sl.off=function(t,e,r,n){var i=this;0!==this.emitting&&(this.listeners=this.listeners.slice());for(var a=this.listeners,o=function(o){var s=a[o];ll(i,function(e,r,n,i,l,c){if((s.type===n||"*"===t)&&(!i&&".*"!==s.namespace||s.namespace===i)&&(!l||e.qualifierCompare(s.qualifier,l))&&(!c||s.callback===c))return a.splice(o,1),!1},t,e,r,n)},s=a.length-1;s>=0;s--)o(s);return this},sl.removeAllListeners=function(){return this.removeListener("*")},sl.emit=sl.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,X(e)||(e=[e]),hl(this,function(t,a){null!=r&&(n=[{event:a.event,type:a.type,namespace:a.namespace,callback:r}],i=n.length);for(var o=function(){var r=n[s];if(r.type===a.type&&(!r.namespace||r.namespace===a.namespace||".*"===r.namespace)&&t.eventMatches(t.context,r,a)){var i=[a];null!=e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.push(n)}}(i,e),t.beforeEmit(t.context,r,a),r.conf&&r.conf.one&&(t.listeners=t.listeners.filter(function(t){return t!==r}));var o=t.callbackContext(t.context,r,a),l=r.callback.apply(o,i);t.afterEmit(t.context,r,a),!1===l&&(a.stopPropagation(),a.preventDefault())}},s=0;s<i;s++)o();t.bubble(t.context)&&!a.isPropagationStopped()&&t.parent(t.context).emit(a,e)},t),this.emitting--,this};var ul={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,r){var n=e.qualifier;return null==n||t!==r.target&&et(r.target)&&n.matches(r.target)},addEventFields:function(t,e){e.cy=t.cy(),e.target=t},callbackContext:function(t,e,r){return null!=e.qualifier?r.target:t},beforeEmit:function(t,e){e.conf&&e.conf.once&&e.conf.onceCollection.removeListener(e.event,e.qualifier,e.callback)},bubble:function(){return!0},parent:function(t){return t.isChild()?t.parent():t.cy()}},dl=function(t){return V(t)?new ls(t):t},pl={createEmitter:function(){for(var t=0;t<this.length;t++){var e=this[t],r=e._private;r.emitter||(r.emitter=new ol(ul,e))}return this},emitter:function(){return this._private.emitter},on:function(t,e,r){for(var n=dl(e),i=0;i<this.length;i++){this[i].emitter().on(t,n,r)}return this},removeListener:function(t,e,r){for(var n=dl(e),i=0;i<this.length;i++){this[i].emitter().removeListener(t,n,r)}return this},removeAllListeners:function(){for(var t=0;t<this.length;t++){this[t].emitter().removeAllListeners()}return this},one:function(t,e,r){for(var n=dl(e),i=0;i<this.length;i++){this[i].emitter().one(t,n,r)}return this},once:function(t,e,r){for(var n=dl(e),i=0;i<this.length;i++){this[i].emitter().on(t,n,r,{once:!0,onceCollection:this})}},emit:function(t,e){for(var r=0;r<this.length;r++){this[r].emitter().emit(t,e)}return this},emitAndNotify:function(t,e){if(0!==this.length)return this.cy().notify(t,this),this.emit(t,e),this}};Co.eventAliasesOn(pl);var fl={nodes:function(t){return this.filter(function(t){return t.isNode()}).filter(t)},edges:function(t){return this.filter(function(t){return t.isEdge()}).filter(t)},byGroup:function(){for(var t=this.spawn(),e=this.spawn(),r=0;r<this.length;r++){var n=this[r];n.isNode()?t.push(n):e.push(n)}return{nodes:t,edges:e}},filter:function(t,e){if(void 0===t)return this;if(V(t)||tt(t))return new ls(t).filter(this);if(H(t)){for(var r=this.spawn(),n=this,i=0;i<n.length;i++){var a=n[i];(e?t.apply(e,[a,i,n]):t(a,i,n))&&r.push(a)}return r}return this.spawn()},not:function(t){if(t){V(t)&&(t=this.filter(t));for(var e=this.spawn(),r=0;r<this.length;r++){var n=this[r];t.has(n)||e.push(n)}return e}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(t){if(V(t)){var e=t;return this.filter(e)}for(var r=this.spawn(),n=t,i=this.length<t.length,a=i?this:n,o=i?n:this,s=0;s<a.length;s++){var l=a[s];o.has(l)&&r.push(l)}return r},xor:function(t){var e=this._private.cy;V(t)&&(t=e.$(t));var r=this.spawn(),n=t,i=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],a=i._private.data.id;e.hasElementWithId(a)||r.push(i)}};return i(this,n),i(n,this),r},diff:function(t){var e=this._private.cy;V(t)&&(t=e.$(t));var r=this.spawn(),n=this.spawn(),i=this.spawn(),a=t,o=function(t,e,r){for(var n=0;n<t.length;n++){var a=t[n],o=a._private.data.id;e.hasElementWithId(o)?i.merge(a):r.push(a)}};return o(this,a,r),o(a,this,n),{left:r,right:n,both:i}},add:function(t){var e=this._private.cy;if(!t)return this;if(V(t)){var r=t;t=e.mutableElements().filter(r)}for(var n=this.spawnSelf(),i=0;i<t.length;i++){var a=t[i],o=!this.has(a);o&&n.push(a)}return n},merge:function(t){var e=this._private,r=e.cy;if(!t)return this;if(t&&V(t)){var n=t;t=r.mutableElements().filter(n)}for(var i=e.map,a=0;a<t.length;a++){var o=t[a],s=o._private.data.id;if(!i.has(s)){var l=this.length++;this[l]=o,i.set(s,{ele:o,index:l})}}return this},unmergeAt:function(t){var e=this[t].id(),r=this._private.map;this[t]=void 0,r.delete(e);var n=t===this.length-1;if(this.length>1&&!n){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[t]=a,r.set(o,{ele:a,index:t})}return this.length--,this},unmergeOne:function(t){t=t[0];var e=this._private,r=t._private.data.id,n=e.map.get(r);if(!n)return this;var i=n.index;return this.unmergeAt(i),this},unmerge:function(t){var e=this._private.cy;if(!t)return this;if(t&&V(t)){var r=t;t=e.mutableElements().filter(r)}for(var n=0;n<t.length;n++)this.unmergeOne(t[n]);return this},unmergeBy:function(t){for(var e=this.length-1;e>=0;e--){t(this[e])&&this.unmergeAt(e)}return this},map:function(t,e){for(var r=[],n=this,i=0;i<n.length;i++){var a=n[i],o=e?t.apply(e,[a,i,n]):t(a,i,n);r.push(o)}return r},reduce:function(t,e){for(var r=e,n=this,i=0;i<n.length;i++)r=t(r,n[i],i,n);return r},max:function(t,e){for(var r,n=-1/0,i=this,a=0;a<i.length;a++){var o=i[a],s=e?t.apply(e,[o,a,i]):t(o,a,i);s>n&&(n=s,r=o)}return{value:n,ele:r}},min:function(t,e){for(var r,n=1/0,i=this,a=0;a<i.length;a++){var o=i[a],s=e?t.apply(e,[o,a,i]):t(o,a,i);s<n&&(n=s,r=o)}return{value:n,ele:r}}},gl=fl;gl.u=gl["|"]=gl["+"]=gl.union=gl.or=gl.add,gl["\\"]=gl["!"]=gl["-"]=gl.difference=gl.relativeComplement=gl.subtract=gl.not,gl.n=gl["&"]=gl["."]=gl.and=gl.intersection=gl.intersect,gl["^"]=gl["(+)"]=gl["(-)"]=gl.symmetricDifference=gl.symdiff=gl.xor,gl.fnFilter=gl.filterFn=gl.stdFilter=gl.filter,gl.complement=gl.abscomp=gl.absoluteComplement;var ml=function(t,e){var r=t.cy().hasCompoundNodes();function n(t){var e=t.pstyle("z-compound-depth");return"auto"===e.value?r?t.zDepth():0:"bottom"===e.value?-1:"top"===e.value?te:0}var i=n(t)-n(e);if(0!==i)return i;function a(t){return"auto"===t.pstyle("z-index-compare").value&&t.isNode()?1:0}var o=a(t)-a(e);if(0!==o)return o;var s=t.pstyle("z-index").value-e.pstyle("z-index").value;return 0!==s?s:t.poolIndex()-e.poolIndex()},yl={forEach:function(t,e){if(H(t))for(var r=this.length,n=0;n<r;n++){var i=this[n];if(!1===(e?t.apply(e,[i,n,this]):t(i,n,this)))break}return this},toArray:function(){for(var t=[],e=0;e<this.length;e++)t.push(this[e]);return t},slice:function(t,e){var r=[],n=this.length;null==e&&(e=n),null==t&&(t=0),t<0&&(t=n+t),e<0&&(e=n+e);for(var i=t;i>=0&&i<e&&i<n;i++)r.push(this[i]);return this.spawn(r)},size:function(){return this.length},eq:function(t){return this[t]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(t){if(!H(t))return this;var e=this.toArray().sort(t);return this.spawn(e)},sortByZIndex:function(){return this.sort(ml)},zDepth:function(){var t=this[0];if(t){var e=t._private;if("nodes"===e.group){var r=e.data.parent?t.parents().size():0;return t.isParent()?r:te-1}var n=e.source,i=e.target,a=n.zDepth(),o=i.zDepth();return Math.max(a,o,0)}}};yl.each=yl.forEach;var vl;vl="undefined",("undefined"==typeof Symbol?"undefined":u(Symbol))!=vl&&u(Symbol.iterator)!=vl&&(yl[Symbol.iterator]=function(){var t=this,e={value:void 0,done:!1},r=0,n=this.length;return s({next:function(){return r<n?e.value=t[r++]:(e.value=void 0,e.done=!0),e}},Symbol.iterator,function(){return this})});var bl=de({nodeDimensionsIncludeLabels:!1}),xl={layoutDimensions:function(t){var e;if(t=bl(t),this.takesUpSpace())if(t.nodeDimensionsIncludeLabels){var r=this.boundingBox();e={w:r.w,h:r.h}}else e={w:this.outerWidth(),h:this.outerHeight()};else e={w:0,h:0};return 0!==e.w&&0!==e.h||(e.w=e.h=1),e},layoutPositions:function(t,e,r){var n=this.nodes().filter(function(t){return!t.isParent()}),i=this.cy(),a=e.eles,o=function(t){return t.id()},s=st(r,o);t.emit({type:"layoutstart",layout:t}),t.animations=[];var l=e.spacingFactor&&1!==e.spacingFactor,c=function(){if(!l)return null;for(var t=rr(),e=0;e<n.length;e++){var r=n[e],i=s(r,e);ir(t,i.x,i.y)}return t}(),h=st(function(t,r){var n=s(t,r);l&&(n=function(t,e,r){var n=e.x1+e.w/2,i=e.y1+e.h/2;return{x:n+(r.x-n)*t,y:i+(r.y-i)*t}}(Math.abs(e.spacingFactor),c,n));return null!=e.transform&&(n=e.transform(t,n)),n},o);if(e.animate){for(var u=0;u<n.length;u++){var d=n[u],p=h(d,u);if(null==e.animateFilter||e.animateFilter(d,u)){var f=d.animation({position:p,duration:e.animationDuration,easing:e.animationEasing});t.animations.push(f)}else d.position(p)}if(e.fit){var g=i.animation({fit:{boundingBox:a.boundingBoxAt(h),padding:e.padding},duration:e.animationDuration,easing:e.animationEasing});t.animations.push(g)}else if(void 0!==e.zoom&&void 0!==e.pan){var m=i.animation({zoom:e.zoom,pan:e.pan,duration:e.animationDuration,easing:e.animationEasing});t.animations.push(m)}t.animations.forEach(function(t){return t.play()}),t.one("layoutready",e.ready),t.emit({type:"layoutready",layout:t}),Zn.all(t.animations.map(function(t){return t.promise()})).then(function(){t.one("layoutstop",e.stop),t.emit({type:"layoutstop",layout:t})})}else n.positions(h),e.fit&&i.fit(e.eles,e.padding),null!=e.zoom&&i.zoom(e.zoom),e.pan&&i.pan(e.pan),t.one("layoutready",e.ready),t.emit({type:"layoutready",layout:t}),t.one("layoutstop",e.stop),t.emit({type:"layoutstop",layout:t});return this},layout:function(t){return this.cy().makeLayout(bt({},t,{eles:this}))}};function Tl(t,e,r){var n,i=r._private,a=i.styleCache=i.styleCache||[];return null!=(n=a[t])?n:n=a[t]=e(r)}function wl(t,e){return t=Yt(t),function(r){return Tl(t,e,r)}}function kl(t,e){t=Yt(t);var r=function(t){return e.call(t)};return function(){var e=this[0];if(e)return Tl(t,r,e)}}xl.createLayout=xl.makeLayout=xl.layout;var Cl={recalculateRenderedStyle:function(t){var e=this.cy(),r=e.renderer(),n=e.styleEnabled();return r&&n&&r.recalculateRenderedStyle(this,t),this},dirtyStyleCache:function(){var t,e=this.cy(),r=function(t){return t._private.styleCache=null};e.hasCompoundNodes()?((t=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(t.connectedEdges()),t.forEach(r)):this.forEach(function(t){r(t),t.connectedEdges().forEach(r)});return this},updateStyle:function(t){var e=this._private.cy;if(!e.styleEnabled())return this;if(e.batching())return e._private.batchStyleEles.merge(this),this;var r=this;t=!(!t&&void 0!==t),e.hasCompoundNodes()&&(r=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var n=r;return t?n.emitAndNotify("style"):n.emit("style"),r.forEach(function(t){return t._private.styleDirty=!0}),this},cleanStyle:function(){var t=this.cy();if(t.styleEnabled())for(var e=0;e<this.length;e++){var r=this[e];r._private.styleDirty&&(r._private.styleDirty=!1,t.style().apply(r))}},parsedStyle:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this[0],n=r.cy();if(n.styleEnabled()&&r){r._private.styleDirty&&(r._private.styleDirty=!1,n.style().apply(r));var i=r._private.style[t];return null!=i?i:e?n.style().getDefaultProperty(t):null}},numericStyle:function(t){var e=this[0];if(e.cy().styleEnabled()&&e){var r=e.pstyle(t);return void 0!==r.pfValue?r.pfValue:r.value}},numericStyleUnits:function(t){var e=this[0];if(e.cy().styleEnabled())return e?e.pstyle(t).units:void 0},renderedStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var r=this[0];return r?e.style().getRenderedStyle(r,t):void 0},style:function(t,e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style();if(Z(t)){var a=t;i.applyBypass(this,a,n),this.emitAndNotify("style")}else if(V(t)){if(void 0===e){var o=this[0];return o?i.getStylePropertyValue(o,t):void 0}i.applyBypass(this,t,e,n),this.emitAndNotify("style")}else if(void 0===t){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(t){var e=this.cy();if(!e.styleEnabled())return this;var r=!1,n=e.style(),i=this;if(void 0===t)for(var a=0;a<i.length;a++){var o=i[a];n.removeAllBypasses(o,r)}else{t=t.split(/\s+/);for(var s=0;s<i.length;s++){var l=i[s];n.removeBypasses(l,t,r)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var t=this.cy();if(!t.styleEnabled())return 1;var e=t.hasCompoundNodes(),r=this[0];if(r){var n=r._private,i=r.pstyle("opacity").value;if(!e)return i;var a=n.data.parent?r.parents():null;if(a)for(var o=0;o<a.length;o++){i*=a[o].pstyle("opacity").value}return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var t=this[0],e=t.cy().hasCompoundNodes();return t?e?0===t.effectiveOpacity():0===t.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function El(t,e){var r=t._private.data.parent?t.parents():null;if(r)for(var n=0;n<r.length;n++){if(!e(r[n]))return!1}return!0}function Sl(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var t=this.cy();if(!t.styleEnabled())return!0;var i=this[0],a=t.hasCompoundNodes();if(i){var o=i._private;if(!e(i))return!1;if(i.isNode())return!a||El(i,n);var s=o.source,l=o.target;return r(s)&&(!a||El(s,r))&&(s===l||r(l)&&(!a||El(l,r)))}}}var _l=wl("eleTakesUpSpace",function(t){return"element"===t.pstyle("display").value&&0!==t.width()&&(!t.isNode()||0!==t.height())});Cl.takesUpSpace=kl("takesUpSpace",Sl({ok:_l}));var Al=wl("eleInteractive",function(t){return"yes"===t.pstyle("events").value&&"visible"===t.pstyle("visibility").value&&_l(t)}),Rl=wl("parentInteractive",function(t){return"visible"===t.pstyle("visibility").value&&_l(t)});Cl.interactive=kl("interactive",Sl({ok:Al,parentOk:Rl,edgeOkViaNode:_l})),Cl.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var Ll=wl("eleVisible",function(t){return"visible"===t.pstyle("visibility").value&&0!==t.pstyle("opacity").pfValue&&_l(t)}),Il=_l;Cl.visible=kl("visible",Sl({ok:Ll,edgeOkViaNode:Il})),Cl.hidden=function(){var t=this[0];if(t)return!t.visible()},Cl.isBundledBezier=kl("isBundledBezier",function(){return!!this.cy().styleEnabled()&&(!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace())}),Cl.bypass=Cl.css=Cl.style,Cl.renderedCss=Cl.renderedStyle,Cl.removeBypass=Cl.removeCss=Cl.removeStyle,Cl.pstyle=Cl.parsedStyle;var Dl={};function Nl(t){return function(){var e=arguments,r=[];if(2===e.length){var n=e[0],i=e[1];this.on(t.event,n,i)}else if(1===e.length&&H(e[0])){var a=e[0];this.on(t.event,a)}else if(0===e.length||1===e.length&&X(e[0])){for(var o=1===e.length?e[0]:null,s=0;s<this.length;s++){var l=this[s],c=!t.ableField||l._private[t.ableField],h=l._private[t.field]!=t.value;if(t.overrideAble){var u=t.overrideAble(l);if(void 0!==u&&(c=u,!u))return this}c&&(l._private[t.field]=t.value,h&&r.push(l))}var d=this.spawn(r);d.updateStyle(),d.emit(t.event),o&&d.emit(o)}return this}}function Ml(t){Dl[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(void 0!==r)return r}return e._private[t.field]}},Dl[t.on]=Nl({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Dl[t.off]=Nl({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}Ml({field:"locked",overrideField:function(t){return!!t.cy().autolock()||void 0},on:"lock",off:"unlock"}),Ml({field:"grabbable",overrideField:function(t){return!t.cy().autoungrabify()&&!t.pannable()&&void 0},on:"grabify",off:"ungrabify"}),Ml({field:"selected",ableField:"selectable",overrideAble:function(t){return!t.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),Ml({field:"selectable",overrideField:function(t){return!t.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),Dl.deselect=Dl.unselect,Dl.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},Ml({field:"active",on:"activate",off:"unactivate"}),Ml({field:"pannable",on:"panify",off:"unpanify"}),Dl.inactive=function(){var t=this[0];if(t)return!t._private.active};var Ol={},$l=function(t){return function(e){for(var r=[],n=0;n<this.length;n++){var i=this[n];if(i.isNode()){for(var a=!1,o=i.connectedEdges(),s=0;s<o.length;s++){var l=o[s],c=l.source(),h=l.target();if(t.noIncomingEdges&&h===i&&c!==i||t.noOutgoingEdges&&c===i&&h!==i){a=!0;break}}a||r.push(i)}}return this.spawn(r,!0).filter(e)}},Pl=function(t){return function(e){for(var r=[],n=0;n<this.length;n++){var i=this[n];if(i.isNode())for(var a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),c=s.target();t.outgoing&&l===i?(r.push(s),r.push(c)):t.incoming&&c===i&&(r.push(s),r.push(l))}}return this.spawn(r,!0).filter(e)}},Bl=function(t){return function(e){for(var r=this,n=[],i={};;){var a=t.outgoing?r.outgoers():r.incomers();if(0===a.length)break;for(var o=!1,s=0;s<a.length;s++){var l=a[s],c=l.id();i[c]||(i[c]=!0,n.push(l),o=!0)}if(!o)break;r=a}return this.spawn(n,!0).filter(e)}};function Fl(t){return function(e){for(var r=[],n=0;n<this.length;n++){var i=this[n]._private[t.attr];i&&r.push(i)}return this.spawn(r,!0).filter(e)}}function zl(t){return function(e){var r=[],n=this._private.cy,i=t||{};V(e)&&(e=n.$(e));for(var a=0;a<e.length;a++)for(var o=e[a]._private.edges,s=0;s<o.length;s++){var l=o[s],c=l._private.data,h=this.hasElementWithId(c.source)&&e.hasElementWithId(c.target),u=e.hasElementWithId(c.source)&&this.hasElementWithId(c.target);if(h||u){if(i.thisIsSrc||i.thisIsTgt){if(i.thisIsSrc&&!h)continue;if(i.thisIsTgt&&!u)continue}r.push(l)}}return this.spawn(r,!0)}}function Kl(t){return t=bt({},{codirected:!1},t),function(e){for(var r=[],n=this.edges(),i=t,a=0;a<n.length;a++)for(var o=n[a]._private,s=o.source,l=s._private.data.id,c=o.data.target,h=s._private.edges,u=0;u<h.length;u++){var d=h[u],p=d._private.data,f=p.target,g=p.source,m=f===c&&g===l,y=l===f&&c===g;(i.codirected&&m||!i.codirected&&(m||y))&&r.push(d)}return this.spawn(r,!0).filter(e)}}Ol.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},bt(Ol,{roots:$l({noIncomingEdges:!0}),leaves:$l({noOutgoingEdges:!0}),outgoers:ps(Pl({outgoing:!0}),"outgoers"),successors:Bl({outgoing:!0}),incomers:ps(Pl({incoming:!0}),"incomers"),predecessors:Bl({})}),bt(Ol,{neighborhood:ps(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var i=r[n],a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),c=s.target(),h=i===l?c:l;h.length>0&&e.push(h[0]),e.push(s[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(t){return this.neighborhood().add(this).filter(t)},openNeighborhood:function(t){return this.neighborhood(t)}}),Ol.neighbourhood=Ol.neighborhood,Ol.closedNeighbourhood=Ol.closedNeighborhood,Ol.openNeighbourhood=Ol.openNeighborhood,bt(Ol,{source:ps(function(t){var e,r=this[0];return r&&(e=r._private.source||r.cy().collection()),e&&t?e.filter(t):e},"source"),target:ps(function(t){var e,r=this[0];return r&&(e=r._private.target||r.cy().collection()),e&&t?e.filter(t):e},"target"),sources:Fl({attr:"source"}),targets:Fl({attr:"target"})}),bt(Ol,{edgesWith:ps(zl(),"edgesWith"),edgesTo:ps(zl({thisIsSrc:!0}),"edgesTo")}),bt(Ol,{connectedEdges:ps(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];if(n.isNode())for(var i=n._private.edges,a=0;a<i.length;a++){var o=i[a];e.push(o)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:ps(function(t){for(var e=[],r=0;r<this.length;r++){var n=this[r];n.isEdge()&&(e.push(n.source()[0]),e.push(n.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:ps(Kl(),"parallelEdges"),codirectedEdges:ps(Kl({codirected:!0}),"codirectedEdges")}),bt(Ol,{components:function(t){var e=this,r=e.cy(),n=r.collection(),i=null==t?e.nodes():t.nodes(),a=[];null!=t&&i.empty()&&(i=t.sources());var o=function(t,e){n.merge(t),i.unmerge(t),e.merge(t)};if(i.empty())return e.spawn();var s=function(){var t=r.collection();a.push(t);var n=i[0];o(n,t),e.bfs({directed:!1,roots:n,visit:function(e){return o(e,t)}}),t.forEach(function(r){r.connectedEdges().forEach(function(r){e.has(r)&&t.has(r.source())&&t.has(r.target())&&t.merge(r)})})};do{s()}while(i.length>0);return a},component:function(){var t=this[0];return t.cy().mutableElements().components(t)[0]}}),Ol.componentsOf=Ol.components;var jl=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==t){var i=new ye,a=!1;if(e){if(e.length>0&&Z(e[0])&&!et(e[0])){a=!0;for(var o=[],s=new be,l=0,c=e.length;l<c;l++){var h=e[l];null==h.data&&(h.data={});var u=h.data;if(null==u.id)u.id=ce();else if(t.hasElementWithId(u.id)||s.has(u.id))continue;var d=new xe(t,h,!1);o.push(d),s.add(u.id)}e=o}}else e=[];this.length=0;for(var p=0,f=e.length;p<f;p++){var g=e[p][0];if(null!=g){var m=g._private.data.id;r&&i.has(m)||(r&&i.set(m,{index:this.length,ele:g}),this[this.length]=g,this.length++)}}this._private={eles:this,cy:t,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(t){this.lazyMap=t},rebuildMap:function(){for(var t=this.lazyMap=new ye,e=this.eles,r=0;r<e.length;r++){var n=e[r];t.set(n.id(),{index:r,ele:n})}}},r&&(this._private.map=i),a&&!n&&this.restore()}else ae("A collection must have a reference to the core")},ql=xe.prototype=jl.prototype=Object.create(Array.prototype);ql.instanceString=function(){return"collection"},ql.spawn=function(t,e){return new jl(this.cy(),t,e)},ql.spawnSelf=function(){return this.spawn(this)},ql.cy=function(){return this._private.cy},ql.renderer=function(){return this._private.cy.renderer()},ql.element=function(){return this[0]},ql.collection=function(){return rt(this)?this:new jl(this._private.cy,[this])},ql.unique=function(){return new jl(this._private.cy,this,!0)},ql.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)},ql.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new jl(e)},ql.$id=ql.getElementById,ql.poolIndex=function(){var t=this._private.cy._private.elements,e=this[0]._private.data.id;return t._private.map.get(e).index},ql.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index},ql.indexOfId=function(t){return t=""+t,this._private.map.get(t).index},ql.json=function(t){var e=this.element(),r=this.cy();if(null==e&&t)return this;if(null!=e){var n=e._private;if(Z(t)){if(r.startBatch(),t.data){e.data(t.data);var i=n.data;if(e.isEdge()){var a=!1,o={},s=t.data.source,l=t.data.target;null!=s&&s!=i.source&&(o.source=""+s,a=!0),null!=l&&l!=i.target&&(o.target=""+l,a=!0),a&&(e=e.move(o))}else{var c="parent"in t.data,h=t.data.parent;!c||null==h&&null==i.parent||h==i.parent||(void 0===h&&(h=null),null!=h&&(h=""+h),e=e.move({parent:h}))}}t.position&&e.position(t.position);var u=function(r,i,a){var o=t[r];null!=o&&o!==n[r]&&(o?e[i]():e[a]())};return u("removed","remove","restore"),u("selected","select","unselect"),u("selectable","selectify","unselectify"),u("locked","lock","unlock"),u("grabbable","grabify","ungrabify"),u("pannable","panify","unpanify"),null!=t.classes&&e.classes(t.classes),r.endBatch(),this}if(void 0===t){var d={data:le(n.data),position:le(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:(null,"")},p=0;return n.classes.forEach(function(t){return d.classes+=0===p++?t:" "+t}),d}}},ql.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e].json();t.push(r)}return t},ql.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r].json(),i=new xe(t,n,!1);e.push(i)}return new jl(t,e)},ql.copy=ql.clone,ql.restore=function(){for(var t,e,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),o=a._private,s=[],l=[],c=0,h=i.length;c<h;c++){var u=i[c];n&&!u.removed()||(u.isNode()?s.push(u):l.push(u))}t=s.concat(l);var d=function(){t.splice(e,1),e--};for(e=0;e<t.length;e++){var p=t[e],f=p._private,g=f.data;if(p.clearTraversalCache(),n||f.removed)if(void 0===g.id)g.id=ce();else if(Q(g.id))g.id=""+g.id;else{if(at(g.id)||!V(g.id)){ae("Can not create element with invalid string ID `"+g.id+"`"),d();continue}if(a.hasElementWithId(g.id)){ae("Can not create second element with ID `"+g.id+"`"),d();continue}}else;var m=g.id;if(p.isNode()){var y=f.position;null==y.x&&(y.x=0),null==y.y&&(y.y=0)}if(p.isEdge()){for(var v=p,b=["source","target"],x=b.length,T=!1,w=0;w<x;w++){var k=b[w],C=g[k];Q(C)&&(C=g[k]=""+g[k]),null==C||""===C?(ae("Can not create edge `"+m+"` with unspecified "+k),T=!0):a.hasElementWithId(C)||(ae("Can not create edge `"+m+"` with nonexistent "+k+" `"+C+"`"),T=!0)}if(T){d();continue}var E=a.getElementById(g.source),S=a.getElementById(g.target);E.same(S)?E._private.edges.push(v):(E._private.edges.push(v),S._private.edges.push(v)),v._private.source=E,v._private.target=S}f.map=new ye,f.map.set(m,{ele:p,index:0}),f.removed=!1,n&&a.addToPool(p)}for(var _=0;_<s.length;_++){var A=s[_],R=A._private.data;Q(R.parent)&&(R.parent=""+R.parent);var L=R.parent;if(null!=L||A._private.parent){var I=A._private.parent?a.collection().merge(A._private.parent):a.getElementById(L);if(I.empty())R.parent=void 0;else if(I[0].removed())se("Node added with missing parent, reference to parent removed"),R.parent=void 0,A._private.parent=null;else{for(var D=!1,N=I;!N.empty();){if(A.same(N)){D=!0,R.parent=void 0;break}N=N.parent()}D||(I[0]._private.children.push(A),A._private.parent=I[0],o.hasCompoundNodes=!0)}}}if(t.length>0){for(var M=t.length===i.length?i:new jl(a,t),O=0;O<M.length;O++){var $=M[O];$.isNode()||($.parallelEdges().clearTraversalCache(),$.source().clearTraversalCache(),$.target().clearTraversalCache())}(o.hasCompoundNodes?a.collection().merge(M).merge(M.connectedNodes()).merge(M.parent()):M).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r),r?M.emitAndNotify("add"):n&&M.emit("add")}return i},ql.removed=function(){var t=this[0];return t&&t._private.removed},ql.inside=function(){var t=this[0];return t&&!t._private.removed},ql.remove=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this,n=[],i={},a=r._private.cy;function o(t){var r=i[t.id()];e&&t.removed()||r||(i[t.id()]=!0,t.isNode()?(n.push(t),function(t){for(var e=t._private.edges,r=0;r<e.length;r++)o(e[r])}(t),function(t){for(var e=t._private.children,r=0;r<e.length;r++)o(e[r])}(t)):n.unshift(t))}for(var s=0,l=r.length;s<l;s++){o(r[s])}function c(t,e){var r=t._private.edges;pe(r,e),t.clearTraversalCache()}function h(t){t.clearTraversalCache()}var u=[];function d(t,e){e=e[0];var r=(t=t[0])._private.children,n=t.id();pe(r,e),e._private.parent=null,u.ids[n]||(u.ids[n]=!0,u.push(t))}u.ids={},r.dirtyCompoundBoundsCache(),e&&a.removeFromPool(n);for(var p=0;p<n.length;p++){var f=n[p];if(f.isEdge()){var g=f.source()[0],m=f.target()[0];c(g,f),c(m,f);for(var y=f.parallelEdges(),v=0;v<y.length;v++){var b=y[v];h(b),b.isBundledBezier()&&b.dirtyBoundingBoxCache()}}else{var x=f.parent();0!==x.length&&d(x,f)}e&&(f._private.removed=!0)}var T=a._private.elements;a._private.hasCompoundNodes=!1;for(var w=0;w<T.length;w++){if(T[w].isParent()){a._private.hasCompoundNodes=!0;break}}var k=new jl(this.cy(),n);k.size()>0&&(t?k.emitAndNotify("remove"):e&&k.emit("remove"));for(var C=0;C<u.length;C++){var E=u[C];e&&E.removed()||E.updateStyle()}return k},ql.move=function(t){var e=this._private.cy,r=this,n=!1,i=!1,a=function(t){return null==t?t:""+t};if(void 0!==t.source||void 0!==t.target){var o=a(t.source),s=a(t.target),l=null!=o&&e.hasElementWithId(o),c=null!=s&&e.hasElementWithId(s);(l||c)&&(e.batch(function(){r.remove(n,i),r.emitAndNotify("moveout");for(var t=0;t<r.length;t++){var e=r[t],a=e._private.data;e.isEdge()&&(l&&(a.source=o),c&&(a.target=s))}r.restore(n,i)}),r.emitAndNotify("move"))}else if(void 0!==t.parent){var h=a(t.parent);if(null===h||e.hasElementWithId(h)){var u=null===h?void 0:h;e.batch(function(){var t=r.remove(n,i);t.emitAndNotify("moveout");for(var e=0;e<r.length;e++){var a=r[e],o=a._private.data;a.isNode()&&(o.parent=u)}t.restore(n,i)}),r.emitAndNotify("move")}}return this},[Wn,Eo,So,hs,fs,Ts,ws,Qs,pl,fl,{isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var t=this[0];if(t)return t._private.group}},yl,xl,Cl,Dl,Ol].forEach(function(t){bt(ql,t)});var Wl={add:function(t){var e,r=this;if(tt(t)){var n=t;if(n._private.cy===r)e=n.restore();else{for(var i=[],a=0;a<n.length;a++){var o=n[a];i.push(o.json())}e=new jl(r,i)}}else if(X(t)){e=new jl(r,t)}else if(Z(t)&&(X(t.nodes)||X(t.edges))){for(var s=t,l=[],c=["nodes","edges"],h=0,u=c.length;h<u;h++){var d=c[h],p=s[d];if(X(p))for(var f=0,g=p.length;f<g;f++){var m=bt({group:d},p[f]);l.push(m)}}e=new jl(r,l)}else{e=new xe(r,t).collection()}return e},remove:function(t){if(tt(t));else if(V(t)){var e=t;t=this.$(e)}return t.remove()}};function Ul(t,e,r,n){var i=.1,a="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var o=0;o<4;++o)if("number"!=typeof arguments[o]||isNaN(arguments[o])||!isFinite(arguments[o]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var s=a?new Float32Array(11):new Array(11);function l(t,e){return 1-3*e+3*t}function c(t,e){return 3*e-6*t}function h(t){return 3*t}function u(t,e,r){return((l(e,r)*t+c(e,r))*t+h(e))*t}function d(t,e,r){return 3*l(e,r)*t*t+2*c(e,r)*t+h(e)}function p(e){for(var n=0,a=1;10!==a&&s[a]<=e;++a)n+=i;--a;var o=n+(e-s[a])/(s[a+1]-s[a])*i,l=d(o,t,r);return l>=.001?function(e,n){for(var i=0;i<4;++i){var a=d(n,t,r);if(0===a)return n;n-=(u(n,t,r)-e)/a}return n}(e,o):0===l?o:function(e,n,i){var a,o,s=0;do{(a=u(o=n+(i-n)/2,t,r)-e)>0?i=o:n=o}while(Math.abs(a)>1e-7&&++s<10);return o}(e,n,n+i)}var f=!1;function g(){f=!0,t===e&&r===n||function(){for(var e=0;e<11;++e)s[e]=u(e*i,t,r)}()}var m=function(i){return f||g(),t===e&&r===n?i:0===i?0:1===i?1:u(p(i),e,n)};m.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var y="generateBezier("+[t,e,r,n]+")";return m.toString=function(){return y},m}var Gl=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},a=e(r,.5*n,i),o=e(r,.5*n,a),s=e(r,n,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),c=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return r.x=r.x+l*n,r.v=r.v+c*n,r}return function t(e,n,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},c=[0],h=0,u=1e-4;for(e=parseFloat(e)||500,n=parseFloat(n)||20,i=i||null,l.tension=e,l.friction=n,o=(a=null!==i)?(h=t(e,n))/i*.016:.016;s=r(s||l,o),c.push(1+s.x),h+=16,Math.abs(s.x)>u&&Math.abs(s.v)>u;);return a?function(t){return c[t*(c.length-1)|0]}:h}}(),Yl=function(t,e,r,n){var i=Ul(t,e,r,n);return function(t,e,r){return t+(e-t)*i(r)}},Vl={linear:function(t,e,r){return t+(e-t)*r},ease:Yl(.25,.1,.25,1),"ease-in":Yl(.42,0,1,1),"ease-out":Yl(0,0,.58,1),"ease-in-out":Yl(.42,0,.58,1),"ease-in-sine":Yl(.47,0,.745,.715),"ease-out-sine":Yl(.39,.575,.565,1),"ease-in-out-sine":Yl(.445,.05,.55,.95),"ease-in-quad":Yl(.55,.085,.68,.53),"ease-out-quad":Yl(.25,.46,.45,.94),"ease-in-out-quad":Yl(.455,.03,.515,.955),"ease-in-cubic":Yl(.55,.055,.675,.19),"ease-out-cubic":Yl(.215,.61,.355,1),"ease-in-out-cubic":Yl(.645,.045,.355,1),"ease-in-quart":Yl(.895,.03,.685,.22),"ease-out-quart":Yl(.165,.84,.44,1),"ease-in-out-quart":Yl(.77,0,.175,1),"ease-in-quint":Yl(.755,.05,.855,.06),"ease-out-quint":Yl(.23,1,.32,1),"ease-in-out-quint":Yl(.86,0,.07,1),"ease-in-expo":Yl(.95,.05,.795,.035),"ease-out-expo":Yl(.19,1,.22,1),"ease-in-out-expo":Yl(1,0,0,1),"ease-in-circ":Yl(.6,.04,.98,.335),"ease-out-circ":Yl(.075,.82,.165,1),"ease-in-out-circ":Yl(.785,.135,.15,.86),spring:function(t,e,r){if(0===r)return Vl.linear;var n=Gl(t,e,r);return function(t,e,r){return t+(e-t)*n(r)}},"cubic-bezier":Yl};function Hl(t,e,r,n,i){if(1===n)return r;if(e===r)return r;var a=i(e,r,n);return null==t||((t.roundValue||t.color)&&(a=Math.round(a)),void 0!==t.min&&(a=Math.max(a,t.min)),void 0!==t.max&&(a=Math.min(a,t.max))),a}function Xl(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function Zl(t,e,r,n,i){var a=null!=i?i.type:null;r<0?r=0:r>1&&(r=1);var o=Xl(t,i),s=Xl(e,i);if(Q(o)&&Q(s))return Hl(a,o,s,r,n);if(X(o)&&X(s)){for(var l=[],c=0;c<s.length;c++){var h=o[c],u=s[c];if(null!=h&&null!=u){var d=Hl(a,h,u,r,n);l.push(d)}else l.push(u)}return l}}function Ql(t,e,r,n){var i=!n,a=t._private,o=e._private,s=o.easing,l=o.startTime,c=(n?t:t.cy()).style();if(!o.easingImpl)if(null==s)o.easingImpl=Vl.linear;else{var h,u,d;if(V(s))h=c.parse("transition-timing-function",s).value;else h=s;V(h)?(u=h,d=[]):(u=h[1],d=h.slice(2).map(function(t){return+t})),d.length>0?("spring"===u&&d.push(o.duration),o.easingImpl=Vl[u].apply(null,d)):o.easingImpl=Vl[u]}var p,f=o.easingImpl;if(p=0===o.duration?1:(r-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var g=o.startPosition,m=o.position;if(m&&i&&!t.locked()){var y={};Jl(g.x,m.x)&&(y.x=Zl(g.x,m.x,p,f)),Jl(g.y,m.y)&&(y.y=Zl(g.y,m.y,p,f)),t.position(y)}var v=o.startPan,b=o.pan,x=a.pan,T=null!=b&&n;T&&(Jl(v.x,b.x)&&(x.x=Zl(v.x,b.x,p,f)),Jl(v.y,b.y)&&(x.y=Zl(v.y,b.y,p,f)),t.emit("pan"));var w=o.startZoom,k=o.zoom,C=null!=k&&n;C&&(Jl(w,k)&&(a.zoom=er(a.minZoom,Zl(w,k,p,f),a.maxZoom)),t.emit("zoom")),(T||C)&&t.emit("viewport");var E=o.style;if(E&&E.length>0&&i){for(var S=0;S<E.length;S++){var _=E[S],A=_.name,R=_,L=o.startStyle[A],I=Zl(L,R,p,f,c.properties[L.name]);c.overrideBypass(t,A,I)}t.emit("style")}}return o.progress=p,p}function Jl(t,e){return null!=t&&null!=e&&(!(!Q(t)||!Q(e))||!(!t||!e))}function tc(t,e,r,n){var i=e._private;i.started=!0,i.startTime=r-i.progress*i.duration}function ec(t,e){var r=e._private.aniEles,n=[];function i(e,r){var i=e._private,a=i.animation.current,o=i.animation.queue,s=!1;if(0===a.length){var l=o.shift();l&&a.push(l)}for(var c=function(t){for(var e=t.length-1;e>=0;e--){(0,t[e])()}t.splice(0,t.length)},h=a.length-1;h>=0;h--){var u=a[h],d=u._private;d.stopped?(a.splice(h,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||tc(0,u,t),Ql(e,u,t,r),d.applying&&(d.applying=!1),c(d.frames),null!=d.step&&d.step(t),u.completed()&&(a.splice(h,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.completes)),s=!0)}return r||0!==a.length||0!==o.length||n.push(e),s}for(var a=!1,o=0;o<r.length;o++){var s=i(r[o]);a=a||s}var l=i(e,!0);(a||l)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}var rc={animate:Co.animate(),animation:Co.animation(),animated:Co.animated(),clearQueue:Co.clearQueue(),delay:Co.delay(),delayAnimation:Co.delayAnimation(),stop:Co.stop(),addToAnimationPool:function(t){this.styleEnabled()&&this._private.aniEles.merge(t)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var t=this;if(t._private.animationsRunning=!0,t.styleEnabled()){var e=t.renderer();e&&e.beforeRender?e.beforeRender(function(e,r){ec(r,t)},e.beforeRenderPriorities.animations):function e(){t._private.animationsRunning&&Pt(function(r){ec(r,t),e()})}()}}},nc={qualifierCompare:function(t,e){return null==t||null==e?null==t&&null==e:t.sameText(e)},eventMatches:function(t,e,r){var n=e.qualifier;return null==n||t!==r.target&&et(r.target)&&n.matches(r.target)},addEventFields:function(t,e){e.cy=t,e.target=t},callbackContext:function(t,e,r){return null!=e.qualifier?r.target:t}},ic=function(t){return V(t)?new ls(t):t},ac={createEmitter:function(){var t=this._private;return t.emitter||(t.emitter=new ol(nc,this)),this},emitter:function(){return this._private.emitter},on:function(t,e,r){return this.emitter().on(t,ic(e),r),this},removeListener:function(t,e,r){return this.emitter().removeListener(t,ic(e),r),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(t,e,r){return this.emitter().one(t,ic(e),r),this},once:function(t,e,r){return this.emitter().one(t,ic(e),r),this},emit:function(t,e){return this.emitter().emit(t,e),this},emitAndNotify:function(t,e){return this.emit(t),this.notify(t,e),this}};Co.eventAliasesOn(ac);var oc={png:function(t){return t=t||{},this._private.renderer.png(t)},jpg:function(t){var e=this._private.renderer;return(t=t||{}).bg=t.bg||"#fff",e.jpg(t)}};oc.jpeg=oc.jpg;var sc={layout:function(t){var e=this;if(null!=t)if(null!=t.name){var r=t.name,n=e.extension("layout",r);if(null!=n){var i;i=V(t.eles)?e.$(t.eles):null!=t.eles?t.eles:e.$();var a=new n(bt({},t,{cy:e,eles:i}));return a}ae("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else ae("A `name` must be specified to make a layout");else ae("Layout options must be specified to make a layout")}};sc.createLayout=sc.makeLayout=sc.layout;var lc={notify:function(t,e){var r=this._private;if(this.batching()){r.batchNotifications=r.batchNotifications||{};var n=r.batchNotifications[t]=r.batchNotifications[t]||this.collection();null!=e&&n.merge(e)}else if(r.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(t,e)}},notifications:function(t){var e=this._private;return void 0===t?e.notificationsEnabled:(e.notificationsEnabled=!!t,this)},noNotifications:function(t){this.notifications(!1),t(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var t=this._private;return null==t.batchCount&&(t.batchCount=0),0===t.batchCount&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},endBatch:function(){var t=this._private;if(0===t.batchCount)return this;if(t.batchCount--,0===t.batchCount){t.batchStyleEles.updateStyle();var e=this.renderer();Object.keys(t.batchNotifications).forEach(function(r){var n=t.batchNotifications[r];n.empty()?e.notify(r):e.notify(r,n)})}return this},batch:function(t){return this.startBatch(),t(),this.endBatch(),this},batchData:function(t){var e=this;return this.batch(function(){for(var r=Object.keys(t),n=0;n<r.length;n++){var i=r[n],a=t[i];e.getElementById(i).data(a)}})}},cc=de({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),hc={renderTo:function(t,e,r,n){return this._private.renderer.renderTo(t,e,r,n),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(t){var e=this,r=e.extension("renderer",t.name);if(null!=r){void 0!==t.wheelSensitivity&&se("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var n=cc(t);n.cy=e,e._private.renderer=new r(n),this.notify("init")}else ae("Can not initialise: No such renderer `".concat(t.name,"` found. Did you forget to import it and `cytoscape.use()` it?"))},destroyRenderer:function(){var t=this;t.notify("destroy");var e=t.container();if(e)for(e._cyreg=null;e.childNodes.length>0;)e.removeChild(e.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(t){var e=t._private;e.rscratch={},e.rstyle={},e.animation.current=[],e.animation.queue=[]})},onRender:function(t){return this.on("render",t)},offRender:function(t){return this.off("render",t)}};hc.invalidateDimensions=hc.resize;var uc={collection:function(t,e){return V(t)?this.$(t):tt(t)?t.collection():X(t)?(e||(e={}),new jl(this,t,e.unique,e.removed)):new jl(this)},nodes:function(t){var e=this.$(function(t){return t.isNode()});return t?e.filter(t):e},edges:function(t){var e=this.$(function(t){return t.isEdge()});return t?e.filter(t):e},$:function(t){var e=this._private.elements;return t?e.filter(t):e.spawnSelf()},mutableElements:function(){return this._private.elements}};uc.elements=uc.filter=uc.$;var dc={},pc="t";dc.apply=function(t){for(var e=this,r=e._private.cy.collection(),n=0;n<t.length;n++){var i=t[n],a=e.getContextMeta(i);if(!a.empty){var o=e.getContextStyle(a),s=e.applyContextStyle(a,o,i);i._private.appliedInitStyle?e.updateTransitions(i,s.diffProps):i._private.appliedInitStyle=!0,e.updateStyleHints(i)&&r.push(i)}}return r},dc.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},i=t+"-"+e,a=n[i];if(a)return a;for(var o=[],s={},l=0;l<r.length;l++){var c=r[l],h=t[l]===pc,u=e[l]===pc,d=h!==u,p=c.mappedProperties.length>0;if(d||u&&p){var f=void 0;d&&p||d?f=c.properties:p&&(f=c.mappedProperties);for(var g=0;g<f.length;g++){for(var m=f[g],y=m.name,v=!1,b=l+1;b<r.length;b++){var x=r[b];if(e[b]===pc&&(v=null!=x.properties[m.name]))break}s[y]||v||(s[y]=!0,o.push(y))}}}return n[i]=o,o},dc.getContextMeta=function(t){for(var e,r=this,n="",i=t._private.styleCxtKey||"",a=0;a<r.length;a++){var o=r[a];n+=o.selector&&o.selector.matches(t)?pc:"f"}return e=r.getPropertiesDiff(i,n),t._private.styleCxtKey=n,{key:n,diffPropNames:e,empty:0===e.length}},dc.getContextStyle=function(t){var e=t.key,r=this._private.contextStyles=this._private.contextStyles||{};if(r[e])return r[e];for(var n={_private:{key:e}},i=0;i<this.length;i++){var a=this[i];if(e[i]===pc)for(var o=0;o<a.properties.length;o++){var s=a.properties[o];n[s.name]=s}}return r[e]=n,n},dc.applyContextStyle=function(t,e,r){for(var n=t.diffPropNames,i={},a=this.types,o=0;o<n.length;o++){var s=n[o],l=e[s],c=r.pstyle(s);if(!l){if(!c)continue;l=c.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(c!==l){if(l.mapped===a.fn&&null!=c&&null!=c.mapping&&c.mapping.value===l.value){var h=c.mapping;if((h.fnValue=l.value(r))===h.prevFnValue)continue}var u=i[s]={prev:c};this.applyParsedProperty(r,l),u.next=r.pstyle(s),u.next&&u.next.bypass&&(u.next=u.next.bypassed)}}return{diffProps:i}},dc.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,i=r.propertyGroupKeys,a=function(t,e,n){return r.getPropertiesHash(t,e,n)},o=e.styleKey;if(t.removed())return!1;var s="nodes"===e.group,l=t._private.style;n=Object.keys(l);for(var c=0;c<i.length;c++){var h=i[c];e.styleKeys[h]=[Ft,zt]}for(var u=function(t,r){return e.styleKeys[r][0]=jt(t,e.styleKeys[r][0])},d=function(t,r){return e.styleKeys[r][1]=qt(t,e.styleKeys[r][1])},p=function(t,e){u(t,e),d(t,e)},f=function(t,e){for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);u(n,e),d(n,e)}},g=function(t){return-128<t&&t<128&&Math.floor(t)!==t?2e9-(1024*t|0):t},m=0;m<n.length;m++){var y=n[m],v=l[y];if(null!=v){var b=this.properties[y],x=b.type,T=b.groupKey,w=void 0;null!=b.hashOverride?w=b.hashOverride(t,v):null!=v.pfValue&&(w=v.pfValue);var k=null==b.enums?v.value:null,C=null!=w,E=C||null!=k,S=v.units;if(x.number&&E&&!x.multiple)p(g(C?w:k),T),C||null==S||f(S,T);else f(v.strValue,T)}}for(var _,A,R=[Ft,zt],L=0;L<i.length;L++){var I=i[L],D=e.styleKeys[I];R[0]=jt(D[0],R[0]),R[1]=qt(D[1],R[1])}e.styleKey=(_=R[0],A=R[1],2097152*_+A);var N=e.styleKeys;e.labelDimsKey=Wt(N.labelDimensions);var M=a(t,["label"],N.labelDimensions);if(e.labelKey=Wt(M),e.labelStyleKey=Wt(Ut(N.commonLabel,M)),!s){var O=a(t,["source-label"],N.labelDimensions);e.sourceLabelKey=Wt(O),e.sourceLabelStyleKey=Wt(Ut(N.commonLabel,O));var $=a(t,["target-label"],N.labelDimensions);e.targetLabelKey=Wt($),e.targetLabelStyleKey=Wt(Ut(N.commonLabel,$))}if(s){var P=e.styleKeys,B=P.nodeBody,F=P.nodeBorder,z=P.nodeOutline,K=P.backgroundImage,j=P.compound,q=P.pie,W=P.stripe,U=[B,F,z,K,j,q,W].filter(function(t){return null!=t}).reduce(Ut,[Ft,zt]);e.nodeKey=Wt(U),e.hasPie=null!=q&&q[0]!==Ft&&q[1]!==zt,e.hasStripe=null!=W&&W[0]!==Ft&&W[1]!==zt}return o!==e.styleKey},dc.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null},dc.applyParsedProperty=function(t,e){var r,n=this,i=e,a=t._private.style,o=n.types,s=n.properties[i.name].type,l=i.bypass,c=a[i.name],h=c&&c.bypass,u=t._private,d="mapping",p=function(t){return null==t?null:null!=t.pfValue?t.pfValue:t.value},f=function(){var e=p(c),r=p(i);n.checkTriggers(t,i.name,e,r)};if("curve-style"===e.name&&t.isEdge()&&("bezier"!==e.value&&t.isLoop()||"haystack"===e.value&&(t.source().isParent()||t.target().isParent()))&&(i=e=this.parse(e.name,"bezier",l)),i.delete)return a[i.name]=void 0,f(),!0;if(i.deleteBypassed)return c?!!c.bypass&&(c.bypassed=void 0,f(),!0):(f(),!0);if(i.deleteBypass)return c?!!c.bypass&&(a[i.name]=c.bypassed,f(),!0):(f(),!0);var g=function(){se("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")};switch(i.mapped){case o.mapData:for(var m,y=i.field.split("."),v=u.data,b=0;b<y.length&&v;b++){v=v[y[b]]}if(null==v)return g(),!1;if(!Q(v))return se("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+v+"` for `"+t.id()+"` is non-numeric)"),!1;var x=i.fieldMax-i.fieldMin;if((m=0===x?0:(v-i.fieldMin)/x)<0?m=0:m>1&&(m=1),s.color){var T=i.valueMin[0],w=i.valueMax[0],k=i.valueMin[1],C=i.valueMax[1],E=i.valueMin[2],S=i.valueMax[2],_=null==i.valueMin[3]?1:i.valueMin[3],A=null==i.valueMax[3]?1:i.valueMax[3],R=[Math.round(T+(w-T)*m),Math.round(k+(C-k)*m),Math.round(E+(S-E)*m),Math.round(_+(A-_)*m)];r={bypass:i.bypass,name:i.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else{if(!s.number)return!1;var L=i.valueMin+(i.valueMax-i.valueMin)*m;r=this.parse(i.name,L,i.bypass,d)}if(!r)return g(),!1;r.mapping=i,i=r;break;case o.data:for(var I=i.field.split("."),D=u.data,N=0;N<I.length&&D;N++){D=D[I[N]]}if(null!=D&&(r=this.parse(i.name,D,i.bypass,d)),!r)return g(),!1;r.mapping=i,i=r;break;case o.fn:var M=i.value,O=null!=i.fnValue?i.fnValue:M(t);if(i.prevFnValue=O,null==O)return se("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+t.id()+"` is null)"),!1;if(!(r=this.parse(i.name,O,i.bypass,d)))return se("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+t.id()+"` is invalid)"),!1;r.mapping=le(i),i=r;break;case void 0:break;default:return!1}return l?(i.bypassed=h?c.bypassed:c,a[i.name]=i):h?c.bypassed=i:a[i.name]=i,f(),!0},dc.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),e)for(var i=n._private.style,a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],l=i[s];null!=l&&(l.bypass?l.bypassed=null:i[s]=null)}else n._private.style={}}},dc.update=function(){this._private.cy.mutableElements().updateStyle()},dc.updateTransitions=function(t,e){var r=this,n=t._private,i=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,o=t.pstyle("transition-delay").pfValue;if(i.length>0&&a>0){for(var s={},l=!1,c=0;c<i.length;c++){var h=i[c],u=t.pstyle(h),d=e[h];if(d){var p=d.prev,f=null!=d.next?d.next:u,g=!1,m=void 0,y=1e-6;p&&(Q(p.pfValue)&&Q(f.pfValue)?(g=f.pfValue-p.pfValue,m=p.pfValue+y*g):Q(p.value)&&Q(f.value)?(g=f.value-p.value,m=p.value+y*g):X(p.value)&&X(f.value)&&(g=p.value[0]!==f.value[0]||p.value[1]!==f.value[1]||p.value[2]!==f.value[2],m=p.strValue),g&&(s[h]=f.strValue,this.applyBypass(t,h,m),l=!0))}}if(!l)return;n.transitioning=!0,new Zn(function(e){o>0?t.delayAnimation(o).play().promise().then(e):e()}).then(function(){return t.animation({style:s,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)},dc.checkTrigger=function(t,e,r,n,i,a){var o=this.properties[e],s=i(o);t.removed()||null!=s&&s(r,n,t)&&a(o)},dc.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(t){return t.triggersZOrder},function(){i._private.cy.notify("zorder",t)})},dc.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(t){return t.triggersBounds},function(e){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},dc.checkConnectedEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(t){return t.triggersBoundsOfConnectedEdges},function(e){t.connectedEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},dc.checkParallelEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(t){return t.triggersBoundsOfParallelEdges},function(e){t.parallelEdges().forEach(function(t){t.dirtyBoundingBoxCache()})})},dc.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n),this.checkConnectedEdgesBoundsTrigger(t,e,r,n),this.checkParallelEdgesBoundsTrigger(t,e,r,n)};var fc={applyBypass:function(t,e,r,n){var i=[];if("*"===e||"**"===e){if(void 0!==r)for(var a=0;a<this.properties.length;a++){var o=this.properties[a].name,s=this.parse(o,r,!0);s&&i.push(s)}}else if(V(e)){var l=this.parse(e,r,!0);l&&i.push(l)}else{if(!Z(e))return!1;var c=e;n=r;for(var h=Object.keys(c),u=0;u<h.length;u++){var d=h[u],p=c[d];if(void 0===p&&(p=c[ct(d)]),void 0!==p){var f=this.parse(d,p,!0);f&&i.push(f)}}}if(0===i.length)return!1;for(var g=!1,m=0;m<t.length;m++){for(var y=t[m],v={},b=void 0,x=0;x<i.length;x++){var T=i[x];if(n){var w=y.pstyle(T.name);b=v[T.name]={prev:w}}g=this.applyParsedProperty(y,le(T))||g,n&&(b.next=y.pstyle(T.name))}g&&this.updateStyleHints(y),n&&this.updateTransitions(y,v,true)}return g},overrideBypass:function(t,e,r){e=lt(e);for(var n=0;n<t.length;n++){var i=t[n],a=i._private.style[e],o=this.properties[e].type,s=o.color,l=o.mutiple,c=a?null!=a.pfValue?a.pfValue:a.value:null;a&&a.bypass?(a.value=r,null!=a.pfValue&&(a.pfValue=r),a.strValue=s?"rgb("+r.join(",")+")":l?r.join(" "):""+r,this.updateStyleHints(i)):this.applyBypass(i,e,r),this.checkTriggers(i,e,c,r)}},removeAllBypasses:function(t,e){return this.removeBypasses(t,this.propertyNames,e)},removeBypasses:function(t,e,r){for(var n=0;n<t.length;n++){for(var i=t[n],a={},o=0;o<e.length;o++){var s=e[o],l=this.properties[s],c=i.pstyle(l.name);if(c&&c.bypass){var h=this.parse(s,"",!0),u=a[l.name]={prev:c};this.applyParsedProperty(i,h),u.next=i.pstyle(l.name)}}this.updateStyleHints(i),r&&this.updateTransitions(i,a,true)}}},gc={getEmSizeInPixels:function(){var t=this.containerCss("font-size");return null!=t?parseFloat(t):1},containerCss:function(t){var e=this._private.cy,r=e.container(),n=e.window();if(n&&r&&n.getComputedStyle)return n.getComputedStyle(r).getPropertyValue(t)}},mc={getRenderedStyle:function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},getRawStyle:function(t,e){var r=this;if(t=t[0]){for(var n={},i=0;i<r.properties.length;i++){var a=r.properties[i],o=r.getStylePropertyValue(t,a.name,e);null!=o&&(n[a.name]=o,n[ct(a.name)]=o)}return n}},getIndexedStyle:function(t,e,r,n){var i=t.pstyle(e)[r][n];return null!=i?i:t.cy().style().getDefaultProperty(e)[r][0]},getStylePropertyValue:function(t,e,r){if(t=t[0]){var n=this.properties[e];n.alias&&(n=n.pointsTo);var i=n.type,a=t.pstyle(n.name);if(a){var o=a.value,s=a.units,l=a.strValue;if(r&&i.number&&null!=o&&Q(o)){var c=t.cy().zoom(),h=function(t){return t*c},u=function(t,e){return h(t)+e},d=X(o);return(d?s.every(function(t){return null!=t}):null!=s)?d?o.map(function(t,e){return u(t,s[e])}).join(" "):u(o,s):d?o.map(function(t){return V(t)?t:""+h(t)}).join(" "):""+h(o)}if(null!=l)return l}return null}},getAnimationStartStyle:function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n].name,a=t.pstyle(i);void 0!==a&&(a=Z(a)?this.parse(i,a.strValue):this.parse(i,a)),a&&(r[i]=a)}return r},getPropsList:function(t){var e=[],r=t,n=this.properties;if(r)for(var i=Object.keys(r),a=0;a<i.length;a++){var o=i[a],s=r[o],l=n[o]||n[lt(o)],c=this.parse(l.name,s);c&&e.push(c)}return e},getNonDefaultPropertiesHash:function(t,e,r){var n,i,a,o,s,l,c=r.slice();for(s=0;s<e.length;s++)if(n=e[s],null!=(i=t.pstyle(n,!1)))if(null!=i.pfValue)c[0]=jt(o,c[0]),c[1]=qt(o,c[1]);else for(a=i.strValue,l=0;l<a.length;l++)o=a.charCodeAt(l),c[0]=jt(o,c[0]),c[1]=qt(o,c[1]);return c}};mc.getPropertiesHash=mc.getNonDefaultPropertiesHash;var yc={appendFromJson:function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],i=n.selector,a=n.style||n.css,o=Object.keys(a);e.selector(i);for(var s=0;s<o.length;s++){var l=o[s],c=a[l];e.css(l,c)}}return e},fromJson:function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e},json:function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,i=r.properties,a={},o=0;o<i.length;o++){var s=i[o];a[s.name]=s.strValue}t.push({selector:n?n.toString():"core",style:a})}return t}},vc={appendFromString:function(t){var e,r,n,i=this,a=""+t;function o(){a=a.length>e.length?a.substr(e.length):""}function s(){r=r.length>n.length?r.substr(n.length):""}for(a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(a.match(/^\s*$/))break;var l=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){se("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}e=l[0];var c=l[1];if("core"!==c)if(new ls(c).invalid){se("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),o();continue}var h=l[2],u=!1;r=h;for(var d=[];;){if(r.match(/^\s*$/))break;var p=r.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){se("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),u=!0;break}n=p[0];var f=p[1],g=p[2];if(this.properties[f])i.parse(f,g)?(d.push({name:f,val:g}),s()):(se("Skipping property: Invalid property definition in: "+n),s());else se("Skipping property: Invalid property name in: "+n),s()}if(u){o();break}i.selector(c);for(var m=0;m<d.length;m++){var y=d[m];i.css(y.name,y.val)}o()}return i},fromString:function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e}},bc={};!function(){var t=pt,e=gt,r=yt,n=function(t){return"^"+t+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},i=function(n){var i=t+"|\\w+|"+e+"|"+r+"|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+n+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+i+")\\s*\\,\\s*("+i+")\\)$"},a=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];bc.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:n("data")},layoutData:{mapping:!0,regex:n("layoutData")},scratch:{mapping:!0,regex:n("scratch")},mapData:{mapping:!0,regex:i("mapData")},mapLayoutData:{mapping:!0,regex:i("mapLayoutData")},mapScratch:{mapping:!0,regex:i("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:a,singleRegexMatchValue:!0},urls:{regexes:a,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(t,e){switch(t.length){case 2:return"deg"!==e[0]&&"rad"!==e[0]&&"deg"!==e[1]&&"rad"!==e[1];case 1:return V(t[0])||"deg"===e[0]||"rad"===e[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(t){var e=t.length;return 1===e||2===e||4===e}}};var o={zeroNonZero:function(t,e){return(null==t||null==e)&&t!==e||(0==t&&0!=e||0!=t&&0==e)},any:function(t,e){return t!=e},emptyNonEmpty:function(t,e){var r=at(t),n=at(e);return r&&!n||!r&&n}},s=bc.types,l=[{name:"label",type:s.text,triggersBounds:o.any,triggersZOrder:o.emptyNonEmpty},{name:"text-rotation",type:s.textRotation,triggersBounds:o.any},{name:"text-margin-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"text-margin-y",type:s.bidirectionalSize,triggersBounds:o.any}],c=[{name:"source-label",type:s.text,triggersBounds:o.any},{name:"source-text-rotation",type:s.textRotation,triggersBounds:o.any},{name:"source-text-margin-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"source-text-margin-y",type:s.bidirectionalSize,triggersBounds:o.any},{name:"source-text-offset",type:s.size,triggersBounds:o.any}],h=[{name:"target-label",type:s.text,triggersBounds:o.any},{name:"target-text-rotation",type:s.textRotation,triggersBounds:o.any},{name:"target-text-margin-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"target-text-margin-y",type:s.bidirectionalSize,triggersBounds:o.any},{name:"target-text-offset",type:s.size,triggersBounds:o.any}],u=[{name:"font-family",type:s.fontFamily,triggersBounds:o.any},{name:"font-style",type:s.fontStyle,triggersBounds:o.any},{name:"font-weight",type:s.fontWeight,triggersBounds:o.any},{name:"font-size",type:s.size,triggersBounds:o.any},{name:"text-transform",type:s.textTransform,triggersBounds:o.any},{name:"text-wrap",type:s.textWrap,triggersBounds:o.any},{name:"text-overflow-wrap",type:s.textOverflowWrap,triggersBounds:o.any},{name:"text-max-width",type:s.size,triggersBounds:o.any},{name:"text-outline-width",type:s.size,triggersBounds:o.any},{name:"line-height",type:s.positiveNumber,triggersBounds:o.any}],d=[{name:"text-valign",type:s.valign,triggersBounds:o.any},{name:"text-halign",type:s.halign,triggersBounds:o.any},{name:"color",type:s.color},{name:"text-outline-color",type:s.color},{name:"text-outline-opacity",type:s.zeroOneNumber},{name:"text-background-color",type:s.color},{name:"text-background-opacity",type:s.zeroOneNumber},{name:"text-background-padding",type:s.size,triggersBounds:o.any},{name:"text-border-opacity",type:s.zeroOneNumber},{name:"text-border-color",type:s.color},{name:"text-border-width",type:s.size,triggersBounds:o.any},{name:"text-border-style",type:s.borderStyle,triggersBounds:o.any},{name:"text-background-shape",type:s.textBackgroundShape,triggersBounds:o.any},{name:"text-justification",type:s.justification},{name:"box-select-labels",type:s.bool,triggersBounds:o.any}],p=[{name:"events",type:s.bool,triggersZOrder:o.any},{name:"text-events",type:s.bool,triggersZOrder:o.any},{name:"box-selection",type:s.boxSelection,triggersZOrder:o.any}],f=[{name:"display",type:s.display,triggersZOrder:o.any,triggersBounds:o.any,triggersBoundsOfConnectedEdges:o.any,triggersBoundsOfParallelEdges:function(t,e,r){return t!==e&&"bezier"===r.pstyle("curve-style").value}},{name:"visibility",type:s.visibility,triggersZOrder:o.any},{name:"opacity",type:s.zeroOneNumber,triggersZOrder:o.zeroNonZero},{name:"text-opacity",type:s.zeroOneNumber},{name:"min-zoomed-font-size",type:s.size},{name:"z-compound-depth",type:s.zCompoundDepth,triggersZOrder:o.any},{name:"z-index-compare",type:s.zIndexCompare,triggersZOrder:o.any},{name:"z-index",type:s.number,triggersZOrder:o.any}],g=[{name:"overlay-padding",type:s.size,triggersBounds:o.any},{name:"overlay-color",type:s.color},{name:"overlay-opacity",type:s.zeroOneNumber,triggersBounds:o.zeroNonZero},{name:"overlay-shape",type:s.overlayShape,triggersBounds:o.any},{name:"overlay-corner-radius",type:s.cornerRadius}],m=[{name:"underlay-padding",type:s.size,triggersBounds:o.any},{name:"underlay-color",type:s.color},{name:"underlay-opacity",type:s.zeroOneNumber,triggersBounds:o.zeroNonZero},{name:"underlay-shape",type:s.overlayShape,triggersBounds:o.any},{name:"underlay-corner-radius",type:s.cornerRadius}],y=[{name:"transition-property",type:s.propList},{name:"transition-duration",type:s.time},{name:"transition-delay",type:s.time},{name:"transition-timing-function",type:s.easing}],v=function(t,e){return"label"===e.value?-t.poolIndex():e.pfValue},b=[{name:"height",type:s.nodeSize,triggersBounds:o.any,hashOverride:v},{name:"width",type:s.nodeSize,triggersBounds:o.any,hashOverride:v},{name:"shape",type:s.nodeShape,triggersBounds:o.any},{name:"shape-polygon-points",type:s.polygonPointList,triggersBounds:o.any},{name:"corner-radius",type:s.cornerRadius},{name:"background-color",type:s.color},{name:"background-fill",type:s.fill},{name:"background-opacity",type:s.zeroOneNumber},{name:"background-blacken",type:s.nOneOneNumber},{name:"background-gradient-stop-colors",type:s.colors},{name:"background-gradient-stop-positions",type:s.percentages},{name:"background-gradient-direction",type:s.gradientDirection},{name:"padding",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"padding-relative-to",type:s.paddingRelativeTo,triggersBounds:o.any},{name:"bounds-expansion",type:s.boundsExpansion,triggersBounds:o.any}],x=[{name:"border-color",type:s.color},{name:"border-opacity",type:s.zeroOneNumber},{name:"border-width",type:s.size,triggersBounds:o.any},{name:"border-style",type:s.borderStyle},{name:"border-cap",type:s.lineCap},{name:"border-join",type:s.lineJoin},{name:"border-dash-pattern",type:s.numbers},{name:"border-dash-offset",type:s.number},{name:"border-position",type:s.linePosition}],T=[{name:"outline-color",type:s.color},{name:"outline-opacity",type:s.zeroOneNumber},{name:"outline-width",type:s.size,triggersBounds:o.any},{name:"outline-style",type:s.borderStyle},{name:"outline-offset",type:s.size,triggersBounds:o.any}],w=[{name:"background-image",type:s.urls},{name:"background-image-crossorigin",type:s.bgCrossOrigin},{name:"background-image-opacity",type:s.zeroOneNumbers},{name:"background-image-containment",type:s.bgContainment},{name:"background-image-smoothing",type:s.bools},{name:"background-position-x",type:s.bgPos},{name:"background-position-y",type:s.bgPos},{name:"background-width-relative-to",type:s.bgRelativeTo},{name:"background-height-relative-to",type:s.bgRelativeTo},{name:"background-repeat",type:s.bgRepeat},{name:"background-fit",type:s.bgFit},{name:"background-clip",type:s.bgClip},{name:"background-width",type:s.bgWH},{name:"background-height",type:s.bgWH},{name:"background-offset-x",type:s.bgPos},{name:"background-offset-y",type:s.bgPos}],k=[{name:"position",type:s.position,triggersBounds:o.any},{name:"compound-sizing-wrt-labels",type:s.compoundIncludeLabels,triggersBounds:o.any},{name:"min-width",type:s.size,triggersBounds:o.any},{name:"min-width-bias-left",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"min-width-bias-right",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"min-height",type:s.size,triggersBounds:o.any},{name:"min-height-bias-top",type:s.sizeMaybePercent,triggersBounds:o.any},{name:"min-height-bias-bottom",type:s.sizeMaybePercent,triggersBounds:o.any}],C=[{name:"line-style",type:s.lineStyle},{name:"line-color",type:s.color},{name:"line-fill",type:s.fill},{name:"line-cap",type:s.lineCap},{name:"line-opacity",type:s.zeroOneNumber},{name:"line-dash-pattern",type:s.numbers},{name:"line-dash-offset",type:s.number},{name:"line-outline-width",type:s.size},{name:"line-outline-color",type:s.color},{name:"line-gradient-stop-colors",type:s.colors},{name:"line-gradient-stop-positions",type:s.percentages},{name:"curve-style",type:s.curveStyle,triggersBounds:o.any,triggersBoundsOfParallelEdges:function(t,e){return t!==e&&("bezier"===t||"bezier"===e)}},{name:"haystack-radius",type:s.zeroOneNumber,triggersBounds:o.any},{name:"source-endpoint",type:s.edgeEndpoint,triggersBounds:o.any},{name:"target-endpoint",type:s.edgeEndpoint,triggersBounds:o.any},{name:"control-point-step-size",type:s.size,triggersBounds:o.any},{name:"control-point-distances",type:s.bidirectionalSizes,triggersBounds:o.any},{name:"control-point-weights",type:s.numbers,triggersBounds:o.any},{name:"segment-distances",type:s.bidirectionalSizes,triggersBounds:o.any},{name:"segment-weights",type:s.numbers,triggersBounds:o.any},{name:"segment-radii",type:s.numbers,triggersBounds:o.any},{name:"radius-type",type:s.radiusType,triggersBounds:o.any},{name:"taxi-turn",type:s.bidirectionalSizeMaybePercent,triggersBounds:o.any},{name:"taxi-turn-min-distance",type:s.size,triggersBounds:o.any},{name:"taxi-direction",type:s.axisDirection,triggersBounds:o.any},{name:"taxi-radius",type:s.number,triggersBounds:o.any},{name:"edge-distances",type:s.edgeDistances,triggersBounds:o.any},{name:"arrow-scale",type:s.positiveNumber,triggersBounds:o.any},{name:"loop-direction",type:s.angle,triggersBounds:o.any},{name:"loop-sweep",type:s.angle,triggersBounds:o.any},{name:"source-distance-from-node",type:s.size,triggersBounds:o.any},{name:"target-distance-from-node",type:s.size,triggersBounds:o.any}],E=[{name:"ghost",type:s.bool,triggersBounds:o.any},{name:"ghost-offset-x",type:s.bidirectionalSize,triggersBounds:o.any},{name:"ghost-offset-y",type:s.bidirectionalSize,triggersBounds:o.any},{name:"ghost-opacity",type:s.zeroOneNumber}],S=[{name:"selection-box-color",type:s.color},{name:"selection-box-opacity",type:s.zeroOneNumber},{name:"selection-box-border-color",type:s.color},{name:"selection-box-border-width",type:s.size},{name:"active-bg-color",type:s.color},{name:"active-bg-opacity",type:s.zeroOneNumber},{name:"active-bg-size",type:s.size},{name:"outside-texture-bg-color",type:s.color},{name:"outside-texture-bg-opacity",type:s.zeroOneNumber}],_=[];bc.pieBackgroundN=16,_.push({name:"pie-size",type:s.sizeMaybePercent}),_.push({name:"pie-hole",type:s.sizeMaybePercent}),_.push({name:"pie-start-angle",type:s.angle});for(var A=1;A<=bc.pieBackgroundN;A++)_.push({name:"pie-"+A+"-background-color",type:s.color}),_.push({name:"pie-"+A+"-background-size",type:s.percent}),_.push({name:"pie-"+A+"-background-opacity",type:s.zeroOneNumber});var R=[];bc.stripeBackgroundN=16,R.push({name:"stripe-size",type:s.sizeMaybePercent}),R.push({name:"stripe-direction",type:s.axisDirectionPrimary});for(var L=1;L<=bc.stripeBackgroundN;L++)R.push({name:"stripe-"+L+"-background-color",type:s.color}),R.push({name:"stripe-"+L+"-background-size",type:s.percent}),R.push({name:"stripe-"+L+"-background-opacity",type:s.zeroOneNumber});var I=[],D=bc.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:s.arrowShape,triggersBounds:o.any},{name:"arrow-color",type:s.color},{name:"arrow-fill",type:s.arrowFill},{name:"arrow-width",type:s.arrowWidth}].forEach(function(t){D.forEach(function(e){var r=e+"-"+t.name,n=t.type,i=t.triggersBounds;I.push({name:r,type:n,triggersBounds:i})})},{});var N=bc.properties=[].concat(p,y,f,g,m,E,d,u,l,c,h,b,x,T,w,_,R,k,C,I,S),M=bc.propertyGroups={behavior:p,transition:y,visibility:f,overlay:g,underlay:m,ghost:E,commonLabel:d,labelDimensions:u,mainLabel:l,sourceLabel:c,targetLabel:h,nodeBody:b,nodeBorder:x,nodeOutline:T,backgroundImage:w,pie:_,stripe:R,compound:k,edgeLine:C,edgeArrow:I,core:S},O=bc.propertyGroupNames={};(bc.propertyGroupKeys=Object.keys(M)).forEach(function(t){O[t]=M[t].map(function(t){return t.name}),M[t].forEach(function(e){return e.groupKey=t})});var $=bc.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];bc.propertyNames=N.map(function(t){return t.name});for(var P=0;P<N.length;P++){var B=N[P];N[B.name]=B}for(var F=0;F<$.length;F++){var z=$[F],K=N[z.pointsTo],j={name:z.name,alias:!0,pointsTo:K};N.push(j),N[z.name]=j}}(),bc.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},bc.getDefaultProperties=function(){var t=this._private;if(null!=t.defaultProperties)return t.defaultProperties;for(var e=bt({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(t,e){for(var r=1;r<=bc.pieBackgroundN;r++){var n=e.name.replace("{{i}}",r),i=e.value;t[n]=i}return t},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(t,e){for(var r=1;r<=bc.stripeBackgroundN;r++){var n=e.name.replace("{{i}}",r),i=e.value;t[n]=i}return t},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(t,e){return bc.arrowPrefixes.forEach(function(r){var n=r+"-"+e.name,i=e.value;t[n]=i}),t},{})),r={},n=0;n<this.properties.length;n++){var i=this.properties[n];if(!i.pointsTo){var a=i.name,o=e[a],s=this.parse(a,o);r[a]=s}}return t.defaultProperties=r,t.defaultProperties},bc.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var xc={parse:function(t,e,r,n){var i=this;if(H(e))return i.parseImplWarn(t,e,r,n);var a,o=Vt(t,""+e,r?"t":"f","mapping"===n||!0===n||!1===n||null==n?"dontcare":n),s=i.propCache=i.propCache||[];return(a=s[o])||(a=s[o]=i.parseImplWarn(t,e,r,n)),(r||"mapping"===n)&&(a=le(a))&&(a.value=le(a.value)),a},parseImplWarn:function(t,e,r,n){var i=this.parseImpl(t,e,r,n);return i||null==e||se("The style property `".concat(t,": ").concat(e,"` is invalid")),!i||"width"!==i.name&&"height"!==i.name||"label"!==e||se("The style value of `label` is deprecated for `"+i.name+"`"),i}};xc.parseImpl=function(t,e,r,n){var i=this;t=lt(t);var a=i.properties[t],o=e,s=i.types;if(!a)return null;if(void 0===e)return null;a.alias&&(a=a.pointsTo,t=a.name);var l=V(e);l&&(e=e.trim());var c,h,u=a.type;if(!u)return null;if(r&&(""===e||null===e))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(H(e))return{name:t,value:e,strValue:"fn",mapped:s.fn,bypass:r};if(!l||n||e.length<7||"a"!==e[1]);else{if(e.length>=7&&"d"===e[0]&&(c=new RegExp(s.data.regex).exec(e))){if(r)return!1;var d=s.data;return{name:t,value:c,strValue:""+e,mapped:d,field:c[1],bypass:r}}if(e.length>=10&&"m"===e[0]&&(h=new RegExp(s.mapData.regex).exec(e))){if(r)return!1;if(u.multiple)return!1;var p=s.mapData;if(!u.color&&!u.number)return!1;var f=this.parse(t,h[4]);if(!f||f.mapped)return!1;var g=this.parse(t,h[5]);if(!g||g.mapped)return!1;if(f.pfValue===g.pfValue||f.strValue===g.strValue)return se("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+f.strValue+"`"),this.parse(t,f.strValue);if(u.color){var m=f.value,y=g.value;if(!(m[0]!==y[0]||m[1]!==y[1]||m[2]!==y[2]||m[3]!==y[3]&&(null!=m[3]&&1!==m[3]||null!=y[3]&&1!==y[3])))return!1}return{name:t,value:h,strValue:""+e,mapped:p,field:h[1],fieldMin:parseFloat(h[2]),fieldMax:parseFloat(h[3]),valueMin:f.value,valueMax:g.value,bypass:r}}}if(u.multiple&&"multiple"!==n){var v;if(v=l?e.split(/\s+/):X(e)?e:[e],u.evenMultiple&&v.length%2!=0)return null;for(var b=[],x=[],T=[],w="",k=!1,C=0;C<v.length;C++){var E=i.parse(t,v[C],r,"multiple");k=k||V(E.value),b.push(E.value),T.push(null!=E.pfValue?E.pfValue:E.value),x.push(E.units),w+=(C>0?" ":"")+E.strValue}return u.validate&&!u.validate(b,x)?null:u.singleEnum&&k?1===b.length&&V(b[0])?{name:t,value:b[0],strValue:b[0],bypass:r}:null:{name:t,value:b,pfValue:T,strValue:w,bypass:r,units:x}}var S,_,A=function(){for(var n=0;n<u.enums.length;n++){if(u.enums[n]===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null};if(u.number){var R,L="px";if(u.units&&(R=u.units),u.implicitUnits&&(L=u.implicitUnits),!u.unitless)if(l){var I="px|em"+(u.allowPercent?"|\\%":"");R&&(I=R);var D=e.match("^("+pt+")("+I+")?$");D&&(e=D[1],R=D[2]||L)}else R&&!u.implicitUnits||(R=L);if(e=parseFloat(e),isNaN(e)&&void 0===u.enums)return null;if(isNaN(e)&&void 0!==u.enums)return e=o,A();if(u.integer&&(!Q(_=e)||Math.floor(_)!==_))return null;if(void 0!==u.min&&(e<u.min||u.strictMin&&e===u.min)||void 0!==u.max&&(e>u.max||u.strictMax&&e===u.max))return null;var N={name:t,value:e,strValue:""+e+(R||""),units:R,bypass:r};return u.unitless||"px"!==R&&"em"!==R?N.pfValue=e:N.pfValue="px"!==R&&R?this.getEmSizeInPixels()*e:e,"ms"!==R&&"s"!==R||(N.pfValue="ms"===R?e:1e3*e),"deg"!==R&&"rad"!==R||(N.pfValue="rad"===R?e:(S=e,Math.PI*S/180)),"%"===R&&(N.pfValue=e/100),N}if(u.propList){var M=[],O=""+e;if("none"===O);else{for(var $=O.split(/\s*,\s*|\s+/),P=0;P<$.length;P++){var B=$[P].trim();i.properties[B]?M.push(B):se("`"+B+"` is not a valid property name")}if(0===M.length)return null}return{name:t,value:M,strValue:0===M.length?"none":M.join(" "),bypass:r}}if(u.color){var F=xt(e);return F?{name:t,value:F,pfValue:F,strValue:"rgb("+F[0]+","+F[1]+","+F[2]+")",bypass:r}:null}if(u.regex||u.regexes){if(u.enums){var z=A();if(z)return z}for(var K=u.regexes?u.regexes:[u.regex],j=0;j<K.length;j++){var q=new RegExp(K[j]).exec(e);if(q)return{name:t,value:u.singleRegexMatchValue?q[1]:q,strValue:""+e,bypass:r}}return null}return u.string?{name:t,value:""+e,strValue:""+e,bypass:r}:u.enums?A():null};var Tc=function(t){if(!(this instanceof Tc))return new Tc(t);nt(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):ae("A style must have a core reference")},wc=Tc.prototype;wc.instanceString=function(){return"style"},wc.clear=function(){for(var t=this._private,e=t.cy.elements(),r=0;r<this.length;r++)this[r]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(e,!0),e.forEach(function(t){var e=t[0]._private;e.styleDirty=!0,e.appliedInitStyle=!1}),this},wc.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},wc.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},wc.selector=function(t){var e="core"===t?null:new ls(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this},wc.css=function(){var t=arguments;if(1===t.length)for(var e=t[0],r=0;r<this.properties.length;r++){var n=this.properties[r],i=e[n.name];void 0===i&&(i=e[ct(n.name)]),void 0!==i&&this.cssRule(n.name,i)}else 2===t.length&&this.cssRule(t[0],t[1]);return this},wc.style=wc.css,wc.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.name.match(/stripe-(\d+)-background-size/)&&r.value&&(this._private.hasStripe=!0),r.mapped&&this[n].mappedProperties.push(r),!this[n].selector&&(this._private.coreStyle[r.name]=r)}return this},wc.append=function(t){return it(t)?t.appendToStyle(this):X(t)?this.appendFromJson(t):V(t)&&this.appendFromString(t),this},Tc.fromJson=function(t,e){var r=new Tc(t);return r.fromJson(e),r},Tc.fromString=function(t,e){return new Tc(t).fromString(e)},[dc,fc,gc,mc,yc,vc,bc,xc].forEach(function(t){bt(wc,t)}),Tc.types=wc.types,Tc.properties=wc.properties,Tc.propertyGroups=wc.propertyGroups,Tc.propertyGroupNames=wc.propertyGroupNames,Tc.propertyGroupKeys=wc.propertyGroupKeys;var kc={style:function(t){t&&this.setStyle(t).update();return this._private.style},setStyle:function(t){var e=this._private;return it(t)?e.style=t.generateStyle(this):X(t)?e.style=Tc.fromJson(this,t):V(t)?e.style=Tc.fromString(this,t):e.style=Tc(this),e.style},updateStyle:function(){this.mutableElements().updateStyle()}},Cc={autolock:function(t){return void 0===t?this._private.autolock:(this._private.autolock=!!t,this)},autoungrabify:function(t){return void 0===t?this._private.autoungrabify:(this._private.autoungrabify=!!t,this)},autounselectify:function(t){return void 0===t?this._private.autounselectify:(this._private.autounselectify=!!t,this)},selectionType:function(t){var e=this._private;return null==e.selectionType&&(e.selectionType="single"),void 0===t?e.selectionType:("additive"!==t&&"single"!==t||(e.selectionType=t),this)},panningEnabled:function(t){return void 0===t?this._private.panningEnabled:(this._private.panningEnabled=!!t,this)},userPanningEnabled:function(t){return void 0===t?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!t,this)},zoomingEnabled:function(t){return void 0===t?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!t,this)},userZoomingEnabled:function(t){return void 0===t?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!t,this)},boxSelectionEnabled:function(t){return void 0===t?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!t,this)},pan:function(){var t,e,r,n,i,a=arguments,o=this._private.pan;switch(a.length){case 0:return o;case 1:if(V(a[0]))return o[t=a[0]];if(Z(a[0])){if(!this._private.panningEnabled)return this;n=(r=a[0]).x,i=r.y,Q(n)&&(o.x=n),Q(i)&&(o.y=i),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=a[1],"x"!==(t=a[0])&&"y"!==t||!Q(e)||(o[t]=e),this.emit("pan viewport")}return this.notify("viewport"),this},panBy:function(t,e){var r,n,i,a,o,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:Z(t)&&(a=(i=s[0]).x,o=i.y,Q(a)&&(l.x+=a),Q(o)&&(l.y+=o),this.emit("pan viewport"));break;case 2:n=e,"x"!==(r=t)&&"y"!==r||!Q(n)||(l[r]+=n),this.emit("pan viewport")}return this.notify("viewport"),this},gc:function(){this.notify("gc")},fit:function(t,e){var r=this.getFitViewport(t,e);if(r){var n=this._private;n.zoom=r.zoom,n.pan=r.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(t,e){if(Q(t)&&void 0===e&&(e=t,t=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var r,n;if(V(t)){var i=t;t=this.$(i)}else if(Z(n=t)&&Q(n.x1)&&Q(n.x2)&&Q(n.y1)&&Q(n.y2)){var a=t;(r={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2}).w=r.x2-r.x1,r.h=r.y2-r.y1}else tt(t)||(t=this.mutableElements());if(!tt(t)||!t.empty()){r=r||t.boundingBox();var o,s=this.width(),l=this.height();if(e=Q(e)?e:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(r.w)&&!isNaN(r.h)&&r.w>0&&r.h>0)return{zoom:o=(o=(o=Math.min((s-2*e)/r.w,(l-2*e)/r.h))>this._private.maxZoom?this._private.maxZoom:o)<this._private.minZoom?this._private.minZoom:o,pan:{x:(s-o*(r.x1+r.x2))/2,y:(l-o*(r.y1+r.y2))/2}}}}},zoomRange:function(t,e){var r=this._private;if(null==e){var n=t;t=n.min,e=n.max}return Q(t)&&Q(e)&&t<=e?(r.minZoom=t,r.maxZoom=e):Q(t)&&void 0===e&&t<=r.maxZoom?r.minZoom=t:Q(e)&&void 0===t&&e>=r.minZoom&&(r.maxZoom=e),this},minZoom:function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},maxZoom:function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},getZoomedViewport:function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,o=!1;if(n.zoomingEnabled||(o=!0),Q(t)?r=t:Z(t)&&(r=t.level,null!=t.position?e=We(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null==e||n.panningEnabled||(o=!0)),r=(r=r>n.maxZoom?n.maxZoom:r)<n.minZoom?n.minZoom:r,o||!Q(r)||r===a||null!=e&&(!Q(e.x)||!Q(e.y)))return null;if(null!=e){var s=i,l=a,c=r;return{zoomed:!0,panned:!0,zoom:c,pan:{x:-c/l*(e.x-s.x)+e.x,y:-c/l*(e.y-s.y)+e.y}}}return{zoomed:!0,panned:!1,zoom:r,pan:i}},zoom:function(t){if(void 0===t)return this._private.zoom;var e=this.getZoomedViewport(t),r=this._private;return null!=e&&e.zoomed?(r.zoom=e.zoom,e.panned&&(r.pan.x=e.pan.x,r.pan.y=e.pan.y),this.emit("zoom"+(e.panned?" pan":"")+" viewport"),this.notify("viewport"),this):this},viewport:function(t){var e=this._private,r=!0,n=!0,i=[],a=!1,o=!1;if(!t)return this;if(Q(t.zoom)||(r=!1),Z(t.pan)||(n=!1),!r&&!n)return this;if(r){var s=t.zoom;s<e.minZoom||s>e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=s,i.push("zoom"))}if(n&&(!a||!t.cancelOnFailedZoom)&&e.panningEnabled){var l=t.pan;Q(l.x)&&(e.pan.x=l.x,o=!1),Q(l.y)&&(e.pan.y=l.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(t){var e=this.getCenterPan(t);return e&&(this._private.pan=e,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(t,e){if(this._private.panningEnabled){if(V(t)){var r=t;t=this.mutableElements().filter(r)}else tt(t)||(t=this.mutableElements());if(0!==t.length){var n=t.boundingBox(),i=this.width(),a=this.height();return{x:(i-(e=void 0===e?this._private.zoom:e)*(n.x1+n.x2))/2,y:(a-e*(n.y1+n.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var t,e,r=this._private,n=r.container,i=this;return r.sizeCache=r.sizeCache||(n?(t=i.window().getComputedStyle(n),e=function(e){return parseFloat(t.getPropertyValue(e))},{width:n.clientWidth-e("padding-left")-e("padding-right"),height:n.clientHeight-e("padding-top")-e("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var t=this._private.pan,e=this._private.zoom,r=this.renderedExtent(),n={x1:(r.x1-t.x)/e,x2:(r.x2-t.x)/e,y1:(r.y1-t.y)/e,y2:(r.y2-t.y)/e};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var t=this.width(),e=this.height();return{x1:0,y1:0,x2:t,y2:e,w:t,h:e}},multiClickDebounceTime:function(t){return t?(this._private.multiClickDebounceTime=t,this):this._private.multiClickDebounceTime}};Cc.centre=Cc.center,Cc.autolockNodes=Cc.autolock,Cc.autoungrabifyNodes=Cc.autoungrabify;var Ec={data:Co.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Co.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Co.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Co.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ec.attr=Ec.data,Ec.removeAttr=Ec.removeData;var Sc=function(t){var e=this,r=(t=bt({},t)).container;r&&!J(r)&&J(r[0])&&(r=r[0]);var n=r?r._cyreg:null;(n=n||{})&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];r&&(r._cyreg=n),n.cy=e;var a=void 0!==p&&void 0!==r&&!t.headless,o=t;o.layout=bt({name:a?"grid":"null"},o.layout),o.renderer=bt({name:a?"canvas":"null"},o.renderer);var s=function(t,e,r){return void 0!==e?e:void 0!==r?r:t},l=this._private={container:r,ready:!1,options:o,elements:new jl(this),listeners:[],aniEles:new jl(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?a:o.styleEnabled,zoom:Q(o.zoom)?o.zoom:1,pan:{x:Z(o.pan)&&Q(o.pan.x)?o.pan.x:0,y:Z(o.pan)&&Q(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&e.setStyle([]);var c=bt({},o,o.renderer);e.initRenderer(c);!function(t,e){if(t.some(ot))return Zn.all(t).then(e);e(t)}([o.style,o.elements],function(t){var r=t[0],a=t[1];l.styleEnabled&&e.style().append(r),function(t,r,n){e.notifications(!1);var i=e.mutableElements();i.length>0&&i.remove(),null!=t&&(Z(t)||X(t))&&e.add(t),e.one("layoutready",function(t){e.notifications(!0),e.emit(t),e.one("load",r),e.emitAndNotify("load")}).one("layoutstop",function(){e.one("done",n),e.emit("done")});var a=bt({},e._private.options.layout);a.eles=e.elements(),e.layout(a).run()}(a,function(){e.startAnimationLoop(),l.ready=!0,H(o.ready)&&e.on("ready",o.ready);for(var t=0;t<i.length;t++){var r=i[t];e.on("ready",r)}n&&(n.readies=[]),e.emit("ready")},o.done)})},_c=Sc.prototype;bt(_c,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(t){return this.isReady()?this.emitter().emit("ready",[],t):this.on("ready",t),this},destroy:function(){var t=this;if(!t.destroyed())return t.stopAnimationLoop(),t.destroyRenderer(),this.emit("destroy"),t._private.destroyed=!0,t},hasElementWithId:function(t){return this._private.elements.hasElementWithId(t)},getElementById:function(t){return this._private.elements.getElementById(t)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(t){return this._private.elements.merge(t),this},removeFromPool:function(t){return this._private.elements.unmerge(t),this},container:function(){return this._private.container||null},window:function(){if(null==this._private.container)return p;var t=this._private.container.ownerDocument;return void 0===t||null==t?p:t.defaultView||p},mount:function(t){if(null!=t){var e=this,r=e._private,n=r.options;return!J(t)&&J(t[0])&&(t=t[0]),e.stopAnimationLoop(),e.destroyRenderer(),r.container=t,r.styleEnabled=!0,e.invalidateSize(),e.initRenderer(bt({},n,n.renderer,{name:"null"===n.renderer.name?"canvas":n.renderer.name})),e.startAnimationLoop(),e.style(n.style),e.emit("mount"),e}},unmount:function(){var t=this;return t.stopAnimationLoop(),t.destroyRenderer(),t.initRenderer({name:"null"}),t.emit("unmount"),t},options:function(){return le(this._private.options)},json:function(t){var e=this,r=e._private,n=e.mutableElements();if(Z(t)){if(e.startBatch(),t.elements){var i={},a=function(t,r){for(var n=[],a=[],o=0;o<t.length;o++){var s=t[o];if(s.data.id){var l=""+s.data.id,c=e.getElementById(l);i[l]=!0,0!==c.length?a.push({ele:c,json:s}):r?(s.group=r,n.push(s)):n.push(s)}else se("cy.json() cannot handle elements without an ID attribute")}e.add(n);for(var h=0;h<a.length;h++){var u=a[h],d=u.ele,p=u.json;d.json(p)}};if(X(t.elements))a(t.elements);else for(var o=["nodes","edges"],s=0;s<o.length;s++){var l=o[s],c=t.elements[l];X(c)&&a(c,l)}var h=e.collection();n.filter(function(t){return!i[t.id()]}).forEach(function(t){t.isParent()?h.merge(t):t.remove()}),h.forEach(function(t){return t.children().move({parent:null})}),h.forEach(function(t){return function(t){return e.getElementById(t.id())}(t).remove()})}t.style&&e.style(t.style),null!=t.zoom&&t.zoom!==r.zoom&&e.zoom(t.zoom),t.pan&&(t.pan.x===r.pan.x&&t.pan.y===r.pan.y||e.pan(t.pan)),t.data&&e.data(t.data);for(var u=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],d=0;d<u.length;d++){var p=u[d];null!=t[p]&&e[p](t[p])}return e.endBatch(),this}var f={};!!t?f.elements=this.elements().map(function(t){return t.json()}):(f.elements={},n.forEach(function(t){var e=t.group();f.elements[e]||(f.elements[e]=[]),f.elements[e].push(t.json())})),this._private.styleEnabled&&(f.style=e.style().json()),f.data=le(e.data());var g=r.options;return f.zoomingEnabled=r.zoomingEnabled,f.userZoomingEnabled=r.userZoomingEnabled,f.zoom=r.zoom,f.minZoom=r.minZoom,f.maxZoom=r.maxZoom,f.panningEnabled=r.panningEnabled,f.userPanningEnabled=r.userPanningEnabled,f.pan=le(r.pan),f.boxSelectionEnabled=r.boxSelectionEnabled,f.renderer=le(g.renderer),f.hideEdgesOnViewport=g.hideEdgesOnViewport,f.textureOnViewport=g.textureOnViewport,f.wheelSensitivity=g.wheelSensitivity,f.motionBlur=g.motionBlur,f.multiClickDebounceTime=g.multiClickDebounceTime,f}}),_c.$id=_c.getElementById,[Wl,rc,ac,oc,sc,lc,hc,uc,kc,Cc,Ec].forEach(function(t){bt(_c,t)});var Ac={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}},Rc={maximal:!1,acyclic:!1},Lc=function(t){return t.scratch("breadthfirst")},Ic=function(t,e){return t.scratch("breadthfirst",e)};function Dc(t){this.options=bt({},Ac,Rc,t)}Dc.prototype.run=function(){var t,e=this.options,r=e.cy,n=e.eles,i=n.nodes().filter(function(t){return t.isChildless()}),a=n,o=e.directed,s=e.acyclic||e.maximal||e.maximalAdjustments>0,l=!!e.boundingBox,c=rr(l?e.boundingBox:structuredClone(r.extent()));if(tt(e.roots))t=e.roots;else if(X(e.roots)){for(var h=[],u=0;u<e.roots.length;u++){var d=e.roots[u],p=r.getElementById(d);h.push(p)}t=r.collection(h)}else if(V(e.roots))t=r.$(e.roots);else if(o)t=i.roots();else{var f=n.components();t=r.collection();for(var g=function(){var e=f[m],r=e.maxDegree(!1),n=e.filter(function(t){return t.degree(!1)===r});t=t.add(n)},m=0;m<f.length;m++)g()}var y=[],v={},b=function(t,e){null==y[e]&&(y[e]=[]);var r=y[e].length;y[e].push(t),Ic(t,{index:r,depth:e})};a.bfs({roots:t,directed:e.directed,visit:function(t,e,r,n,i){var a=t[0],o=a.id();a.isChildless()&&b(a,i),v[o]=!0}});for(var x=[],T=0;T<i.length;T++){var w=i[T];v[w.id()]||x.push(w)}var k=function(t){for(var e=y[t],r=0;r<e.length;r++){var n=e[r];null!=n?Ic(n,{depth:t,index:r}):(e.splice(r,1),r--)}},C=function(t,r){for(var i=Lc(t),a=t.incomers().filter(function(t){return t.isNode()&&n.has(t)}),o=-1,s=t.id(),l=0;l<a.length;l++){var c=a[l],h=Lc(c);o=Math.max(o,h.depth)}if(i.depth<=o){if(!e.acyclic&&r[s])return null;var u=o+1;return function(t,e){var r=Lc(t),n=r.depth,i=r.index;y[n][i]=null,t.isChildless()&&b(t,e)}(t,u),r[s]=u,!0}return!1};if(o&&s){var E=[],S={},_=function(t){return E.push(t)},A=function(){return E.shift()};for(i.forEach(function(t){return E.push(t)});E.length>0;){var R=A(),L=C(R,S);if(L)R.outgoers().filter(function(t){return t.isNode()&&n.has(t)}).forEach(_);else if(null===L){se("Detected double maximal shift for node `"+R.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(e.avoidOverlap)for(var D=0;D<i.length;D++){var N=i[D].layoutDimensions(e),M=N.w,O=N.h;I=Math.max(I,M,O)}var $={},P=function(t){if($[t.id()])return $[t.id()];for(var e=Lc(t).depth,r=t.neighborhood(),n=0,a=0,o=0;o<r.length;o++){var s=r[o];if(!s.isEdge()&&!s.isParent()&&i.has(s)){var l=Lc(s);if(null!=l){var c=l.index,h=l.depth;if(null!=c&&null!=h){var u=y[h].length;h<e&&(n+=c/u,a++)}}}}return n/=a=Math.max(1,a),0===a&&(n=0),$[t.id()]=n,n},B=function(t,e){var r=P(t)-P(e);return 0===r?vt(t.id(),e.id()):r};void 0!==e.depthSort&&(B=e.depthSort);for(var F=y.length,z=0;z<F;z++)y[z].sort(B),k(z);for(var K=[],j=0;j<x.length;j++)K.push(x[j]);K.length&&(y.unshift(K),F=y.length,function(){for(var t=0;t<F;t++)k(t)}());for(var q=0,W=0;W<F;W++)q=Math.max(y[W].length,q);var U=c.x1+c.w/2,G=c.y1+c.h/2,Y=i.reduce(function(t,r){return n=r.boundingBox({includeLabels:e.nodeDimensionsIncludeLabels}),{w:-1===t.w?n.w:(t.w+n.w)/2,h:-1===t.h?n.h:(t.h+n.h)/2};var n},{w:-1,h:-1}),H=Math.max(1===F?0:l?(c.h-2*e.padding-Y.h)/(F-1):(c.h-2*e.padding-Y.h)/(F+1),I),Z=y.reduce(function(t,e){return Math.max(t,e.length)},0),Q={downward:0,leftward:90,upward:180,rightward:-90};-1===Object.keys(Q).indexOf(e.direction)&&ae("Invalid direction '".concat(e.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Q).join(", ")));return n.nodes().layoutPositions(this,e,function(t){return Xt(function(t){var r=Lc(t),n=r.depth,i=r.index;if(e.circle){var a=Math.min(c.w/2/F,c.h/2/F),o=(a=Math.max(a,I))*n+a-(F>0&&y[0].length<=3?a/2:0),s=2*Math.PI/y[n].length*i;return 0===n&&1===y[0].length&&(o=1),{x:U+o*Math.cos(s),y:G+o*Math.sin(s)}}var h=y[n].length,u=Math.max(1===h?0:l?(c.w-2*e.padding-Y.w)/((e.grid?Z:h)-1):(c.w-2*e.padding-Y.w)/((e.grid?Z:h)+1),I);return{x:U+(i+1-(h+1)/2)*u,y:G+(n+1-(F+1)/2)*H}}(t),c,Q[e.direction])}),this};var Nc={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Mc(t){this.options=bt({},Nc,t)}Mc.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var o,s=rr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l=s.x1+s.w/2,c=s.y1+s.h/2,h=(void 0===e.sweep?2*Math.PI-2*Math.PI/a.length:e.sweep)/Math.max(1,a.length-1),u=0,d=0;d<a.length;d++){var p=a[d].layoutDimensions(e),f=p.w,g=p.h;u=Math.max(u,f,g)}if(o=Q(e.radius)?e.radius:a.length<=1?0:Math.min(s.h,s.w)/2-u,a.length>1&&e.avoidOverlap){u*=1.75;var m=Math.cos(h)-Math.cos(0),y=Math.sin(h)-Math.sin(0),v=Math.sqrt(u*u/(m*m+y*y));o=Math.max(v,o)}return n.nodes().layoutPositions(this,e,function(t,r){var n=e.startAngle+r*h*(i?1:-1),a=o*Math.cos(n),s=o*Math.sin(n);return{x:l+a,y:c+s}}),this};var Oc,$c={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(t){return t.degree()},levelWidth:function(t){return t.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function Pc(t){this.options=bt({},$c,t)}Pc.prototype.run=function(){for(var t=this.options,e=t,r=void 0!==e.counterclockwise?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),o=rr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,c=[],h=0,u=0;u<a.length;u++){var d,p=a[u];d=e.concentric(p),c.push({value:d,node:p}),p._private.scratch.concentric=d}a.updateStyle();for(var f=0;f<a.length;f++){var g=a[f].layoutDimensions(e);h=Math.max(h,g.w,g.h)}c.sort(function(t,e){return e.value-t.value});for(var m=e.levelWidth(a),y=[[]],v=y[0],b=0;b<c.length;b++){var x=c[b];if(v.length>0)Math.abs(v[0].value-x.value)>=m&&(v=[],y.push(v));v.push(x)}var T=h+e.minNodeSpacing;if(!e.avoidOverlap){var w=y.length>0&&y[0].length>1,k=(Math.min(o.w,o.h)/2-T)/(y.length+w?1:0);T=Math.min(T,k)}for(var C=0,E=0;E<y.length;E++){var S=y[E],_=void 0===e.sweep?2*Math.PI-2*Math.PI/S.length:e.sweep,A=S.dTheta=_/Math.max(1,S.length-1);if(S.length>1&&e.avoidOverlap){var R=Math.cos(A)-Math.cos(0),L=Math.sin(A)-Math.sin(0),I=Math.sqrt(T*T/(R*R+L*L));C=Math.max(I,C)}S.r=C,C+=T}if(e.equidistant){for(var D=0,N=0,M=0;M<y.length;M++){var O=y[M].r-N;D=Math.max(D,O)}N=0;for(var $=0;$<y.length;$++){var P=y[$];0===$&&(N=P.r),P.r=N,N+=D}}for(var B={},F=0;F<y.length;F++)for(var z=y[F],K=z.dTheta,j=z.r,q=0;q<z.length;q++){var W=z[q],U=e.startAngle+(r?1:-1)*K*q,G={x:s+j*Math.cos(U),y:l+j*Math.sin(U)};B[W.node.id()]=G}return i.nodes().layoutPositions(this,e,function(t){var e=t.id();return B[e]}),this};var Bc={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(t,e){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(t){return 2048},nodeOverlap:4,idealEdgeLength:function(t){return 32},edgeElasticity:function(t){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function Fc(t){this.options=bt({},Bc,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges().filter(function(t){var r=t.source().data("id"),n=t.target().data("id"),i=e.some(function(t){return t.data("id")===r}),a=e.some(function(t){return t.data("id")===n});return!i||!a});this.options.eles=this.options.eles.not(r)}Fc.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,!0!==t.animate&&!1!==t.animate||r.emit({type:"layoutstart",layout:r}),Oc=!0===t.debug;var n=zc(e,r,t);Oc&&(void 0)(n),t.randomize&&qc(n);var i=Bt(),a=function(){Uc(n,e,t),!0===t.fit&&e.fit(t.padding)},o=function(e){return!(r.stopped||e>=t.numIter)&&(Gc(n,t),n.temperature=n.temperature*t.coolingFactor,!(n.temperature<t.minTemp))},s=function(){if(!0===t.animate||!1===t.animate)a(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var e=t.eles.nodes(),i=Wc(n,t,e);e.layoutPositions(r,t,i)}},l=0,c=!0;if(!0===t.animate){var h=function(){for(var e=0;c&&e<t.refresh;)c=o(l),l++,e++;c?(Bt()-i>=t.animationThreshold&&a(),Pt(h)):(ih(n,t),s())};h()}else{for(;c;)c=o(l),l++;ih(n,t),s()}return this},Fc.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Fc.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var zc=function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=rr(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=r.eles.components(),l={},c=0;c<s.length;c++)for(var h=s[c],u=0;u<h.length;u++){l[h[u].id()]=c}for(c=0;c<o.nodeSize;c++){var d=(y=i[c]).layoutDimensions(r);(N={}).isLocked=y.locked(),N.id=y.data("id"),N.parentId=y.data("parent"),N.cmptId=l[y.id()],N.children=[],N.positionX=y.position("x"),N.positionY=y.position("y"),N.offsetX=0,N.offsetY=0,N.height=d.w,N.width=d.h,N.maxX=N.positionX+N.width/2,N.minX=N.positionX-N.width/2,N.maxY=N.positionY+N.height/2,N.minY=N.positionY-N.height/2,N.padLeft=parseFloat(y.style("padding")),N.padRight=parseFloat(y.style("padding")),N.padTop=parseFloat(y.style("padding")),N.padBottom=parseFloat(y.style("padding")),N.nodeRepulsion=H(r.nodeRepulsion)?r.nodeRepulsion(y):r.nodeRepulsion,o.layoutNodes.push(N),o.idToIndex[N.id]=c}var p=[],f=0,g=-1,m=[];for(c=0;c<o.nodeSize;c++){var y,v=(y=o.layoutNodes[c]).parentId;null!=v?o.layoutNodes[o.idToIndex[v]].children.push(y.id):(p[++g]=y.id,m.push(y.id))}for(o.graphSet.push(m);f<=g;){var b=p[f++],x=o.idToIndex[b],T=o.layoutNodes[x].children;if(T.length>0){o.graphSet.push(T);for(c=0;c<T.length;c++)p[++g]=T[c]}}for(c=0;c<o.graphSet.length;c++){var w=o.graphSet[c];for(u=0;u<w.length;u++){var k=o.idToIndex[w[u]];o.indexToGraph[k]=c}}for(c=0;c<o.edgeSize;c++){var C=n[c],E={};E.id=C.data("id"),E.sourceId=C.data("source"),E.targetId=C.data("target");var S=H(r.idealEdgeLength)?r.idealEdgeLength(C):r.idealEdgeLength,_=H(r.edgeElasticity)?r.edgeElasticity(C):r.edgeElasticity,A=o.idToIndex[E.sourceId],R=o.idToIndex[E.targetId];if(o.indexToGraph[A]!=o.indexToGraph[R]){for(var L=Kc(E.sourceId,E.targetId,o),I=o.graphSet[L],D=0,N=o.layoutNodes[A];-1===I.indexOf(N.id);)N=o.layoutNodes[o.idToIndex[N.parentId]],D++;for(N=o.layoutNodes[R];-1===I.indexOf(N.id);)N=o.layoutNodes[o.idToIndex[N.parentId]],D++;S*=D*r.nestingFactor}E.idealLength=S,E.elasticity=_,o.layoutEdges.push(E)}return o},Kc=function(t,e,r){var n=jc(t,e,0,r);return 2>n.count?0:n.graph},jc=function(t,e,r,n){var i=n.graphSet[r];if(-1<i.indexOf(t)&&-1<i.indexOf(e))return{count:2,graph:r};for(var a=0,o=0;o<i.length;o++){var s=i[o],l=n.idToIndex[s],c=n.layoutNodes[l].children;if(0!==c.length){var h=n.indexToGraph[n.idToIndex[c[0]]],u=jc(t,e,h,n);if(0!==u.count){if(1!==u.count)return u;if(2===++a)break}}}return{count:a,graph:r}},qc=function(t,e){for(var r=t.clientWidth,n=t.clientHeight,i=0;i<t.nodeSize;i++){var a=t.layoutNodes[i];0!==a.children.length||a.isLocked||(a.positionX=Math.random()*r,a.positionY=Math.random()*n)}},Wc=function(t,e,r){var n=t.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return e.boundingBox&&(r.forEach(function(e){var r=t.layoutNodes[t.idToIndex[e.data("id")]];i.x1=Math.min(i.x1,r.positionX),i.x2=Math.max(i.x2,r.positionX),i.y1=Math.min(i.y1,r.positionY),i.y2=Math.max(i.y2,r.positionY)}),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(r,a){var o=t.layoutNodes[t.idToIndex[r.data("id")]];if(e.boundingBox){var s=0===i.w?.5:(o.positionX-i.x1)/i.w,l=0===i.h?.5:(o.positionY-i.y1)/i.h;return{x:n.x1+s*n.w,y:n.y1+l*n.h}}return{x:o.positionX,y:o.positionY}}},Uc=function(t,e,r){var n=r.layout,i=r.eles.nodes(),a=Wc(t,r,i);i.positions(a),!0!==t.ready&&(t.ready=!0,n.one("layoutready",r.ready),n.emit({type:"layoutready",layout:this}))},Gc=function(t,e,r){Yc(t,e),Qc(t),Jc(t,e),th(t),eh(t)},Yc=function(t,e){for(var r=0;r<t.graphSet.length;r++)for(var n=t.graphSet[r],i=n.length,a=0;a<i;a++)for(var o=t.layoutNodes[t.idToIndex[n[a]]],s=a+1;s<i;s++){var l=t.layoutNodes[t.idToIndex[n[s]]];Hc(o,l,t,e)}},Vc=function(t){return 2*t*Math.random()-1},Hc=function(t,e,r,n){if(t.cmptId===e.cmptId||r.isCompound){var i=e.positionX-t.positionX,a=e.positionY-t.positionY;0===i&&0===a&&(i=Vc(1),a=Vc(1));var o=Xc(t,e,i,a);if(o>0)var s=(c=n.nodeOverlap*o)*i/(g=Math.sqrt(i*i+a*a)),l=c*a/g;else{var c,h=Zc(t,i,a),u=Zc(e,-1*i,-1*a),d=u.x-h.x,p=u.y-h.y,f=d*d+p*p,g=Math.sqrt(f);s=(c=(t.nodeRepulsion+e.nodeRepulsion)/f)*d/g,l=c*p/g}t.isLocked||(t.offsetX-=s,t.offsetY-=l),e.isLocked||(e.offsetX+=s,e.offsetY+=l)}},Xc=function(t,e,r,n){if(r>0)var i=t.maxX-e.minX;else i=e.maxX-t.minX;if(n>0)var a=t.maxY-e.minY;else a=e.maxY-t.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Zc=function(t,e,r){var n=t.positionX,i=t.positionY,a=t.height||1,o=t.width||1,s=r/e,l=a/o,c={};return 0===e&&0<r||0===e&&0>r?(c.x=n,c.y=i+a/2,c):0<e&&-1*l<=s&&s<=l?(c.x=n+o/2,c.y=i+o*r/2/e,c):0>e&&-1*l<=s&&s<=l?(c.x=n-o/2,c.y=i-o*r/2/e,c):0<r&&(s<=-1*l||s>=l)?(c.x=n+a*e/2/r,c.y=i+a/2,c):0>r&&(s<=-1*l||s>=l)?(c.x=n-a*e/2/r,c.y=i-a/2,c):c},Qc=function(t,e){for(var r=0;r<t.edgeSize;r++){var n=t.layoutEdges[r],i=t.idToIndex[n.sourceId],a=t.layoutNodes[i],o=t.idToIndex[n.targetId],s=t.layoutNodes[o],l=s.positionX-a.positionX,c=s.positionY-a.positionY;if(0!==l||0!==c){var h=Zc(a,l,c),u=Zc(s,-1*l,-1*c),d=u.x-h.x,p=u.y-h.y,f=Math.sqrt(d*d+p*p),g=Math.pow(n.idealLength-f,2)/n.elasticity;if(0!==f)var m=g*d/f,y=g*p/f;else m=0,y=0;a.isLocked||(a.offsetX+=m,a.offsetY+=y),s.isLocked||(s.offsetX-=m,s.offsetY-=y)}}},Jc=function(t,e){if(0!==e.gravity)for(var r=0;r<t.graphSet.length;r++){var n=t.graphSet[r],i=n.length;if(0===r)var a=t.clientHeight/2,o=t.clientWidth/2;else{var s=t.layoutNodes[t.idToIndex[n[0]]],l=t.layoutNodes[t.idToIndex[s.parentId]];a=l.positionX,o=l.positionY}for(var c=0;c<i;c++){var h=t.layoutNodes[t.idToIndex[n[c]]];if(!h.isLocked){var u=a-h.positionX,d=o-h.positionY,p=Math.sqrt(u*u+d*d);if(p>1){var f=e.gravity*u/p,g=e.gravity*d/p;h.offsetX+=f,h.offsetY+=g}}}}},th=function(t,e){var r=[],n=0,i=-1;for(r.push.apply(r,t.graphSet[0]),i+=t.graphSet[0].length;n<=i;){var a=r[n++],o=t.idToIndex[a],s=t.layoutNodes[o],l=s.children;if(0<l.length&&!s.isLocked){for(var c=s.offsetX,h=s.offsetY,u=0;u<l.length;u++){var d=t.layoutNodes[t.idToIndex[l[u]]];d.offsetX+=c,d.offsetY+=h,r[++i]=l[u]}s.offsetX=0,s.offsetY=0}}},eh=function(t,e){for(var r=0;r<t.nodeSize;r++){0<(i=t.layoutNodes[r]).children.length&&(i.maxX=void 0,i.minX=void 0,i.maxY=void 0,i.minY=void 0)}for(r=0;r<t.nodeSize;r++){if(!(0<(i=t.layoutNodes[r]).children.length||i.isLocked)){var n=rh(i.offsetX,i.offsetY,t.temperature);i.positionX+=n.x,i.positionY+=n.y,i.offsetX=0,i.offsetY=0,i.minX=i.positionX-i.width,i.maxX=i.positionX+i.width,i.minY=i.positionY-i.height,i.maxY=i.positionY+i.height,nh(i,t)}}for(r=0;r<t.nodeSize;r++){var i;0<(i=t.layoutNodes[r]).children.length&&!i.isLocked&&(i.positionX=(i.maxX+i.minX)/2,i.positionY=(i.maxY+i.minY)/2,i.width=i.maxX-i.minX,i.height=i.maxY-i.minY)}},rh=function(t,e,r){var n=Math.sqrt(t*t+e*e);if(n>r)var i={x:r*t/n,y:r*e/n};else i={x:t,y:e};return i},nh=function(t,e){var r=t.parentId;if(null!=r){var n=e.layoutNodes[e.idToIndex[r]],i=!1;return(null==n.maxX||t.maxX+n.padRight>n.maxX)&&(n.maxX=t.maxX+n.padRight,i=!0),(null==n.minX||t.minX-n.padLeft<n.minX)&&(n.minX=t.minX-n.padLeft,i=!0),(null==n.maxY||t.maxY+n.padBottom>n.maxY)&&(n.maxY=t.maxY+n.padBottom,i=!0),(null==n.minY||t.minY-n.padTop<n.minY)&&(n.minY=t.minY-n.padTop,i=!0),i?nh(n,e):void 0}},ih=function(t,e){for(var r=t.layoutNodes,n=[],i=0;i<r.length;i++){var a=r[i],o=a.cmptId;(n[o]=n[o]||[]).push(a)}var s=0;for(i=0;i<n.length;i++){if(g=n[i]){g.x1=1/0,g.x2=-1/0,g.y1=1/0,g.y2=-1/0;for(var l=0;l<g.length;l++){var c=g[l];g.x1=Math.min(g.x1,c.positionX-c.width/2),g.x2=Math.max(g.x2,c.positionX+c.width/2),g.y1=Math.min(g.y1,c.positionY-c.height/2),g.y2=Math.max(g.y2,c.positionY+c.height/2)}g.w=g.x2-g.x1,g.h=g.y2-g.y1,s+=g.w*g.h}}n.sort(function(t,e){return e.w*e.h-t.w*t.h});var h=0,u=0,d=0,p=0,f=Math.sqrt(s)*t.clientWidth/t.clientHeight;for(i=0;i<n.length;i++){var g;if(g=n[i]){for(l=0;l<g.length;l++){(c=g[l]).isLocked||(c.positionX+=h-g.x1,c.positionY+=u-g.y1)}h+=g.w+e.componentSpacing,d+=g.w+e.componentSpacing,p=Math.max(p,g.h),d>f&&(u+=p+e.componentSpacing,h=0,d=0,p=0)}}},ah={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(t){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function oh(t){this.options=bt({},ah,t)}oh.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=rr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(0===a.h||0===a.w)n.nodes().layoutPositions(this,e,function(t){return{x:a.x1,y:a.y1}});else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),c=Math.round(a.w/a.h*s),h=function(t){if(null==t)return Math.min(l,c);Math.min(l,c)==l?l=t:c=t},u=function(t){if(null==t)return Math.max(l,c);Math.max(l,c)==l?l=t:c=t},d=e.rows,p=null!=e.cols?e.cols:e.columns;if(null!=d&&null!=p)l=d,c=p;else if(null!=d&&null==p)l=d,c=Math.ceil(o/l);else if(null==d&&null!=p)c=p,l=Math.ceil(o/c);else if(c*l>o){var f=h(),g=u();(f-1)*g>=o?h(f-1):(g-1)*f>=o&&u(g-1)}else for(;c*l<o;){var m=h(),y=u();(y+1)*m>=o?u(y+1):h(m+1)}var v=a.w/c,b=a.h/l;if(e.condense&&(v=0,b=0),e.avoidOverlap)for(var x=0;x<i.length;x++){var T=i[x],w=T._private.position;null!=w.x&&null!=w.y||(w.x=0,w.y=0);var k=T.layoutDimensions(e),C=e.avoidOverlapPadding,E=k.w+C,S=k.h+C;v=Math.max(v,E),b=Math.max(b,S)}for(var _={},A=function(t,e){return!!_["c-"+t+"-"+e]},R=function(t,e){_["c-"+t+"-"+e]=!0},L=0,I=0,D=function(){++I>=c&&(I=0,L++)},N={},M=0;M<i.length;M++){var O=i[M],$=e.position(O);if($&&(void 0!==$.row||void 0!==$.col)){var P={row:$.row,col:$.col};if(void 0===P.col)for(P.col=0;A(P.row,P.col);)P.col++;else if(void 0===P.row)for(P.row=0;A(P.row,P.col);)P.row++;N[O.id()]=P,R(P.row,P.col)}}i.layoutPositions(this,e,function(t,e){var r,n;if(t.locked()||t.isParent())return!1;var i=N[t.id()];if(i)r=i.col*v+v/2+a.x1,n=i.row*b+b/2+a.y1;else{for(;A(L,I);)D();r=I*v+v/2+a.x1,n=L*b+b/2+a.y1,R(L,I),D()}return{x:r,y:n}})}return this};var sh={ready:function(){},stop:function(){}};function lh(t){this.options=bt({},sh,t)}lh.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this},lh.prototype.stop=function(){return this};var ch={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function hh(t){this.options=bt({},ch,t)}hh.prototype.run=function(){var t=this.options,e=t.eles.nodes(),r=H(t.positions);return e.layoutPositions(this,t,function(e,n){var i=function(e){if(null==t.positions)return function(t){return{x:t.x,y:t.y}}(e.position());if(r)return t.positions(e);var n=t.positions[e._private.data.id];return n??null}(e);return!e.locked()&&null!=i&&i}),this};var uh={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(t,e){return!0},ready:void 0,stop:void 0,transform:function(t,e){return e}};function dh(t){this.options=bt({},uh,t)}dh.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=rr(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()});return r.nodes().layoutPositions(this,t,function(t,e){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}}),this};var ph=[{name:"breadthfirst",impl:Dc},{name:"circle",impl:Mc},{name:"concentric",impl:Pc},{name:"cose",impl:Fc},{name:"grid",impl:oh},{name:"null",impl:lh},{name:"preset",impl:hh},{name:"random",impl:dh}];function fh(t){this.options=t,this.notifications=0}var gh=function(){},mh=function(){throw new Error("A headless instance can not render images")};fh.prototype={recalculateRenderedStyle:gh,notify:function(){this.notifications++},init:gh,isHeadless:function(){return!0},png:mh,jpg:mh};var yh={arrowShapeWidth:.3,registerArrowShapes:function(){var t=this.arrowShapes={},e=this,r=function(t,e,r,n,i,a,o){var s=i.x-r/2-o,l=i.x+r/2+o,c=i.y-r/2-o,h=i.y+r/2+o;return s<=t&&t<=l&&c<=e&&e<=h},n=function(t,e,r,n,i){var a=t*Math.cos(n)-e*Math.sin(n),o=(t*Math.sin(n)+e*Math.cos(n))*r;return{x:a*r+i.x,y:o+i.y}},i=function(t,e,r,i){for(var a=[],o=0;o<t.length;o+=2){var s=t[o],l=t[o+1];a.push(n(s,l,e,r,i))}return a},a=function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(n.x,n.y)}return e},o=function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").pfValue*2},s=function(n,s){V(s)&&(s=t[s]),t[n]=bt({name:n,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(t,e,r,n,o,s){var l=a(i(this.points,r+2*s,n,o));return br(t,e,l)},roughCollide:r,draw:function(t,r,n,a){var o=i(this.points,r,n,a);e.arrowShapeImpl("polygon")(t,o)},spacing:function(t){return 0},gap:o},s)};s("none",{collide:re,roughCollide:re,draw:ie,spacing:ne,gap:ne}),s("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),s("arrow","triangle"),s("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:function(t,r,a,o,s){var l=i(this.points,r,a,o),c=this.controlPoint,h=n(c[0],c[1],r,a,o);e.arrowShapeImpl(this.name)(t,l,h)},gap:function(t){return.8*o(t)}}),s("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(t,e,r,n,o,s,l){var c=a(i(this.points,r+2*l,n,o)),h=a(i(this.pointsTee,r+2*l,n,o));return br(t,e,c)||br(t,e,h)},draw:function(t,r,n,a,o){var s=i(this.points,r,n,a),l=i(this.pointsTee,r,n,a);e.arrowShapeImpl(this.name)(t,s,l)}}),s("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(t,e,r,n,o,s,l){var c=o,h=Math.pow(c.x-t,2)+Math.pow(c.y-e,2)<=Math.pow((r+2*l)*this.radius,2),u=a(i(this.points,r+2*l,n,o));return br(t,e,u)||h},draw:function(t,r,n,a,o){var s=i(this.pointsTr,r,n,a);e.arrowShapeImpl(this.name)(t,s,a.x,a.y,this.radius*r)},spacing:function(t){return e.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius}}),s("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(t,e){var r=this.baseCrossLinePts.slice(),n=e/t;return r[3]=r[3]-n,r[5]=r[5]-n,r},collide:function(t,e,r,n,o,s,l){var c=a(i(this.points,r+2*l,n,o)),h=a(i(this.crossLinePts(r,s),r+2*l,n,o));return br(t,e,c)||br(t,e,h)},draw:function(t,r,n,a,o){var s=i(this.points,r,n,a),l=i(this.crossLinePts(r,o),r,n,a);e.arrowShapeImpl(this.name)(t,s,l)}}),s("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(t){return.525*o(t)}}),s("circle",{radius:.15,collide:function(t,e,r,n,i,a,o){var s=i;return Math.pow(s.x-t,2)+Math.pow(s.y-e,2)<=Math.pow((r+2*o)*this.radius,2)},draw:function(t,r,n,i,a){e.arrowShapeImpl(this.name)(t,i.x,i.y,this.radius*r)},spacing:function(t){return e.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.radius}}),s("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(t){return 1},gap:function(t){return 1}}),s("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(t){return t.pstyle("width").pfValue*t.pstyle("arrow-scale").value}}),s("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(t){return.95*t.pstyle("width").pfValue*t.pstyle("arrow-scale").value}})}},vh={projectIntoViewport:function(t,e){var r=this.cy,n=this.findContainerClientCoords(),i=n[0],a=n[1],o=n[4],s=r.pan(),l=r.zoom();return[((t-i)/o-s.x)/l,((e-a)/o-s.y)/l]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),n=function(t){return parseFloat(r.getPropertyValue(t))},i=n("padding-left"),a=n("padding-right"),o=n("padding-top"),s=n("padding-bottom"),l=n("border-left-width"),c=n("border-right-width"),h=n("border-top-width"),u=(n("border-bottom-width"),t.clientWidth),d=t.clientHeight,p=i+a,f=o+s,g=l+c,m=e.width/(u+g),y=u-p,v=d-f,b=e.left+i+l,x=e.top+o+h;return this.containerBB=[b,x,y,v,m]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]},findNearestElements:function(t,e,r,n){var i,a,o=this,s=this,l=s.getCachedZSortedEles(),c=[],h=s.cy.zoom(),u=s.cy.hasCompoundNodes(),d=(n?24:8)/h,p=(n?8:2)/h,f=(n?8:2)/h,g=1/0;function m(t,e){if(t.isNode()){if(a)return;a=t,c.push(t)}if(t.isEdge()&&(null==e||e<g))if(i){if(i.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value&&i.pstyle("z-compound-depth").value===t.pstyle("z-compound-depth").value)for(var r=0;r<c.length;r++)if(c[r].isEdge()){c[r]=t,i=t,g=null!=e?e:g;break}}else c.push(t),i=t,g=null!=e?e:g}function y(r){var n=r.outerWidth()+2*p,i=r.outerHeight()+2*p,a=n/2,l=i/2,c=r.position(),h="auto"===r.pstyle("corner-radius").value?"auto":r.pstyle("corner-radius").pfValue,u=r._private.rscratch;if(c.x-a<=t&&t<=c.x+a&&c.y-l<=e&&e<=c.y+l&&s.nodeShapes[o.getNodeShape(r)].checkPoint(t,e,0,n,i,c.x,c.y,h,u))return m(r,0),!0}function v(r){var n,i=r._private,a=i.rscratch,l=r.pstyle("width").pfValue,h=r.pstyle("arrow-scale").value,p=l/2+d,f=p*p,g=2*p,v=i.source,b=i.target;if("segments"===a.edgeType||"straight"===a.edgeType||"haystack"===a.edgeType){for(var x=a.allpts,T=0;T+3<x.length;T+=2)if(gr(t,e,x[T],x[T+1],x[T+2],x[T+3],g)&&f>(n=vr(t,e,x[T],x[T+1],x[T+2],x[T+3])))return m(r,n),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(x=a.allpts,T=0;T+5<a.allpts.length;T+=4)if(mr(t,e,x[T],x[T+1],x[T+2],x[T+3],x[T+4],x[T+5],g)&&f>(n=yr(t,e,x[T],x[T+1],x[T+2],x[T+3],x[T+4],x[T+5])))return m(r,n),!0;v=v||i.source,b=b||i.target;var w=o.getArrowWidth(l,h),k=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(T=0;T<k.length;T++){var C=k[T],E=s.arrowShapes[r.pstyle(C.name+"-arrow-shape").value],S=r.pstyle("width").pfValue;if(E.roughCollide(t,e,w,C.angle,{x:C.x,y:C.y},S,d)&&E.collide(t,e,w,C.angle,{x:C.x,y:C.y},S,d))return m(r),!0}u&&c.length>0&&(y(v),y(b))}function b(t,e,r){return ge(t,e,r)}function x(r,n){var i,a=r._private,o=f;i=n?n+"-":"",r.boundingBox();var s=a.labelBounds[n||"main"],l=r.pstyle(i+"label").value;if("yes"===r.pstyle("text-events").strValue&&l){var c=b(a.rscratch,"labelX",n),h=b(a.rscratch,"labelY",n),u=b(a.rscratch,"labelAngle",n),d=r.pstyle(i+"text-margin-x").pfValue,p=r.pstyle(i+"text-margin-y").pfValue,g=s.x1-o-d,y=s.x2+o-d,v=s.y1-o-p,x=s.y2+o-p;if(u){var T=Math.cos(u),w=Math.sin(u),k=function(t,e){return{x:(t-=c)*T-(e-=h)*w+c,y:t*w+e*T+h}},C=k(g,v),E=k(g,x),S=k(y,v),_=k(y,x),A=[C.x+d,C.y+p,S.x+d,S.y+p,_.x+d,_.y+p,E.x+d,E.y+p];if(br(t,e,A))return m(r),!0}else if(cr(s,t,e))return m(r),!0}}r&&(l=l.interactive);for(var T=l.length-1;T>=0;T--){var w=l[T];w.isNode()?y(w)||x(w):v(w)||x(w)||x(w,"source")||x(w,"target")}return c},getAllInBox:function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=2/this.cy.zoom(),o=[],s=Math.min(t,r),c=Math.max(t,r),h=Math.min(e,n),u=Math.max(e,n),d=rr({x1:t=s,y1:e=h,x2:r=c,y2:n=u}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],f=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function g(t,e,r){return ge(t,e,r)}function m(t,e){var r=t._private,n=a;t.boundingBox();var i=r.labelBounds.main;if(!i)return null;var o=g(r.rscratch,"labelX",e),s=g(r.rscratch,"labelY",e),l=g(r.rscratch,"labelAngle",e),c=t.pstyle("text-margin-x").pfValue,h=t.pstyle("text-margin-y").pfValue,u=i.x1-n-c,d=i.x2+n-c,p=i.y1-n-h,f=i.y2+n-h;if(l){var m=Math.cos(l),y=Math.sin(l),v=function(t,e){return{x:(t-=o)*m-(e-=s)*y+o,y:t*y+e*m+s}};return[v(u,p),v(d,p),v(d,f),v(u,f)]}return[{x:u,y:p},{x:d,y:p},{x:d,y:f},{x:u,y:f}]}function y(t,e,r,n){function i(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}return i(t,r,n)!==i(e,r,n)&&i(t,e,r)!==i(t,e,n)}for(var v=0;v<i.length;v++){var b=i[v];if(b.isNode()){var x=b,T="yes"===x.pstyle("text-events").strValue,w=x.pstyle("box-selection").strValue,k="yes"===x.pstyle("box-select-labels").strValue;if("none"===w)continue;var C=("overlap"===w||k)&&T,E=x.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:C});if("contain"===w){var S=!1;if(k&&T){var _=m(x);_&&$r(_,p)&&(o.push(x),S=!0)}!S&&ur(d,E)&&o.push(x)}else if("overlap"===w&&lr(d,E)){var A=x.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1});if($r([{x:A.x1,y:A.y1},{x:A.x2,y:A.y1},{x:A.x2,y:A.y2},{x:A.x1,y:A.y2}],p))o.push(x);else{var R=m(x);R&&$r(R,p)&&o.push(x)}}}else{var L=b,I=L._private,D=I.rscratch,N=L.pstyle("box-selection").strValue;if("none"===N)continue;if("contain"===N){if(null!=D.startX&&null!=D.startY&&!cr(d,D.startX,D.startY))continue;if(null!=D.endX&&null!=D.endY&&!cr(d,D.endX,D.endY))continue;if("bezier"===D.edgeType||"multibezier"===D.edgeType||"self"===D.edgeType||"compound"===D.edgeType||"segments"===D.edgeType||"haystack"===D.edgeType){for(var M=I.rstyle.bezierPts||I.rstyle.linePts||I.rstyle.haystackPts,O=!0,$=0;$<M.length;$++)if(!hr(d,M[$])){O=!1;break}O&&o.push(L)}else"straight"===D.edgeType&&o.push(L)}else if("overlap"===N){var P=!1;if(null!=D.startX&&null!=D.startY&&null!=D.endX&&null!=D.endY&&(cr(d,D.startX,D.startY)||cr(d,D.endX,D.endY)))o.push(L),P=!0;else if(!P&&"haystack"===D.edgeType)for(var B=I.rstyle.haystackPts,F=0;F<B.length;F++)if(hr(d,B[F])){o.push(L),P=!0;break}if(!P){var z=I.rstyle.bezierPts||I.rstyle.linePts||I.rstyle.haystackPts;if((!z||z.length<2)&&"straight"===D.edgeType&&null!=D.startX&&null!=D.startY&&null!=D.endX&&null!=D.endY&&(z=[{x:D.startX,y:D.startY},{x:D.endX,y:D.endY}]),!z||z.length<2)continue;for(var K=0;K<z.length-1;K++){for(var j=z[K],q=z[K+1],W=0;W<f.length;W++){var U=l(f[W],2);if(y(j,q,U[0],U[1])){o.push(L),P=!0;break}}if(P)break}}}}}return o}},bh={calculateArrowAngles:function(t){var e,r,n,i,a,o,s=t._private.rscratch,l="haystack"===s.edgeType,c="bezier"===s.edgeType,h="multibezier"===s.edgeType,u="segments"===s.edgeType,d="compound"===s.edgeType,p="self"===s.edgeType;if(l?(n=s.haystackPts[0],i=s.haystackPts[1],a=s.haystackPts[2],o=s.haystackPts[3]):(n=s.arrowStartX,i=s.arrowStartY,a=s.arrowEndX,o=s.arrowEndY),g=s.midX,m=s.midY,u)e=n-s.segpts[0],r=i-s.segpts[1];else if(h||d||p||c){var f=s.allpts;e=n-Je(f[0],f[2],f[4],.1),r=i-Je(f[1],f[3],f[5],.1)}else e=n-g,r=i-m;s.srcArrowAngle=Ye(e,r);var g=s.midX,m=s.midY;if(l&&(g=(n+a)/2,m=(i+o)/2),e=a-n,r=o-i,u)if((f=s.allpts).length/2%2==0){var y=(E=f.length/2)-2;e=f[E]-f[y],r=f[E+1]-f[y+1]}else if(s.isRound)e=s.midVector[1],r=-s.midVector[0];else{y=(E=f.length/2-1)-2;e=f[E]-f[y],r=f[E+1]-f[y+1]}else if(h||d||p){var v,b,x,T,f=s.allpts;if(s.ctrlpts.length/2%2==0){var w=(k=(C=f.length/2-1)+2)+2;v=Je(f[C],f[k],f[w],0),b=Je(f[C+1],f[k+1],f[w+1],0),x=Je(f[C],f[k],f[w],1e-4),T=Je(f[C+1],f[k+1],f[w+1],1e-4)}else{var k,C;w=(k=f.length/2-1)+2;v=Je(f[C=k-2],f[k],f[w],.4999),b=Je(f[C+1],f[k+1],f[w+1],.4999),x=Je(f[C],f[k],f[w],.5),T=Je(f[C+1],f[k+1],f[w+1],.5)}e=x-v,r=T-b}if(s.midtgtArrowAngle=Ye(e,r),s.midDispX=e,s.midDispY=r,e*=-1,r*=-1,u)if((f=s.allpts).length/2%2==0);else if(!s.isRound){var E,S=(E=f.length/2-1)+2;e=-(f[S]-f[E]),r=-(f[S+1]-f[E+1])}if(s.midsrcArrowAngle=Ye(e,r),u)e=a-s.segpts[s.segpts.length-2],r=o-s.segpts[s.segpts.length-1];else if(h||d||p||c){var _=(f=s.allpts).length;e=a-Je(f[_-6],f[_-4],f[_-2],.9),r=o-Je(f[_-5],f[_-3],f[_-1],.9)}else e=a-g,r=o-m;s.tgtArrowAngle=Ye(e,r)}};bh.getArrowWidth=bh.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+", "+e];return n||(n=Math.max(Math.pow(13.37*t,.9),29)*e,r[t+", "+e]=n,n)};var xh,Th,wh,kh,Ch,Eh,Sh,_h,Ah,Rh,Lh,Ih,Dh,Nh,Mh,Oh,$h,Ph={},Bh={},Fh=function(t,e,r){r.x=e.x-t.x,r.y=e.y-t.y,r.len=Math.sqrt(r.x*r.x+r.y*r.y),r.nx=r.x/r.len,r.ny=r.y/r.len,r.ang=Math.atan2(r.ny,r.nx)},zh=function(t,e,r,n,i){var a,o;if(t!==$h?Fh(e,t,Ph):((o=Ph).x=-1*(a=Bh).x,o.y=-1*a.y,o.nx=-1*a.nx,o.ny=-1*a.ny,o.ang=a.ang>0?-(Math.PI-a.ang):Math.PI+a.ang),Fh(e,r,Bh),wh=Ph.nx*Bh.ny-Ph.ny*Bh.nx,kh=Ph.nx*Bh.nx-Ph.ny*-Bh.ny,Sh=Math.asin(Math.max(-1,Math.min(1,wh))),Math.abs(Sh)<1e-6)return xh=e.x,Th=e.y,void(Ah=Lh=0);Ch=1,Eh=!1,kh<0?Sh<0?Sh=Math.PI+Sh:(Sh=Math.PI-Sh,Ch=-1,Eh=!0):Sh>0&&(Ch=-1,Eh=!0),Lh=void 0!==e.radius?e.radius:n,_h=Sh/2,Ih=Math.min(Ph.len/2,Bh.len/2),i?(Rh=Math.abs(Math.cos(_h)*Lh/Math.sin(_h)))>Ih?(Rh=Ih,Ah=Math.abs(Rh*Math.sin(_h)/Math.cos(_h))):Ah=Lh:(Rh=Math.min(Ih,Lh),Ah=Math.abs(Rh*Math.sin(_h)/Math.cos(_h))),Mh=e.x+Bh.nx*Rh,Oh=e.y+Bh.ny*Rh,xh=Mh-Bh.ny*Ah*Ch,Th=Oh+Bh.nx*Ah*Ch,Dh=e.x+Ph.nx*Rh,Nh=e.y+Ph.ny*Rh,$h=e};function Kh(t,e){0===e.radius?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function jh(t,e,r,n){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===n||0===e.radius?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(zh(t,e,r,n,i),{cx:xh,cy:Th,radius:Ah,startX:Dh,startY:Nh,stopX:Mh,stopY:Oh,startAngle:Ph.ang+Math.PI/2*Ch,endAngle:Bh.ang-Math.PI/2*Ch,counterClockwise:Eh})}var qh=.01,Wh=Math.sqrt(.02),Uh={};function Gh(t){var e=[];if(null!=t){for(var r=0;r<t.length;r+=2){var n=t[r],i=t[r+1];e.push({x:n,y:i})}return e}}Uh.findMidptPtsEtc=function(t,e){var r,n=e.posPts,i=e.intersectionPts,a=e.vectorNormInverse,o=t.pstyle("source-endpoint"),s=t.pstyle("target-endpoint"),c=null!=o.units&&null!=s.units;switch(t.pstyle("edge-distances").value){case"node-position":r=n;break;case"intersection":r=i;break;case"endpoints":if(c){var h=l(this.manualEndptToPx(t.source()[0],o),2),u=h[0],d=h[1],p=l(this.manualEndptToPx(t.target()[0],s),2),f=p[0],g=p[1],m={x1:u,y1:d,x2:f,y2:g};a=function(t,e,r,n){var i=n-e,a=r-t,o=Math.sqrt(a*a+i*i);return{x:-i/o,y:a/o}}(u,d,f,g),r=m}else se("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),r=i}return{midptPts:r,vectorNormInverse:a}},Uh.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,i=n.rscratch;if(!i.haystack){var a=2*Math.random()*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=2*Math.random()*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)}}var o=n.source,s=n.target,l=o.position(),c=s.position(),h=o.width(),u=s.width(),d=o.height(),p=s.height(),f=r.pstyle("haystack-radius").value/2;i.haystackPts=i.allpts=[i.source.x*h*f+l.x,i.source.y*d*f+l.y,i.target.x*u*f+c.x,i.target.y*p*f+c.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType="haystack",i.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},Uh.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),i=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),o=t.pstyle("radius-type"),s=Math.min(n.pfValue.length,i.pfValue.length),l=a.pfValue[a.pfValue.length-1],c=o.pfValue[o.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var h=0;h<s;h++){var u=n.pfValue[h],d=i.pfValue[h],p=1-u,f=u,g=this.findMidptPtsEtc(t,e),m=g.midptPts,y=g.vectorNormInverse,v={x:m.x1*p+m.x2*f,y:m.y1*p+m.y2*f};r.segpts.push(v.x+y.x*d,v.y+y.y*d),r.radii.push(void 0!==a.pfValue[h]?a.pfValue[h]:l),r.isArcRadius.push("arc-radius"===(void 0!==o.pfValue[h]?o.pfValue[h]:c))}},Uh.findLoopPoints=function(t,e,r,n){var i=t._private.rscratch,a=e.dirCounts,o=e.srcPos,s=t.pstyle("control-point-distances"),l=s?s.pfValue[0]:void 0,c=t.pstyle("loop-direction").pfValue,h=t.pstyle("loop-sweep").pfValue,u=t.pstyle("control-point-step-size").pfValue;i.edgeType="self";var d=r,p=u;n&&(d=0,p=l);var f=c-Math.PI/2,g=f-h/2,m=f+h/2,y=String(c+"_"+h);d=void 0===a[y]?a[y]=0:++a[y],i.ctrlpts=[o.x+1.4*Math.cos(g)*p*(d/3+1),o.y+1.4*Math.sin(g)*p*(d/3+1),o.x+1.4*Math.cos(m)*p*(d/3+1),o.y+1.4*Math.sin(m)*p*(d/3+1)]},Uh.findCompoundLoopPoints=function(t,e,r,n){var i=t._private.rscratch;i.edgeType="compound";var a=e.srcPos,o=e.tgtPos,s=e.srcW,l=e.srcH,c=e.tgtW,h=e.tgtH,u=t.pstyle("control-point-step-size").pfValue,d=t.pstyle("control-point-distances"),p=d?d.pfValue[0]:void 0,f=r,g=u;n&&(f=0,g=p);var m={x:a.x-s/2,y:a.y-l/2},y={x:o.x-c/2,y:o.y-h/2},v={x:Math.min(m.x,y.x),y:Math.min(m.y,y.y)},b=Math.max(.5,Math.log(s*qh)),x=Math.max(.5,Math.log(c*qh));i.ctrlpts=[v.x,v.y-(1+Math.pow(50,1.12)/100)*g*(f/3+1)*b,v.x-(1+Math.pow(50,1.12)/100)*g*(f/3+1)*x,v.y]},Uh.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"},Uh.findBezierPoints=function(t,e,r,n,i){var a=t._private.rscratch,o=t.pstyle("control-point-step-size").pfValue,s=t.pstyle("control-point-distances"),l=t.pstyle("control-point-weights"),c=s&&l?Math.min(s.value.length,l.value.length):1,h=s?s.pfValue[0]:void 0,u=l.value[0],d=n;a.edgeType=d?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<c;p++){var f=(.5-e.eles.length/2+r)*o*(i?-1:1),g=void 0,m=He(f);d&&(h=s?s.pfValue[p]:o,u=l.value[p]);var y=void 0!==(g=n?h:void 0!==h?m*h:void 0)?g:f,v=1-u,b=u,x=this.findMidptPtsEtc(t,e),T=x.midptPts,w=x.vectorNormInverse,k={x:T.x1*v+T.x2*b,y:T.y1*v+T.y2*b};a.ctrlpts.push(k.x+w.x*y,k.y+w.y*y)}},Uh.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var n="vertical",i="horizontal",a="leftward",o="rightward",s="downward",l="upward",c=e.posPts,h=e.srcW,u=e.srcH,d=e.tgtW,p=e.tgtH,f="node-position"!==t.pstyle("edge-distances").value,g=t.pstyle("taxi-direction").value,m=g,y=t.pstyle("taxi-turn"),v="%"===y.units,b=y.pfValue,x=b<0,T=t.pstyle("taxi-turn-min-distance").pfValue,w=f?(h+d)/2:0,k=f?(u+p)/2:0,C=c.x2-c.x1,E=c.y2-c.y1,S=function(t,e){return t>0?Math.max(t-e,0):Math.min(t+e,0)},_=S(C,w),A=S(E,k),R=!1;"auto"===m?g=Math.abs(_)>Math.abs(A)?i:n:m===l||m===s?(g=n,R=!0):m!==a&&m!==o||(g=i,R=!0);var L,I=g===n,D=I?A:_,N=I?E:C,M=He(N),O=!1;(R&&(v||x)||!(m===s&&N<0||m===l&&N>0||m===a&&N>0||m===o&&N<0)||(D=(M*=-1)*Math.abs(D),O=!0),v)?L=(b<0?1+b:b)*D:L=(b<0?D:0)+b*M;var $=function(t){return Math.abs(t)<T||Math.abs(t)>=Math.abs(D)},P=$(L),B=$(Math.abs(D)-Math.abs(L));if((P||B)&&!O)if(I){var F=Math.abs(N)<=u/2,z=Math.abs(C)<=d/2;if(F){var K=(c.x1+c.x2)/2,j=c.y1,q=c.y2;r.segpts=[K,j,K,q]}else if(z){var W=(c.y1+c.y2)/2,U=c.x1,G=c.x2;r.segpts=[U,W,G,W]}else r.segpts=[c.x1,c.y2]}else{var Y=Math.abs(N)<=h/2,V=Math.abs(E)<=p/2;if(Y){var H=(c.y1+c.y2)/2,X=c.x1,Z=c.x2;r.segpts=[X,H,Z,H]}else if(V){var Q=(c.x1+c.x2)/2,J=c.y1,tt=c.y2;r.segpts=[Q,J,Q,tt]}else r.segpts=[c.x2,c.y1]}else if(I){var et=c.y1+L+(f?u/2*M:0),rt=c.x1,nt=c.x2;r.segpts=[rt,et,nt,et]}else{var it=c.x1+L+(f?h/2*M:0),at=c.y1,ot=c.y2;r.segpts=[it,at,it,ot]}if(r.isRound){var st=t.pstyle("taxi-radius").value,lt="arc-radius"===t.pstyle("radius-type").value[0];r.radii=new Array(r.segpts.length/2).fill(st),r.isArcRadius=new Array(r.segpts.length/2).fill(lt)}},Uh.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if("bezier"===r.edgeType){var n=e.srcPos,i=e.tgtPos,a=e.srcW,o=e.srcH,s=e.tgtW,l=e.tgtH,c=e.srcShape,h=e.tgtShape,u=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,f=e.tgtRs,g=!Q(r.startX)||!Q(r.startY),m=!Q(r.arrowStartX)||!Q(r.arrowStartY),y=!Q(r.endX)||!Q(r.endY),v=!Q(r.arrowEndX)||!Q(r.arrowEndY),b=3*(this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth),x=Xe({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),T=x<b,w=Xe({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),k=w<b,C=!1;if(g||m||T){C=!0;var E={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},S=Math.sqrt(E.x*E.x+E.y*E.y),_={x:E.x/S,y:E.y/S},A=Math.max(a,o),R={x:r.ctrlpts[0]+2*_.x*A,y:r.ctrlpts[1]+2*_.y*A},L=c.intersectLine(n.x,n.y,a,o,R.x,R.y,0,u,p);T?(r.ctrlpts[0]=r.ctrlpts[0]+_.x*(b-x),r.ctrlpts[1]=r.ctrlpts[1]+_.y*(b-x)):(r.ctrlpts[0]=L[0]+_.x*b,r.ctrlpts[1]=L[1]+_.y*b)}if(y||v||k){C=!0;var I={x:r.ctrlpts[0]-i.x,y:r.ctrlpts[1]-i.y},D=Math.sqrt(I.x*I.x+I.y*I.y),N={x:I.x/D,y:I.y/D},M=Math.max(a,o),O={x:r.ctrlpts[0]+2*N.x*M,y:r.ctrlpts[1]+2*N.y*M},$=h.intersectLine(i.x,i.y,s,l,O.x,O.y,0,d,f);k?(r.ctrlpts[0]=r.ctrlpts[0]+N.x*(b-w),r.ctrlpts[1]=r.ctrlpts[1]+N.y*(b-w)):(r.ctrlpts[0]=$[0]+N.x*b,r.ctrlpts[1]=$[1]+N.y*b)}C&&this.findEndpoints(t)}},Uh.storeAllpts=function(t){var e=t._private.rscratch;if("multibezier"===e.edgeType||"bezier"===e.edgeType||"self"===e.edgeType||"compound"===e.edgeType){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);var n;e.allpts.push(e.endX,e.endY),e.ctrlpts.length/2%2==0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,e.midX=Je(e.allpts[n],e.allpts[n+2],e.allpts[n+4],.5),e.midY=Je(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],.5))}else if("straight"===e.edgeType)e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if("segments"===e.edgeType){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var i=2;i+3<e.allpts.length;i+=2){var a=e.radii[i/2-1],o=e.isArcRadius[i/2-1];e.roundCorners.push(jh({x:e.allpts[i-2],y:e.allpts[i-1]},{x:e.allpts[i],y:e.allpts[i+1],radius:a},{x:e.allpts[i+2],y:e.allpts[i+3]},a,o))}}if(e.segpts.length%4==0){var s=e.segpts.length/2,l=s-2;e.midX=(e.segpts[l]+e.segpts[s])/2,e.midY=(e.segpts[l+1]+e.segpts[s+1])/2}else{var c=e.segpts.length/2-1;if(e.isRound){var h={x:e.segpts[c],y:e.segpts[c+1]},u=e.roundCorners[c/2];if(0===u.radius){var d={x:e.segpts[c+2],y:e.segpts[c+3]};e.midX=h.x,e.midY=h.y,e.midVector=[h.y-d.y,d.x-h.x]}else{var p=[h.x-u.cx,h.y-u.cy],f=u.radius/Math.sqrt(Math.pow(p[0],2)+Math.pow(p[1],2));p=p.map(function(t){return t*f}),e.midX=u.cx+p[0],e.midY=u.cy+p[1],e.midVector=p}}else e.midX=e.segpts[c],e.midY=e.segpts[c+1]}}},Uh.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||Q(e.startX)&&Q(e.startY)&&Q(e.endX)&&Q(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,se("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Uh.findEdgeControlPoints=function(t){var e=this;if(t&&0!==t.length){for(var r=this,n=r.cy.hasCompoundNodes(),i=new ye,a=function(t,e){return[].concat(c(t),[e?1:0]).join("-")},o=[],s=[],l=0;l<t.length;l++){var h=t[l],u=h._private,d=h.pstyle("curve-style").value;if(!h.removed()&&h.takesUpSpace())if("haystack"!==d){var p="unbundled-bezier"===d||dt(d,"segments")||"straight"===d||"straight-triangle"===d||dt(d,"taxi"),f="unbundled-bezier"===d||"bezier"===d,g=u.source,m=u.target,y=[g.poolIndex(),m.poolIndex()].sort(),v=a(y,p),b=i.get(v);null==b&&(b={eles:[]},o.push({pairId:y,edgeIsUnbundled:p}),i.set(v,b)),b.eles.push(h),p&&(b.hasUnbundled=!0),f&&(b.hasBezier=!0)}else s.push(h)}for(var x=function(){var t,s=o[T],l=s.pairId,c=s.edgeIsUnbundled,h=a(l,c),u=i.get(h);if(!u.hasUnbundled){var d=u.eles[0].parallelEdges().filter(function(t){return t.isBundledBezier()});fe(u.eles),d.forEach(function(t){return u.eles.push(t)}),u.eles.sort(function(t,e){return t.poolIndex()-e.poolIndex()})}var p=u.eles[0],f=p.source(),g=p.target();if(f.poolIndex()>g.poolIndex()){var m=f;f=g,g=m}var y=u.srcPos=f.position(),v=u.tgtPos=g.position(),b=u.srcW=f.outerWidth(),x=u.srcH=f.outerHeight(),w=u.tgtW=g.outerWidth(),k=u.tgtH=g.outerHeight(),C=u.srcShape=r.nodeShapes[e.getNodeShape(f)],E=u.tgtShape=r.nodeShapes[e.getNodeShape(g)],S=u.srcCornerRadius="auto"===f.pstyle("corner-radius").value?"auto":f.pstyle("corner-radius").pfValue,_=u.tgtCornerRadius="auto"===g.pstyle("corner-radius").value?"auto":g.pstyle("corner-radius").pfValue,A=u.tgtRs=g._private.rscratch,R=u.srcRs=f._private.rscratch;u.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var L=0;L<u.eles.length;L++){var I=u.eles[L],D=I[0]._private.rscratch,N=I.pstyle("curve-style").value,M="unbundled-bezier"===N||dt(N,"segments")||dt(N,"taxi"),O=!f.same(I.source());if(!u.calculatedIntersection&&f!==g&&(u.hasBezier||u.hasUnbundled)){u.calculatedIntersection=!0;var $=C.intersectLine(y.x,y.y,b,x,v.x,v.y,0,S,R),P=u.srcIntn=$,B=E.intersectLine(v.x,v.y,w,k,y.x,y.y,0,_,A),F=u.tgtIntn=B,z=u.intersectionPts={x1:$[0],x2:B[0],y1:$[1],y2:B[1]},K=u.posPts={x1:y.x,x2:v.x,y1:y.y,y2:v.y},j=B[1]-$[1],q=B[0]-$[0],W=Math.sqrt(q*q+j*j);Q(W)&&W>=Wh||(W=Math.sqrt(Math.max(q*q,qh)+Math.max(j*j,qh)));var U=u.vector={x:q,y:j},G=u.vectorNorm={x:U.x/W,y:U.y/W},Y={x:-G.y,y:G.x};u.nodesOverlap=!Q(W)||E.checkPoint($[0],$[1],0,w,k,v.x,v.y,_,A)||C.checkPoint(B[0],B[1],0,b,x,y.x,y.y,S,R),u.vectorNormInverse=Y,t={nodesOverlap:u.nodesOverlap,dirCounts:u.dirCounts,calculatedIntersection:!0,hasBezier:u.hasBezier,hasUnbundled:u.hasUnbundled,eles:u.eles,srcPos:v,srcRs:A,tgtPos:y,tgtRs:R,srcW:w,srcH:k,tgtW:b,tgtH:x,srcIntn:F,tgtIntn:P,srcShape:E,tgtShape:C,posPts:{x1:K.x2,y1:K.y2,x2:K.x1,y2:K.y1},intersectionPts:{x1:z.x2,y1:z.y2,x2:z.x1,y2:z.y1},vector:{x:-U.x,y:-U.y},vectorNorm:{x:-G.x,y:-G.y},vectorNormInverse:{x:-Y.x,y:-Y.y}}}var V=O?t:u;D.nodesOverlap=V.nodesOverlap,D.srcIntn=V.srcIntn,D.tgtIntn=V.tgtIntn,D.isRound=N.startsWith("round"),n&&(f.isParent()||f.isChild()||g.isParent()||g.isChild())&&(f.parents().anySame(g)||g.parents().anySame(f)||f.same(g)&&f.isParent())?e.findCompoundLoopPoints(I,V,L,M):f===g?e.findLoopPoints(I,V,L,M):N.endsWith("segments")?e.findSegmentsPoints(I,V):N.endsWith("taxi")?e.findTaxiPoints(I,V):"straight"===N||!M&&u.eles.length%2==1&&L===Math.floor(u.eles.length/2)?e.findStraightEdgePoints(I):e.findBezierPoints(I,V,L,M,O),e.findEndpoints(I),e.tryToCorrectInvalidPoints(I,V),e.checkForInvalidEdgeWarning(I),e.storeAllpts(I),e.storeEdgeProjections(I),e.calculateArrowAngles(I),e.recalculateEdgeLabelProjections(I),e.calculateLabelAngles(I)}},T=0;T<o.length;T++)x();this.findHaystackPoints(s)}},Uh.getSegmentPoints=function(t){var e=t[0]._private.rscratch;if(this.recalculateRenderedStyle(t),"segments"===e.edgeType)return Gh(e.segpts)},Uh.getControlPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if("bezier"===r||"multibezier"===r||"self"===r||"compound"===r)return Gh(e.ctrlpts)},Uh.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var Yh={manualEndptToPx:function(t,e){var r=t.position(),n=t.outerWidth(),i=t.outerHeight(),a=t._private.rscratch;if(2===e.value.length){var o=[e.pfValue[0],e.pfValue[1]];return"%"===e.units[0]&&(o[0]=o[0]*n),"%"===e.units[1]&&(o[1]=o[1]*i),o[0]+=r.x,o[1]+=r.y,o}var s=e.pfValue[0];s=-Math.PI/2+s;var l=2*Math.max(n,i),c=[r.x+Math.cos(s)*l,r.y+Math.sin(s)*l];return this.nodeShapes[this.getNodeShape(t)].intersectLine(r.x,r.y,n,i,c[0],c[1],0,"auto"===t.pstyle("corner-radius").value?"auto":t.pstyle("corner-radius").pfValue,a)},findEndpoints:function(t){var e,r,n,i,a,o,s,l,c,h=this,u=t.source()[0],d=t.target()[0],p=u.position(),f=d.position(),g=t.pstyle("target-arrow-shape").value,m=t.pstyle("source-arrow-shape").value,y=t.pstyle("target-distance-from-node").pfValue,v=t.pstyle("source-distance-from-node").pfValue,b=u._private.rscratch,x=d._private.rscratch,T=t.pstyle("curve-style").value,w=t._private.rscratch,k=w.edgeType,C=dt(T,"taxi"),E="self"===k||"compound"===k,S="bezier"===k||"multibezier"===k||E,_="bezier"!==k,A="straight"===k||"segments"===k,R="segments"===k,L=S||_||A,I=E||C,D=t.pstyle("source-endpoint"),N=I?"outside-to-node":D.value,M="auto"===u.pstyle("corner-radius").value?"auto":u.pstyle("corner-radius").pfValue,O=t.pstyle("target-endpoint"),$=I?"outside-to-node":O.value,P="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue;w.srcManEndpt=D,w.tgtManEndpt=O;var B=null!==(e=2===(null==O||null===(r=O.pfValue)||void 0===r?void 0:r.length)?O.pfValue:null)&&void 0!==e?e:[0,0],F=null!==(n=2===(null==D||null===(i=D.pfValue)||void 0===i?void 0:i.length)?D.pfValue:null)&&void 0!==n?n:[0,0];if(S){var z=[w.ctrlpts[0],w.ctrlpts[1]];o=_?[w.ctrlpts[w.ctrlpts.length-2],w.ctrlpts[w.ctrlpts.length-1]]:z,s=z}else if(A){var K=R?w.segpts.slice(0,2):[f.x+B[0],f.y+B[1]];o=R?w.segpts.slice(w.segpts.length-2):[p.x+F[0],p.y+F[1]],s=K}if("inside-to-node"===$)a=[f.x,f.y];else if(O.units)a=this.manualEndptToPx(d,O);else if("outside-to-line"===$)a=w.tgtIntn;else if("outside-to-node"===$||"outside-to-node-or-label"===$?l=o:"outside-to-line"!==$&&"outside-to-line-or-label"!==$||(l=[p.x,p.y]),a=h.nodeShapes[this.getNodeShape(d)].intersectLine(f.x,f.y,d.outerWidth(),d.outerHeight(),l[0],l[1],0,P,x),"outside-to-node-or-label"===$||"outside-to-line-or-label"===$){var j=d._private.rscratch,q=j.labelWidth,W=j.labelHeight,U=j.labelX,G=j.labelY,Y=q/2,V=W/2,H=d.pstyle("text-valign").value;"top"===H?G-=V:"bottom"===H&&(G+=V);var X=d.pstyle("text-halign").value;"left"===X?U-=Y:"right"===X&&(U+=Y);var Z=Ar(l[0],l[1],[U-Y,G-V,U+Y,G-V,U+Y,G+V,U-Y,G+V],f.x,f.y);if(Z.length>0){var J=p,tt=Ze(J,Ge(a)),et=Ze(J,Ge(Z)),rt=tt;if(et<tt&&(a=Z,rt=et),Z.length>2)Ze(J,{x:Z[2],y:Z[3]})<rt&&(a=[Z[2],Z[3]])}}var nt=Rr(a,o,h.arrowShapes[g].spacing(t)+y),it=Rr(a,o,h.arrowShapes[g].gap(t)+y);if(w.endX=it[0],w.endY=it[1],w.arrowEndX=nt[0],w.arrowEndY=nt[1],"inside-to-node"===N)a=[p.x,p.y];else if(D.units)a=this.manualEndptToPx(u,D);else if("outside-to-line"===N)a=w.srcIntn;else if("outside-to-node"===N||"outside-to-node-or-label"===N?c=s:"outside-to-line"!==N&&"outside-to-line-or-label"!==N||(c=[f.x,f.y]),a=h.nodeShapes[this.getNodeShape(u)].intersectLine(p.x,p.y,u.outerWidth(),u.outerHeight(),c[0],c[1],0,M,b),"outside-to-node-or-label"===N||"outside-to-line-or-label"===N){var at=u._private.rscratch,ot=at.labelWidth,st=at.labelHeight,lt=at.labelX,ct=at.labelY,ht=ot/2,ut=st/2,pt=u.pstyle("text-valign").value;"top"===pt?ct-=ut:"bottom"===pt&&(ct+=ut);var ft=u.pstyle("text-halign").value;"left"===ft?lt-=ht:"right"===ft&&(lt+=ht);var gt=Ar(c[0],c[1],[lt-ht,ct-ut,lt+ht,ct-ut,lt+ht,ct+ut,lt-ht,ct+ut],p.x,p.y);if(gt.length>0){var mt=f,yt=Ze(mt,Ge(a)),vt=Ze(mt,Ge(gt)),bt=yt;if(vt<yt&&(a=[gt[0],gt[1]],bt=vt),gt.length>2)Ze(mt,{x:gt[2],y:gt[3]})<bt&&(a=[gt[2],gt[3]])}}var xt=Rr(a,s,h.arrowShapes[m].spacing(t)+v),Tt=Rr(a,s,h.arrowShapes[m].gap(t)+v);w.startX=Tt[0],w.startY=Tt[1],w.arrowStartX=xt[0],w.arrowStartY=xt[1],L&&(Q(w.startX)&&Q(w.startY)&&Q(w.endX)&&Q(w.endY)?w.badLine=!1:w.badLine=!0)},getSourceEndpoint:function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),"haystack"===e.edgeType?{x:e.haystackPts[0],y:e.haystackPts[1]}:{x:e.arrowStartX,y:e.arrowStartY}},getTargetEndpoint:function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),"haystack"===e.edgeType?{x:e.haystackPts[2],y:e.haystackPts[3]}:{x:e.arrowEndX,y:e.arrowEndY}}},Vh={};function Hh(t,e,r){for(var n=function(t,e,r,n){return Je(t,e,r,n)},i=e._private.rstyle.bezierPts,a=0;a<t.bezierProjPcts.length;a++){var o=t.bezierProjPcts[a];i.push({x:n(r[0],r[2],r[4],o),y:n(r[1],r[3],r[5],o)})}}Vh.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,"multibezier"===n||"bezier"===n||"self"===n||"compound"===n){e.rstyle.bezierPts=[];for(var i=0;i+5<r.allpts.length;i+=4)Hh(this,t,r.allpts.slice(i,i+6))}else if("segments"===n){var a=e.rstyle.linePts=[];for(i=0;i+1<r.allpts.length;i+=2)a.push({x:r.allpts[i],y:r.allpts[i+1]})}else if("haystack"===n){var o=r.haystackPts;e.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},Vh.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var Xh={recalculateNodeLabelProjection:function(t){var e=t.pstyle("label").strValue;if(!at(e)){var r,n,i=t._private,a=t.width(),o=t.height(),s=t.padding(),l=t.position(),c=t.pstyle("text-halign").strValue,h=t.pstyle("text-valign").strValue,u=i.rscratch,d=i.rstyle;switch(c){case"left":r=l.x-a/2-s;break;case"right":r=l.x+a/2+s;break;default:r=l.x}switch(h){case"top":n=l.y-o/2-s;break;case"bottom":n=l.y+o/2+s;break;default:n=l.y}u.labelX=r,u.labelY=n,d.labelX=r,d.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}}},Zh=function(t,e){var r=Math.atan(e/t);return 0===t&&r<0&&(r*=-1),r},Qh=function(t,e){var r=e.x-t.x,n=e.y-t.y;return Zh(r,n)};Xh.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,i=this,a={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(a.mid||a.source||a.target){e={x:n.midX,y:n.midY};var o=function(t,e,n){me(r.rscratch,t,e,n),me(r.rstyle,t,e,n)};o("labelX",null,e.x),o("labelY",null,e.y);var s=Zh(n.midDispX,n.midDispY);o("labelAutoAngle",null,s);var l=function(){if(l.cache)return l.cache;for(var t=[],e=0;e+5<n.allpts.length;e+=4){var a={x:n.allpts[e],y:n.allpts[e+1]},o={x:n.allpts[e+2],y:n.allpts[e+3]},s={x:n.allpts[e+4],y:n.allpts[e+5]};t.push({p0:a,p1:o,p2:s,startDist:0,length:0,segments:[]})}var c=r.rstyle.bezierPts,h=i.bezierProjPcts.length;function u(t,e,r,n,i){var a=Xe(e,r),o=t.segments[t.segments.length-1],s={p0:e,p1:r,t0:n,t1:i,startDist:o?o.startDist+o.length:0,length:a};t.segments.push(s),t.length+=a}for(var d=0;d<t.length;d++){var p=t[d],f=t[d-1];f&&(p.startDist=f.startDist+f.length),u(p,p.p0,c[d*h],0,i.bezierProjPcts[0]);for(var g=0;g<h-1;g++)u(p,c[d*h+g],c[d*h+g+1],i.bezierProjPcts[g],i.bezierProjPcts[g+1]);u(p,c[d*h+h-1],p.p2,i.bezierProjPcts[h-1],1)}return l.cache=t},c=function(r){var i,s="source"===r;if(a[r]){var c=t.pstyle(r+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var h,u=l(),d=0,p=0,f=0;f<u.length;f++){for(var g=u[s?f:u.length-1-f],m=0;m<g.segments.length;m++){var y=g.segments[s?m:g.segments.length-1-m],v=f===u.length-1&&m===g.segments.length-1;if(d=p,(p+=y.length)>=c||v){h={cp:g,segment:y};break}}if(h)break}var b=h.cp,x=h.segment,T=(c-d)/x.length,w=x.t1-x.t0,k=s?x.t0+w*T:x.t1-w*T;k=er(0,k,1),e=tr(b.p0,b.p1,b.p2,k),i=function(t,e,r,n){var i=er(0,n-.001,1),a=er(0,n+.001,1),o=tr(t,e,r,i),s=tr(t,e,r,a);return Qh(o,s)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var C,E,S,_,A=0,R=n.allpts.length,L=0;L+3<R&&(s?(S={x:n.allpts[L],y:n.allpts[L+1]},_={x:n.allpts[L+2],y:n.allpts[L+3]}):(S={x:n.allpts[R-2-L],y:n.allpts[R-1-L]},_={x:n.allpts[R-4-L],y:n.allpts[R-3-L]}),E=A,!((A+=C=Xe(S,_))>=c));L+=2);var I=(c-E)/C;I=er(0,I,1),e=function(t,e,r,n){var i=e.x-t.x,a=e.y-t.y,o=Xe(t,e),s=i/o,l=a/o;return r=r??0,n=null!=n?n:r*o,{x:t.x+s*n,y:t.y+l*n}}(S,_,I),i=Qh(S,_)}o("labelX",r,e.x),o("labelY",r,e.y),o("labelAutoAngle",r,i)}};c("source"),c("target"),this.applyLabelDimensions(t)}},Xh.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},Xh.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=Yt(n,t._private.labelDimsKey);if(ge(r.rscratch,"prefixedLabelDimsKey",e)!==i){me(r.rscratch,"prefixedLabelDimsKey",e,i);var a=this.calculateLabelDimensions(t,n),o=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,l=ge(r.rscratch,"labelWrapCachedLines",e)||[],c="wrap"!==s?1:Math.max(l.length,1),h=a.height/c,u=h*o,d=a.width,p=a.height+(c-1)*(o-1)*h;me(r.rstyle,"labelWidth",e,d),me(r.rscratch,"labelWidth",e,d),me(r.rstyle,"labelHeight",e,p),me(r.rscratch,"labelHeight",e,p),me(r.rscratch,"labelLineHeight",e,u)}},Xh.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,s=function(t,n){return n?(me(r.rscratch,t,e,n),n):ge(r.rscratch,t,e)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var l=t.pstyle("text-wrap").value;if("wrap"===l){var c=s("labelKey");if(null!=c&&s("labelWrapKey")===c)return s("labelWrapCachedText");for(var h=i.split("\n"),u=t.pstyle("text-max-width").pfValue,d="anywhere"===t.pstyle("text-overflow-wrap").value,p=[],f=/[\s\u200b]+|$/g,g=0;g<h.length;g++){var m=h[g],y=this.calculateLabelDimensions(t,m).width;if(d){var v=m.split("").join("");m=v}if(y>u){var b,x="",T=0,w=o(m.matchAll(f));try{for(w.s();!(b=w.n()).done;){var k=b.value,C=k[0],E=m.substring(T,k.index);T=k.index+C.length;var S=0===x.length?E:x+E+C;this.calculateLabelDimensions(t,S).width<=u?x+=E+C:(x&&p.push(x),x=E+C)}}catch(I){w.e(I)}finally{w.f()}x.match(/^[\s\u200b]+$/)||p.push(x)}else p.push(m)}s("labelWrapCachedLines",p),i=s("labelWrapCachedText",p.join("\n")),s("labelWrapKey",c)}else if("ellipsis"===l){var _=t.pstyle("text-max-width").pfValue,A="",R=!1;if(this.calculateLabelDimensions(t,i).width<_)return i;for(var L=0;L<i.length;L++){if(this.calculateLabelDimensions(t,A+i[L]+"…").width>_)break;A+=i[L],L===i.length-1&&(R=!0)}return R||(A+="…"),A}return i},Xh.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},Xh.calculateLabelDimensions=function(t,e){var r=this.cy.window().document,n=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue,a=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!s){s=this.labelCalcCanvas=r.createElement("canvas"),l=this.labelCalcCanvasContext=s.getContext("2d");var c=s.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}l.font="".concat(n," ").concat(o," ").concat(i,"px ").concat(a);for(var h=0,u=0,d=e.split("\n"),p=0;p<d.length;p++){var f=d[p],g=l.measureText(f),m=Math.ceil(g.width),y=i;h=Math.max(m,h),u+=y}return{width:h+=0,height:u+=0}},Xh.calculateLabelAngle=function(t,e){var r=t._private.rscratch,n=t.isEdge(),i=e?e+"-":"",a=t.pstyle(i+"text-rotation"),o=a.strValue;return"none"===o?0:n&&"autorotate"===o?r.labelAutoAngle:"autorotate"===o?0:a.pfValue},Xh.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private.rscratch;n.labelAngle=e.calculateLabelAngle(t),r&&(n.sourceLabelAngle=e.calculateLabelAngle(t,"source"),n.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var Jh={},tu=!1;Jh.getNodeShape=function(t){var e=t.pstyle("shape").value;if("cutrectangle"===e&&(t.width()<28||t.height()<28))return tu||(se("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),tu=!0),"rectangle";if(t.isParent())return"rectangle"===e||"roundrectangle"===e||"round-rectangle"===e||"cutrectangle"===e||"cut-rectangle"===e||"barrel"===e?e:"rectangle";if("polygon"===e){var r=t.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(r).name}return e};var eu={registerCalculationListeners:function(){var t=this.cy,e=t.collection(),r=this,n=function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.merge(t),r)for(var n=0;n<t.length;n++){var i=t[n]._private.rstyle;i.clean=!1,i.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(t){var e=t.target;n(e)}).on("style.* background.*",function(t){var e=t.target;n(e,!1)});var i=function(i){if(i){var a=r.onUpdateEleCalcsFns;e.cleanStyle();for(var o=0;o<e.length;o++){var s=e[o],l=s._private.rstyle;s.isNode()&&!l.cleanConnected&&(n(s.connectedEdges()),l.cleanConnected=!0)}if(a)for(var c=0;c<a.length;c++){(0,a[c])(i,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){i(!0)},r.beforeRender(i,r.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(t){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(t)},recalculateRenderedStyle:function(t,e){var r=function(t){return t._private.rstyle.cleanConnected};if(0!==t.length){var n=[],i=[];if(!this.destroyed){void 0===e&&(e=!0);for(var a=0;a<t.length;a++){var o=t[a],s=o._private,l=s.rstyle;!o.isEdge()||r(o.source())&&r(o.target())||(l.clean=!1),o.isEdge()&&o.isBundledBezier()&&o.parallelEdges().some(function(t){return!t._private.rstyle.clean&&t.isBundledBezier()})&&(l.clean=!1),e&&l.clean||o.removed()||"none"!==o.pstyle("display").value&&("nodes"===s.group?i.push(o):n.push(o),l.clean=!0)}for(var c=0;c<i.length;c++){var h=i[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var p=0;p<n.length;p++){var f=n[p]._private,g=f.rstyle,m=f.rscratch;g.srcX=m.arrowStartX,g.srcY=m.arrowStartY,g.tgtX=m.arrowEndX,g.tgtY=m.arrowEndY,g.midX=m.midX,g.midY=m.midY,g.labelAngle=m.labelAngle,g.sourceLabelAngle=m.sourceLabelAngle,g.targetLabelAngle=m.targetLabelAngle}}}}},ru={updateCachedGrabbedEles:function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=(i=t[r])._private.rscratch;i.grabbed()&&!i.isParent()?e.push(i):n.inDragLayer?t.drag.push(i):t.nondrag.push(i)}for(r=0;r<e.length;r++){var i=e[r];t.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(ml),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e}},nu={};[vh,bh,Uh,Yh,Vh,Xh,Jh,eu,ru].forEach(function(t){bt(nu,t)});var iu={getCachedImage:function(t,e,r){var n=this.imageCache=this.imageCache||{},i=n[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;var a=(i=n[t]=n[t]||{}).image=new Image;a.addEventListener("load",r),a.addEventListener("error",function(){a.error=!0});var o="data:";return t.substring(0,5).toLowerCase()===o||(e="null"===e?null:e,a.crossOrigin=e),a.src=t,a}},au=function(t,e){var r=t[0];r&&r._private.grabbed!==e&&(r._private.grabbed=e,t.updateStyle(!1))},ou={registerBinding:function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var a=[],o=0;o<t.length;o++){var s=t[o];if(void 0!==s){var l=this.binder(s);a.push(l.on.apply(l,i))}}return a}return(l=this.binder(t)).on.apply(l,i)}};ou.binder=function(t){var e,r=this,n=r.cy.window(),i=t===n||t===n.document||t===n.document.body||(e=t,"undefined"!=typeof HTMLElement&&e instanceof HTMLElement);if(null==r.supportsPassiveEvents){var a=!1;try{var o=Object.defineProperty({},"passive",{get:function(){return a=!0,!0}});n.addEventListener("test",null,o)}catch(l){}r.supportsPassiveEvents=a}var s=function(e,n,a){var o=Array.prototype.slice.call(arguments);return i&&r.supportsPassiveEvents&&(o[2]={capture:null!=a&&a,passive:!1,once:!1}),r.bindings.push({target:t,args:o}),(t.addEventListener||t.on).apply(t,o),this};return{on:s,addEventListener:s,addListener:s,bind:s}},ou.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},ou.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()},ou.load=function(){var t=this,e=t.cy.window(),r=function(t){return t.selected()},n=function(e,r,n,i){null==e&&(e=t.cy);for(var a=0;a<r.length;a++){var o=r[a];e.emit({originalEvent:n,type:o,position:i})}},i=function(t){return t.shiftKey||t.metaKey||t.ctrlKey},a=function(e,r){var n=!0;if(t.cy.hasCompoundNodes()&&e&&e.pannable())for(var i=0;r&&i<r.length;i++){if((e=r[i]).isNode()&&e.isParent()&&!e.pannable()){n=!1;break}}else n=!0;return n},o=function(t){t[0]._private.rscratch.inDragLayer=!0},s=function(t){t[0]._private.rscratch.isGrabTarget=!0},l=function(t,e){var r=e.addToList;r.has(t)||!t.grabbable()||t.locked()||(r.merge(t),function(t){au(t,!0)}(t))},c=function(e,r){r=r||{};var n=e.cy().hasCompoundNodes();r.inDragLayer&&(e.forEach(o),e.neighborhood().stdFilter(function(t){return!n||t.isEdge()}).forEach(o)),r.addToList&&e.forEach(function(t){l(t,r)}),function(t,e){if(t.cy().hasCompoundNodes()&&(null!=e.inDragLayer||null!=e.addToList)){var r=t.descendants();e.inDragLayer&&(r.forEach(o),r.connectedEdges().forEach(o)),e.addToList&&l(r,e)}}(e,r),d(e,{inDragLayer:r.inDragLayer}),t.updateCachedGrabbedEles()},h=c,u=function(e){e&&(t.getCachedZSortedEles().forEach(function(t){!function(t){au(t,!1)}(t),function(t){t[0]._private.rscratch.inDragLayer=!1}(t),function(t){t[0]._private.rscratch.isGrabTarget=!1}(t)}),t.updateCachedGrabbedEles())},d=function(t,e){if((null!=e.inDragLayer||null!=e.addToList)&&t.cy().hasCompoundNodes()){var r=t.ancestors().orphans();if(!r.same(t)){var n=r.descendants().spawnSelf().merge(r).unmerge(t).unmerge(t.descendants()),i=n.connectedEdges();e.inDragLayer&&(i.forEach(o),n.forEach(o)),e.addToList&&n.forEach(function(t){l(t,e)})}}},p=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},f="undefined"!=typeof MutationObserver,g="undefined"!=typeof ResizeObserver;f?(t.removeObserver=new MutationObserver(function(e){for(var r=0;r<e.length;r++){var n=e[r].removedNodes;if(n)for(var i=0;i<n.length;i++){if(n[i]===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(e){t.destroy()});var m=Nt(function(){t.cy.resize()},100);f&&(t.styleObserver=new MutationObserver(m),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",m),g&&(t.resizeObserver=new ResizeObserver(m),t.resizeObserver.observe(t.container));var y=function(){t.invalidateContainerClientCoordsCache()};!function(t,e){for(;null!=t;)e(t),t=t.parentNode}(t.container,function(e){t.registerBinding(e,"transitionend",y),t.registerBinding(e,"animationend",y),t.registerBinding(e,"scroll",y)}),t.registerBinding(t.container,"contextmenu",function(t){t.preventDefault()});var v=function(e){for(var r=t.findContainerClientCoords(),n=r[0],i=r[1],a=r[2],o=r[3],s=e.touches?e.touches:[e],l=!1,c=0;c<s.length;c++){var h=s[c];if(n<=h.clientX&&h.clientX<=n+a&&i<=h.clientY&&h.clientY<=i+o){l=!0;break}}if(!l)return!1;for(var u=t.container,d=e.target.parentNode,p=!1;d;){if(d===u){p=!0;break}d=d.parentNode}return!!p};t.registerBinding(t.container,"mousedown",function(e){if(v(e)&&(1!==t.hoverData.which||1===e.which)){e.preventDefault(),p(),t.hoverData.capture=!0,t.hoverData.which=e.which;var r=t.cy,i=[e.clientX,e.clientY],a=t.projectIntoViewport(i[0],i[1]),o=t.selection,l=t.findNearestElements(a[0],a[1],!0,!1),u=l[0],d=t.dragData.possibleDragElements;t.hoverData.mdownPos=a,t.hoverData.mdownGPos=i;var f=function(t){return{originalEvent:e,type:t,position:{x:a[0],y:a[1]}}};if(3==e.which){t.hoverData.cxtStarted=!0;var g={originalEvent:e,type:"cxttapstart",position:{x:a[0],y:a[1]}};u?(u.activate(),u.emit(g),t.hoverData.down=u):r.emit(g),t.hoverData.downTime=(new Date).getTime(),t.hoverData.cxtDragged=!1}else if(1==e.which){if(u&&u.activate(),null!=u&&t.nodeIsGrabbable(u)){if(s(u),u.selected()){d=t.dragData.possibleDragElements=r.collection();var m=r.$(function(e){return e.isNode()&&e.selected()&&t.nodeIsGrabbable(e)});c(m,{addToList:d}),u.emit(f("grabon")),m.forEach(function(t){t.emit(f("grab"))})}else d=t.dragData.possibleDragElements=r.collection(),h(u,{addToList:d}),u.emit(f("grabon")).emit(f("grab"));t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=u,t.hoverData.downs=l,t.hoverData.downTime=(new Date).getTime(),n(u,["mousedown","tapstart","vmousedown"],e,{x:a[0],y:a[1]}),null==u?(o[4]=1,t.data.bgActivePosistion={x:a[0],y:a[1]},t.redrawHint("select",!0),t.redraw()):u.pannable()&&(o[4]=1),t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var e=t.hoverData.down;e?e.emit(f("taphold")):r.emit(f("taphold"))}},t.tapholdDuration)}o[0]=o[2]=a[0],o[1]=o[3]=a[1]}},!1);var b,x,T,w=function(t){var e=t.getRootNode();if(e&&11===e.nodeType&&void 0!==e.host)return e}(t.container);t.registerBinding([e,w],"mousemove",function(e){if(t.hoverData.capture||v(e)){var r=!1,o=t.cy,s=o.zoom(),l=[e.clientX,e.clientY],h=t.projectIntoViewport(l[0],l[1]),d=t.hoverData.mdownPos,p=t.hoverData.mdownGPos,f=t.selection,g=null;t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.selecting||(g=t.findNearestElement(h[0],h[1],!0,!1));var m,y=t.hoverData.last,b=t.hoverData.down,x=[h[0]-f[2],h[1]-f[3]],T=t.dragData.possibleDragElements;if(p){var w=l[0]-p[0],k=w*w,C=l[1]-p[1],E=k+C*C;t.hoverData.isOverThresholdDrag=m=E>=t.desktopTapThreshold2}var S=i(e);m&&(t.hoverData.tapholdCancelled=!0);r=!0,n(g,["mousemove","vmousemove","tapdrag"],e,{x:h[0],y:h[1]});var _=function(t){return{originalEvent:e,type:t,position:{x:h[0],y:h[1]}}},A=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||o.emit(_("boxstart")),f[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(3===t.hoverData.which){if(m){var R=_("cxtdrag");b?b.emit(R):o.emit(R),t.hoverData.cxtDragged=!0,t.hoverData.cxtOver&&g===t.hoverData.cxtOver||(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(_("cxtdragout")),t.hoverData.cxtOver=g,g&&g.emit(_("cxtdragover")))}}else if(t.hoverData.dragging){if(r=!0,o.panningEnabled()&&o.userPanningEnabled()){var L;if(t.hoverData.justStartedPan){var I=t.hoverData.mdownPos;L={x:(h[0]-I[0])*s,y:(h[1]-I[1])*s},t.hoverData.justStartedPan=!1}else L={x:x[0]*s,y:x[1]*s};o.panBy(L),o.emit(_("dragpan")),t.hoverData.dragged=!0}h=t.projectIntoViewport(e.clientX,e.clientY)}else if(1!=f[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||g==y||(y&&n(y,["mouseout","tapdragout"],e,{x:h[0],y:h[1]}),g&&n(g,["mouseover","tapdragover"],e,{x:h[0],y:h[1]}),t.hoverData.last=g),b)if(m){if(o.boxSelectionEnabled()&&S)b&&b.grabbed()&&(u(T),b.emit(_("freeon")),T.emit(_("free")),t.dragData.didDrag&&(b.emit(_("dragfreeon")),T.emit(_("dragfree")))),A();else if(b&&b.grabbed()&&t.nodeIsDraggable(b)){var D=!t.dragData.didDrag;D&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||c(T,{inDragLayer:!0});var N={x:0,y:0};if(Q(x[0])&&Q(x[1])&&(N.x+=x[0],N.y+=x[1],D)){var M=t.hoverData.dragDelta;M&&Q(M[0])&&Q(M[1])&&(N.x+=M[0],N.y+=M[1])}t.hoverData.draggingEles=!0,T.silentShift(N).emit(_("position")).emit(_("drag")),t.redrawHint("drag",!0),t.redraw()}}else!function(){var e=t.hoverData.dragDelta=t.hoverData.dragDelta||[];0===e.length?(e.push(x[0]),e.push(x[1])):(e[0]+=x[0],e[1]+=x[1])}();r=!0}else if(m){if(t.hoverData.dragging||!o.boxSelectionEnabled()||!S&&o.panningEnabled()&&o.userPanningEnabled()){if(!t.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){a(b,t.hoverData.downs)&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,f[4]=0,t.data.bgActivePosistion=Ge(d),t.redrawHint("select",!0),t.redraw())}}else A();b&&b.pannable()&&b.active()&&b.unactivate()}return f[2]=h[0],f[3]=h[1],r?(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1):void 0}},!1),t.registerBinding(e,"mouseup",function(e){if((1!==t.hoverData.which||1===e.which||!t.hoverData.capture)&&t.hoverData.capture){t.hoverData.capture=!1;var a=t.cy,o=t.projectIntoViewport(e.clientX,e.clientY),s=t.selection,l=t.findNearestElement(o[0],o[1],!0,!1),c=t.dragData.possibleDragElements,h=t.hoverData.down,d=i(e);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,h&&h.unactivate();var p=function(t){return{originalEvent:e,type:t,position:{x:o[0],y:o[1]}}};if(3===t.hoverData.which){var f=p("cxttapend");if(h?h.emit(f):a.emit(f),!t.hoverData.cxtDragged){var g=p("cxttap");h?h.emit(g):a.emit(g)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(1===t.hoverData.which){if(n(l,["mouseup","tapend","vmouseup"],e,{x:o[0],y:o[1]}),t.dragData.didDrag||t.hoverData.dragged||t.hoverData.selecting||t.hoverData.isOverThresholdDrag||(n(h,["click","tap","vclick"],e,{x:o[0],y:o[1]}),x=!1,e.timeStamp-T<=a.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,T=null,n(h,["dblclick","dbltap","vdblclick"],e,{x:o[0],y:o[1]})):(b=setTimeout(function(){x||n(h,["oneclick","onetap","voneclick"],e,{x:o[0],y:o[1]})},a.multiClickDebounceTime()),T=e.timeStamp)),null!=h||t.dragData.didDrag||t.hoverData.selecting||t.hoverData.dragged||i(e)||(a.$(r).unselect(["tapunselect"]),c.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=c=a.collection()),l!=h||t.dragData.didDrag||t.hoverData.selecting||null!=l&&l._private.selectable&&(t.hoverData.dragging||("additive"===a.selectionType()||d?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):d||(a.$(r).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var m=a.collection(t.getAllInBox(s[0],s[1],s[2],s[3]));t.redrawHint("select",!0),m.length>0&&t.redrawHint("eles",!0),a.emit(p("boxend"));var y=function(t){return t.selectable()&&!t.selected()};"additive"===a.selectionType()||d||a.$(r).unmerge(m).unselect(),m.emit(p("box")).stdFilter(y).select().emit(p("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!s[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var v=h&&h.grabbed();u(c),v&&(h.emit(p("freeon")),c.emit(p("free")),t.dragData.didDrag&&(h.emit(p("dragfreeon")),c.emit(p("dragfree"))))}}s[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}},!1);var k,C,E,S,_,A,R,L,I,D,N,M,O,$,P=[],B=1e5,F=function(e){var r=!1,n=e.deltaY;if(null==n&&(null!=e.wheelDeltaY?n=e.wheelDeltaY/4:null!=e.wheelDelta&&(n=e.wheelDelta/4)),0!==n){if(null==k)if(P.length>=4){var i=P;if(k=function(t,e){for(var r=0;r<t.length;r++)if(t[r]%e!==0)return!1;return!0}(i,5),!k){var a=Math.abs(i[0]);k=function(t){for(var e=Math.abs(t[0]),r=1;r<t.length;r++)if(Math.abs(t[r])!==e)return!1;return!0}(i)&&a>5}if(k)for(var o=0;o<i.length;o++)B=Math.min(Math.abs(i[o]),B)}else P.push(n),r=!0;else k&&(B=Math.min(Math.abs(n),B));if(!t.scrollingPage){var s=t.cy,l=s.zoom(),c=s.pan(),h=t.projectIntoViewport(e.clientX,e.clientY),u=[h[0]*l+c.x,h[1]*l+c.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||0!==t.selection[4])e.preventDefault();else if(s.panningEnabled()&&s.userPanningEnabled()&&s.zoomingEnabled()&&s.userZoomingEnabled()){var d;e.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150),r&&Math.abs(n)>5&&(n=5*He(n)),d=n/-250,k&&(d/=B,d*=3),d*=t.wheelSensitivity,1===e.deltaMode&&(d*=33);var p=s.zoom()*Math.pow(10,d);"gesturechange"===e.type&&(p=t.gestureStartZoom*e.scale),s.zoom({level:p,renderedPosition:{x:u[0],y:u[1]}}),s.emit({type:"gesturechange"===e.type?"pinchzoom":"scrollzoom",originalEvent:e,position:{x:h[0],y:h[1]}})}}}};t.registerBinding(t.container,"wheel",F,!0),t.registerBinding(e,"scroll",function(e){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(e){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||e.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(e){t.hasTouchStarted||F(e)},!0),t.registerBinding(t.container,"mouseout",function(e){var r=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseout",position:{x:r[0],y:r[1]}})},!1),t.registerBinding(t.container,"mouseover",function(e){var r=t.projectIntoViewport(e.clientX,e.clientY);t.cy.emit({originalEvent:e,type:"mouseover",position:{x:r[0],y:r[1]}})},!1);var z,K,j,q,W,U,G,Y=function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))},V=function(t,e,r,n){return(r-t)*(r-t)+(n-e)*(n-e)};if(t.registerBinding(t.container,"touchstart",z=function(e){if(t.hasTouchStarted=!0,v(e)){p(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var r=t.cy,i=t.touchData.now,a=t.touchData.earlier;if(e.touches[0]){var o=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);i[0]=o[0],i[1]=o[1]}if(e.touches[1]){o=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);i[2]=o[0],i[3]=o[1]}if(e.touches[2]){o=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);i[4]=o[0],i[5]=o[1]}var l=function(t){return{originalEvent:e,type:t,position:{x:i[0],y:i[1]}}};if(e.touches[1]){t.touchData.singleTouchMoved=!0,u(t.dragData.touchDragEles);var d=t.findContainerClientCoords();D=d[0],N=d[1],M=d[2],O=d[3],C=e.touches[0].clientX-D,E=e.touches[0].clientY-N,S=e.touches[1].clientX-D,_=e.touches[1].clientY-N,$=0<=C&&C<=M&&0<=S&&S<=M&&0<=E&&E<=O&&0<=_&&_<=O;var f=r.pan(),g=r.zoom();A=Y(C,E,S,_),R=V(C,E,S,_),I=[((L=[(C+S)/2,(E+_)/2])[0]-f.x)/g,(L[1]-f.y)/g];if(R<4e4&&!e.touches[2]){var m=t.findNearestElement(i[0],i[1],!0,!0),y=t.findNearestElement(i[2],i[3],!0,!0);return m&&m.isNode()?(m.activate().emit(l("cxttapstart")),t.touchData.start=m):y&&y.isNode()?(y.activate().emit(l("cxttapstart")),t.touchData.start=y):r.emit(l("cxttapstart")),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,void t.redraw()}}if(e.touches[2])r.boxSelectionEnabled()&&e.preventDefault();else if(e.touches[1]);else if(e.touches[0]){var b=t.findNearestElements(i[0],i[1],!0,!0),x=b[0];if(null!=x&&(x.activate(),t.touchData.start=x,t.touchData.starts=b,t.nodeIsGrabbable(x))){var T=t.dragData.touchDragEles=r.collection(),w=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),x.selected()?(w=r.$(function(e){return e.selected()&&t.nodeIsGrabbable(e)}),c(w,{addToList:T})):h(x,{addToList:T}),s(x),x.emit(l("grabon")),w?w.forEach(function(t){t.emit(l("grab"))}):x.emit(l("grab"))}n(x,["touchstart","tapstart","vmousedown"],e,{x:i[0],y:i[1]}),null==x&&(t.data.bgActivePosistion={x:o[0],y:o[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){!1!==t.touchData.singleTouchMoved||t.pinching||t.touchData.selecting||n(t.touchData.start,["taphold"],e,{x:i[0],y:i[1]})},t.tapholdDuration)}if(e.touches.length>=1){for(var k=t.touchData.startPosition=[null,null,null,null,null,null],P=0;P<i.length;P++)k[P]=a[P]=i[P];var B=e.touches[0];t.touchData.startGPosition=[B.clientX,B.clientY]}}},!1),t.registerBinding(e,"touchmove",K=function(e){var r=t.touchData.capture;if(r||v(e)){var i=t.selection,o=t.cy,s=t.touchData.now,l=t.touchData.earlier,h=o.zoom();if(e.touches[0]){var d=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);s[0]=d[0],s[1]=d[1]}if(e.touches[1]){d=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);s[2]=d[0],s[3]=d[1]}if(e.touches[2]){d=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);s[4]=d[0],s[5]=d[1]}var p,f=function(t){return{originalEvent:e,type:t,position:{x:s[0],y:s[1]}}},g=t.touchData.startGPosition;if(r&&e.touches[0]&&g){for(var m=[],y=0;y<s.length;y++)m[y]=s[y]-l[y];var b=e.touches[0].clientX-g[0],x=b*b,T=e.touches[0].clientY-g[1];p=x+T*T>=t.touchTapThreshold2}if(r&&t.touchData.cxt){e.preventDefault();var w=e.touches[0].clientX-D,k=e.touches[0].clientY-N,L=e.touches[1].clientX-D,M=e.touches[1].clientY-N,O=V(w,k,L,M);if(O/R>=2.25||O>=22500){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var P=f("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit(P),t.touchData.start=null):o.emit(P)}}if(r&&t.touchData.cxt){P=f("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(P):o.emit(P),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var B=t.findNearestElement(s[0],s[1],!0,!0);t.touchData.cxtOver&&B===t.touchData.cxtOver||(t.touchData.cxtOver&&t.touchData.cxtOver.emit(f("cxtdragout")),t.touchData.cxtOver=B,B&&B.emit(f("cxtdragover")))}else if(r&&e.touches[2]&&o.boxSelectionEnabled())e.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||o.emit(f("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),t.redrawHint("select",!0),t.redraw();else if(r&&e.touches[1]&&!t.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(e.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),et=t.dragData.touchDragEles){t.redrawHint("drag",!0);for(var F=0;F<et.length;F++){var z=et[F]._private;z.grabbed=!1,z.rscratch.inDragLayer=!1}}var K=t.touchData.start,j=(w=e.touches[0].clientX-D,k=e.touches[0].clientY-N,L=e.touches[1].clientX-D,M=e.touches[1].clientY-N,Y(w,k,L,M)),q=j/A;if($){var W=(w-C+(L-S))/2,U=(k-E+(M-_))/2,G=o.zoom(),H=G*q,X=o.pan(),Z=I[0]*G+X.x,J=I[1]*G+X.y,tt={x:-H/G*(Z-X.x-W)+Z,y:-H/G*(J-X.y-U)+J};if(K&&K.active()){var et=t.dragData.touchDragEles;u(et),t.redrawHint("drag",!0),t.redrawHint("eles",!0),K.unactivate().emit(f("freeon")),et.emit(f("free")),t.dragData.didDrag&&(K.emit(f("dragfreeon")),et.emit(f("dragfree")))}o.viewport({zoom:H,pan:tt,cancelOnFailedZoom:!0}),o.emit(f("pinchzoom")),A=j,C=w,E=k,S=L,_=M,t.pinching=!0}if(e.touches[0]){d=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);s[0]=d[0],s[1]=d[1]}if(e.touches[1]){d=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);s[2]=d[0],s[3]=d[1]}if(e.touches[2]){d=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);s[4]=d[0],s[5]=d[1]}}else if(e.touches[0]&&!t.touchData.didSelect){var rt=t.touchData.start,nt=t.touchData.last;if(t.hoverData.draggingEles||t.swipePanning||(B=t.findNearestElement(s[0],s[1],!0,!0)),r&&null!=rt&&e.preventDefault(),r&&null!=rt&&t.nodeIsDraggable(rt))if(p){et=t.dragData.touchDragEles;var it=!t.dragData.didDrag;it&&c(et,{inDragLayer:!0}),t.dragData.didDrag=!0;var at={x:0,y:0};if(Q(m[0])&&Q(m[1]))if(at.x+=m[0],at.y+=m[1],it)t.redrawHint("eles",!0),(ot=t.touchData.dragDelta)&&Q(ot[0])&&Q(ot[1])&&(at.x+=ot[0],at.y+=ot[1]);t.hoverData.draggingEles=!0,et.silentShift(at).emit(f("position")).emit(f("drag")),t.redrawHint("drag",!0),t.touchData.startPosition[0]==l[0]&&t.touchData.startPosition[1]==l[1]&&t.redrawHint("eles",!0),t.redraw()}else{var ot;0===(ot=t.touchData.dragDelta=t.touchData.dragDelta||[]).length?(ot.push(m[0]),ot.push(m[1])):(ot[0]+=m[0],ot[1]+=m[1])}if(n(rt||B,["touchmove","tapdrag","vmousemove"],e,{x:s[0],y:s[1]}),rt&&rt.grabbed()||B==nt||(nt&&nt.emit(f("tapdragout")),B&&B.emit(f("tapdragover"))),t.touchData.last=B,r)for(F=0;F<s.length;F++)s[F]&&t.touchData.startPosition[F]&&p&&(t.touchData.singleTouchMoved=!0);if(r&&(null==rt||rt.pannable())&&o.panningEnabled()&&o.userPanningEnabled()){a(rt,t.touchData.starts)&&(e.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=Ge(t.touchData.startPosition)),t.swipePanning?(o.panBy({x:m[0]*h,y:m[1]*h}),o.emit(f("dragpan"))):p&&(t.swipePanning=!0,o.panBy({x:b*h,y:T*h}),o.emit(f("dragpan")),rt&&(rt.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));d=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);s[0]=d[0],s[1]=d[1]}}for(y=0;y<s.length;y++)l[y]=s[y];r&&e.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&null!=t.data.bgActivePosistion&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1),t.registerBinding(e,"touchcancel",j=function(e){var r=t.touchData.start;t.touchData.capture=!1,r&&r.unactivate()}),t.registerBinding(e,"touchend",q=function(e){var i=t.touchData.start;if(t.touchData.capture){0===e.touches.length&&(t.touchData.capture=!1),e.preventDefault();var a=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var o=t.cy,s=o.zoom(),l=t.touchData.now,c=t.touchData.earlier;if(e.touches[0]){var h=t.projectIntoViewport(e.touches[0].clientX,e.touches[0].clientY);l[0]=h[0],l[1]=h[1]}if(e.touches[1]){h=t.projectIntoViewport(e.touches[1].clientX,e.touches[1].clientY);l[2]=h[0],l[3]=h[1]}if(e.touches[2]){h=t.projectIntoViewport(e.touches[2].clientX,e.touches[2].clientY);l[4]=h[0],l[5]=h[1]}var d,p=function(t){return{originalEvent:e,type:t,position:{x:l[0],y:l[1]}}};if(i&&i.unactivate(),t.touchData.cxt){if(d=p("cxttapend"),i?i.emit(d):o.emit(d),!t.touchData.cxtDragged){var f=p("cxttap");i?i.emit(f):o.emit(f)}return t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,void t.redraw()}if(!e.touches[2]&&o.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var g=o.collection(t.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,t.redrawHint("select",!0),o.emit(p("boxend"));g.emit(p("box")).stdFilter(function(t){return t.selectable()&&!t.selected()}).select().emit(p("boxselect")),g.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(null!=i&&i.unactivate(),e.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(e.touches[1]);else if(e.touches[0]);else if(!e.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var m=t.dragData.touchDragEles;if(null!=i){var y=i._private.grabbed;u(m),t.redrawHint("drag",!0),t.redrawHint("eles",!0),y&&(i.emit(p("freeon")),m.emit(p("free")),t.dragData.didDrag&&(i.emit(p("dragfreeon")),m.emit(p("dragfree")))),n(i,["touchend","tapend","vmouseup","tapdragout"],e,{x:l[0],y:l[1]}),i.unactivate(),t.touchData.start=null}else{var v=t.findNearestElement(l[0],l[1],!0,!0);n(v,["touchend","tapend","vmouseup","tapdragout"],e,{x:l[0],y:l[1]})}var b=t.touchData.startPosition[0]-l[0],x=b*b,T=t.touchData.startPosition[1]-l[1],w=(x+T*T)*s*s;t.touchData.singleTouchMoved||(i||o.$(":selected").unselect(["tapunselect"]),n(i,["tap","vclick"],e,{x:l[0],y:l[1]}),W=!1,e.timeStamp-G<=o.multiClickDebounceTime()?(U&&clearTimeout(U),W=!0,G=null,n(i,["dbltap","vdblclick"],e,{x:l[0],y:l[1]})):(U=setTimeout(function(){W||n(i,["onetap","voneclick"],e,{x:l[0],y:l[1]})},o.multiClickDebounceTime()),G=e.timeStamp)),null!=i&&!t.dragData.didDrag&&i._private.selectable&&w<t.touchTapThreshold2&&!t.pinching&&("single"===o.selectionType()?(o.$(r).unmerge(i).unselect(["tapunselect"]),i.select(["tapselect"])):i.selected()?i.unselect(["tapunselect"]):i.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}for(var k=0;k<l.length;k++)c[k]=l[k];t.dragData.didDrag=!1,0===e.touches.length&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),e.touches.length<2&&(1===e.touches.length&&(t.touchData.startGPosition=[e.touches[0].clientX,e.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())}},!1),"undefined"==typeof TouchEvent){var H=[],X=function(t){return{clientX:t.clientX,clientY:t.clientY,force:1,identifier:t.pointerId,pageX:t.pageX,pageY:t.pageY,radiusX:t.width/2,radiusY:t.height/2,screenX:t.screenX,screenY:t.screenY,target:t.target}},Z=function(t){H.push(function(t){return{event:t,touch:X(t)}}(t))},J=function(t){for(var e=0;e<H.length;e++){if(H[e].event.pointerId===t.pointerId)return void H.splice(e,1)}},tt=function(t){t.touches=H.map(function(t){return t.touch})},et=function(t){return"mouse"===t.pointerType||4===t.pointerType};t.registerBinding(t.container,"pointerdown",function(t){et(t)||(t.preventDefault(),Z(t),tt(t),z(t))}),t.registerBinding(t.container,"pointerup",function(t){et(t)||(J(t),tt(t),q(t))}),t.registerBinding(t.container,"pointercancel",function(t){et(t)||(J(t),tt(t),j())}),t.registerBinding(t.container,"pointermove",function(t){et(t)||(t.preventDefault(),function(t){var e=H.filter(function(e){return e.event.pointerId===t.pointerId})[0];e.event=t,e.touch=X(t)}(t),tt(t),K(t))})}};var su={generatePolygon:function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:function(t,e,r,n,i,a){this.renderer.nodeShapeImpl("polygon",t,e,r,n,i,this.points)},intersectLine:function(t,e,r,n,i,a,o,s){return Ar(i,a,this.points,t,e,r/2,n/2,o)},checkPoint:function(t,e,r,n,i,a,o,s){return xr(t,e,this.points,a,o,n,i,[0,-1],r)},hasMiterBounds:"rectangle"!==t,miterBounds:function(t,e,r,n,i,a){return pr(this.points,t,e,r,n,i)}}}};su.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},intersectLine:function(t,e,r,n,i,a,o,s){return function(t,e,r,n,i,a){var o=r-t,s=n-e;o/=i,s/=a;var l=Math.sqrt(o*o+s*s),c=l-1;if(c<0)return[];var h=c/l;return[(r-t)*h+t,(n-e)*h+e]}(i,a,t,e,r/2+o,n/2+o)},checkPoint:function(t,e,r,n,i,a,o,s){return kr(t,e,n,i,a,o,r)}}},su.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:function(t,r,n,i,a,o,s){if(void 0!==o[s]&&o[s+"-cx"]===t&&o[s+"-cy"]===r)return o[s];o[s]=new Array(e.length/2),o[s+"-cx"]=t,o[s+"-cy"]=r;var l=n/2,c=i/2;a="auto"===a?Mr(n,i):a;for(var h=new Array(e.length/2),u=0;u<e.length/2;u++)h[u]={x:t+l*e[2*u],y:r+c*e[2*u+1]};var d,p,f,g,m=h.length;for(p=h[m-1],d=0;d<m;d++)f=h[d%m],g=h[(d+1)%m],o[s][d]=jh(p,f,g,a),p=f,f=g;return o[s]},draw:function(t,e,r,n,i,a,o){this.renderer.nodeShapeImpl("round-polygon",t,e,r,n,i,this.points,this.getOrCreateCorners(e,r,n,i,a,o,"drawCorners"))},intersectLine:function(t,e,r,n,i,a,o,s,l){return function(t,e,r,n,i,a,o,s,l){var c,h=[],u=new Array(2*r.length);l.forEach(function(r,a){0===a?(u[u.length-2]=r.startX,u[u.length-1]=r.startY):(u[4*a-2]=r.startX,u[4*a-1]=r.startY),u[4*a]=r.stopX,u[4*a+1]=r.stopY,0!==(c=Cr(t,e,n,i,r.cx,r.cy,r.radius)).length&&h.push(c[0],c[1])});for(var d=0;d<u.length/4;d++)0!==(c=Sr(t,e,n,i,u[4*d],u[4*d+1],u[4*d+2],u[4*d+3],!1)).length&&h.push(c[0],c[1]);if(h.length>2){for(var p=[h[0],h[1]],f=Math.pow(p[0]-t,2)+Math.pow(p[1]-e,2),g=1;g<h.length/2;g++){var m=Math.pow(h[2*g]-t,2)+Math.pow(h[2*g+1]-e,2);m<=f&&(p[0]=h[2*g],p[1]=h[2*g+1],f=m)}return p}return h}(i,a,this.points,t,e,0,0,0,this.getOrCreateCorners(t,e,r,n,s,l,"corners"))},checkPoint:function(t,e,r,n,i,a,o,s,l){return function(t,e,r,n,i,a,o,s){for(var l=new Array(2*r.length),c=0;c<s.length;c++){var h=s[c];if(l[4*c+0]=h.startX,l[4*c+1]=h.startY,l[4*c+2]=h.stopX,l[4*c+3]=h.stopY,Math.pow(h.cx-t,2)+Math.pow(h.cy-e,2)<=Math.pow(h.radius,2))return!0}return br(t,e,l)}(t,e,this.points,0,0,0,0,this.getOrCreateCorners(a,o,n,i,s,l,"corners"))}}},su.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Lr(4,0),draw:function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,this.points,a)},intersectLine:function(t,e,r,n,i,a,o,s){return fr(i,a,t,e,r,n,o,s)},checkPoint:function(t,e,r,n,i,a,o,s){var l=n/2,c=i/2;s="auto"===s?Nr(n,i):s;var h=2*(s=Math.min(l,c,s));return!!xr(t,e,this.points,a,o,n,i-h,[0,-1],r)||(!!xr(t,e,this.points,a,o,n-h,i,[0,-1],r)||(!!kr(t,e,h,h,a-l+s,o-c+s,r)||(!!kr(t,e,h,h,a+l-s,o-c+s,r)||(!!kr(t,e,h,h,a+l-s,o+c-s,r)||!!kr(t,e,h,h,a-l+s,o+c-s,r)))))}}},su.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:8,points:Lr(4,0),draw:function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,null,a)},generateCutTrianglePts:function(t,e,r,n,i){var a="auto"===i?this.cornerLength:i,o=e/2,s=t/2,l=r-s,c=r+s,h=n-o,u=n+o;return{topLeft:[l,h+a,l+a,h,l+a,h+a],topRight:[c-a,h,c,h+a,c-a,h+a],bottomRight:[c,u-a,c-a,u,c-a,u-a],bottomLeft:[l+a,u,l,u-a,l+a,u-a]}},intersectLine:function(t,e,r,n,i,a,o,s){var l=this.generateCutTrianglePts(r+2*o,n+2*o,t,e,s),c=[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]);return Ar(i,a,c,t,e)},checkPoint:function(t,e,r,n,i,a,o,s){var l="auto"===s?this.cornerLength:s;if(xr(t,e,this.points,a,o,n,i-2*l,[0,-1],r))return!0;if(xr(t,e,this.points,a,o,n-2*l,i,[0,-1],r))return!0;var c=this.generateCutTrianglePts(n,i,a,o);return br(t,e,c.topLeft)||br(t,e,c.topRight)||br(t,e,c.bottomRight)||br(t,e,c.bottomLeft)}}},su.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Lr(4,0),draw:function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i)},intersectLine:function(t,e,r,n,i,a,o,s){var l=this.generateBarrelBezierPts(r+2*o,n+2*o,t,e),c=function(t){var e=tr({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.15),r=tr({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.5),n=tr({x:t[0],y:t[1]},{x:t[2],y:t[3]},{x:t[4],y:t[5]},.85);return[t[0],t[1],e.x,e.y,r.x,r.y,n.x,n.y,t[4],t[5]]},h=[].concat(c(l.topLeft),c(l.topRight),c(l.bottomRight),c(l.bottomLeft));return Ar(i,a,h,t,e)},generateBarrelBezierPts:function(t,e,r,n){var i=e/2,a=t/2,o=r-a,s=r+a,l=n-i,c=n+i,h=Or(t,e),u=h.heightOffset,d=h.widthOffset,p=h.ctrlPtOffsetPct*t,f={topLeft:[o,l+u,o+p,l,o+d,l],topRight:[s-d,l,s-p,l,s,l+u],bottomRight:[s,c-u,s-p,c,s-d,c],bottomLeft:[o+d,c,o+p,c,o,c-u]};return f.topLeft.isTop=!0,f.topRight.isTop=!0,f.bottomLeft.isBottom=!0,f.bottomRight.isBottom=!0,f},checkPoint:function(t,e,r,n,i,a,o,s){var l=Or(n,i),c=l.heightOffset,h=l.widthOffset;if(xr(t,e,this.points,a,o,n,i-2*c,[0,-1],r))return!0;if(xr(t,e,this.points,a,o,n-2*h,i,[0,-1],r))return!0;for(var u=this.generateBarrelBezierPts(n,i,a,o),d=function(t,e,r){var n,i,a=r[4],o=r[2],s=r[0],l=r[5],c=r[1],h=Math.min(a,s),u=Math.max(a,s),d=Math.min(l,c),p=Math.max(l,c);if(h<=t&&t<=u&&d<=e&&e<=p){var f=[(n=a)-2*(i=o)+s,2*(i-n),n],g=function(t,e,r,n){var i=e*e-4*t*(r-=n);if(i<0)return[];var a=Math.sqrt(i),o=2*t;return[(-e+a)/o,(-e-a)/o]}(f[0],f[1],f[2],t).filter(function(t){return 0<=t&&t<=1});if(g.length>0)return g[0]}return null},p=Object.keys(u),f=0;f<p.length;f++){var g=u[p[f]],m=d(t,e,g);if(null!=m){var y=g[5],v=g[3],b=g[1],x=Je(y,v,b,m);if(g.isTop&&x<=e)return!0;if(g.isBottom&&e<=x)return!0}}return!1}}},su.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Lr(4,0),draw:function(t,e,r,n,i,a){this.renderer.nodeShapeImpl(this.name,t,e,r,n,i,this.points,a)},intersectLine:function(t,e,r,n,i,a,o,s){var l=e-(n/2+o),c=Sr(i,a,t,e,t-(r/2+o),l,t+(r/2+o),l,!1);return c.length>0?c:fr(i,a,t,e,r,n,o,s)},checkPoint:function(t,e,r,n,i,a,o,s){var l=2*(s="auto"===s?Nr(n,i):s);if(xr(t,e,this.points,a,o,n,i-l,[0,-1],r))return!0;if(xr(t,e,this.points,a,o,n-l,i,[0,-1],r))return!0;var c=n/2+2*r,h=i/2+2*r;return!!br(t,e,[a-c,o-h,a-c,o,a+c,o,a+c,o-h])||(!!kr(t,e,l,l,a+n/2-s,o+i/2-s,r)||!!kr(t,e,l,l,a-n/2+s,o+i/2-s,r))}}},su.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Lr(3,0)),this.generateRoundPolygon("round-triangle",Lr(3,0)),this.generatePolygon("rectangle",Lr(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r),this.generatePolygon("pentagon",Lr(5,0)),this.generateRoundPolygon("round-pentagon",Lr(5,0)),this.generatePolygon("hexagon",Lr(6,0)),this.generateRoundPolygon("round-hexagon",Lr(6,0)),this.generatePolygon("heptagon",Lr(7,0)),this.generateRoundPolygon("round-heptagon",Lr(7,0)),this.generatePolygon("octagon",Lr(8,0)),this.generateRoundPolygon("round-octagon",Lr(8,0));var n=new Array(20),i=Dr(5,0),a=Dr(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s<a.length/2;s++)a[2*s]*=o,a[2*s+1]*=o;for(s=0;s<5;s++)n[4*s]=i[2*s],n[4*s+1]=i[2*s+1],n[4*s+2]=a[2*s],n[4*s+3]=a[2*s+1];n=Ir(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l),t.makePolygon=function(t){var r,n="polygon-"+t.join("$");return(r=this[n])?r:e.generatePolygon(n,t)}};var lu={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(t){t=t||ue();var e=this;void 0===e.averageRedrawTime&&(e.averageRedrawTime=0),void 0===e.lastRedrawTime&&(e.lastRedrawTime=0),void 0===e.lastDrawTime&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t},beforeRender:function(t,e){if(!this.destroyed){null==e&&ae("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(t,e){return e.priority-t.priority})}}},cu=function(t,e,r){for(var n=t.beforeRenderCallbacks,i=0;i<n.length;i++)n[i].fn(e,r)};lu.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=function(n){if(!t.destroyed){if(e.batching());else if(t.requestedFrame&&!t.skipFrame){cu(t,!0,n);var i=Bt();t.render(t.renderOptions);var a=t.lastDrawTime=Bt();void 0===t.averageRedrawTime&&(t.averageRedrawTime=a-i),void 0===t.redrawCount&&(t.redrawCount=0),t.redrawCount++,void 0===t.redrawTotalTime&&(t.redrawTotalTime=0);var o=a-i;t.redrawTotalTime+=o,t.lastRedrawTime=o,t.averageRedrawTime=t.averageRedrawTime/2+o/2,t.requestedFrame=!1}else cu(t,!1,n);t.skipFrame=!1,Pt(r)}};Pt(r)}};var hu=function(t){this.init(t)},uu=hu.prototype;uu.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],uu.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),n=e.cy.window();if(n){var i=n.document,a=i.head,o="__________cytoscape_stylesheet",s="__________cytoscape_container",l=null!=i.getElementById(o);if(r.className.indexOf(s)<0&&(r.className=(r.className||"")+" "+s),!l){var c=i.createElement("style");c.id=o,c.textContent="."+s+" { position: relative; }",a.insertBefore(c,a.children[0])}"static"===n.getComputedStyle(r).getPropertyValue("position")&&se("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.webgl=t.webgl,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=Q(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()},uu.notify=function(t,e){var r=this,n=r.cy;this.destroyed||("init"!==t?"destroy"!==t?(("add"===t||"remove"===t||"move"===t&&n.hasCompoundNodes()||"load"===t||"zorder"===t||"mount"===t)&&r.invalidateCachedZSortedEles(),"viewport"===t&&r.redrawHint("select",!0),"gc"===t&&r.redrawHint("gc",!0),"load"!==t&&"resize"!==t&&"mount"!==t||(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()):r.destroy():r.load())},uu.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r.target;(n.off||n.removeEventListener).apply(n,r.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch(i){}},uu.isHeadless=function(){return!1},[yh,nu,iu,ou,su,lu].forEach(function(t){bt(uu,t)});var du=1e3/60,pu=function(t){return function(){var e=this,r=this.renderer;if(!e.dequeueingSetup){e.dequeueingSetup=!0;var n=Nt(function(){r.redrawHint("eles",!0),r.redrawHint("drag",!0),r.redraw()},t.deqRedrawThreshold),i=t.priority||ie;r.beforeRender(function(i,a){var o=Bt(),s=r.averageRedrawTime,l=r.lastRedrawTime,c=[],h=r.cy.extent(),u=r.getPixelRatio();for(i||r.flushRenderedStyleQueue();;){var d=Bt(),p=d-o,f=d-a;if(l<du){var g=du-(i?s:0);if(f>=t.deqFastCost*g)break}else if(i){if(p>=t.deqCost*l||p>=t.deqAvgCost*s)break}else if(f>=t.deqNoDrawCost*du)break;var m=t.deq(e,u,h);if(!(m.length>0))break;for(var y=0;y<m.length;y++)c.push(m[y])}c.length>0&&(t.onDeqd(e,c),!i&&t.shouldRedraw(e,c,u,h)&&n())},i(e))}}},fu=function(){return a(function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re;i(this,t),this.idsByKey=new ye,this.keyForId=new ye,this.cachesByLvl=new ye,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r},[{key:"getIdsFor",value:function(t){null==t&&ae("Can not get id list for null key");var e=this.idsByKey,r=this.idsByKey.get(t);return r||(r=new be,e.set(t,r)),r}},{key:"addIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).add(e)}},{key:"deleteIdForKey",value:function(t,e){null!=t&&this.getIdsFor(t).delete(e)}},{key:"getNumberOfIdsForKey",value:function(t){return null==t?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var e=t.id(),r=this.keyForId.get(e),n=this.getKey(t);this.deleteIdForKey(r,e),this.addIdForKey(n,e),this.keyForId.set(e,n)}},{key:"deleteKeyMappingFor",value:function(t){var e=t.id(),r=this.keyForId.get(e);this.deleteIdForKey(r,e),this.keyForId.delete(e)}},{key:"keyHasChangedFor",value:function(t){var e=t.id();return this.keyForId.get(e)!==this.getKey(t)}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var e=this.cachesByLvl,r=this.lvls,n=e.get(t);return n||(n=new ye,e.set(t,n),r.push(t)),n}},{key:"getCache",value:function(t,e){return this.getCachesAt(e).get(t)}},{key:"get",value:function(t,e){var r=this.getKey(t),n=this.getCache(r,e);return null!=n&&this.updateKeyMappingFor(t),n}},{key:"getForCachedKey",value:function(t,e){var r=this.keyForId.get(t.id());return this.getCache(r,e)}},{key:"hasCache",value:function(t,e){return this.getCachesAt(e).has(t)}},{key:"has",value:function(t,e){var r=this.getKey(t);return this.hasCache(r,e)}},{key:"setCache",value:function(t,e,r){r.key=t,this.getCachesAt(e).set(t,r)}},{key:"set",value:function(t,e,r){var n=this.getKey(t);this.setCache(n,e,r),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,e){this.getCachesAt(e).delete(t)}},{key:"delete",value:function(t,e){var r=this.getKey(t);this.deleteCache(r,e)}},{key:"invalidateKey",value:function(t){var e=this;this.lvls.forEach(function(r){return e.deleteCache(t,r)})}},{key:"invalidate",value:function(t){var e=t.id(),r=this.keyForId.get(e);this.deleteKeyMappingFor(t);var n=this.doesEleInvalidateKey(t);return n&&this.invalidateKey(r),n||0===this.getNumberOfIdsForKey(r)}}])}(),gu=7.99,mu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},yu=de({getKey:null,doesEleInvalidateKey:re,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:ee,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),vu=function(t,e){var r=this;r.renderer=t,r.onDequeues=[];var n=yu(e);bt(r,n),r.lookup=new fu(n.getKey,n.doesEleInvalidateKey),r.setupDequeueing()},bu=vu.prototype;bu.reasons=mu,bu.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},bu.getRetiredTextureQueue=function(t){var e=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return e[t]=e[t]||[]},bu.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Le(function(t,e){return e.reqs-t.reqs})},bu.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},bu.getElement=function(t,e,r,n,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!e||0===e.w||0===e.h||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed())return null;if(!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(null==n&&(n=Math.ceil(Ve(s*r))),n<-4)n=-4;else if(s>=7.99||n>3)return null;var c=Math.pow(2,n),h=e.h*c,u=e.w*c,d=o.eleTextBiggerThanMin(t,c);if(!this.isVisible(t,d))return null;var p,f=l.get(t,n);if(f&&f.invalidated&&(f.invalidated=!1,f.texture.invalidatedWidth-=f.width),f)return f;if(p=h<=25?25:h<=50?50:50*Math.ceil(h/50),h>1024||u>1024)return null;var g=a.getTextureQueue(p),m=g[g.length-2],y=function(){return a.recycleTexture(p,u)||a.addTexture(p,u)};m||(m=g[g.length-1]),m||(m=y()),m.width-m.usedWidth<u&&(m=y());for(var v,b=function(t){return t&&t.scaledLabelShown===d},x=i&&i===mu.dequeue,T=i&&i===mu.highQuality,w=i&&i===mu.downscale,k=n+1;k<=3;k++){var C=l.get(t,k);if(C){v=C;break}}var E=v&&v.level===n+1?v:null,S=function(){m.context.drawImage(E.texture.canvas,E.x,0,E.width,E.height,m.usedWidth,0,u,h)};if(m.context.setTransform(1,0,0,1,0,0),m.context.clearRect(m.usedWidth,0,u,p),b(E))S();else if(b(v)){if(!T)return a.queueElement(t,v.level-1),v;for(var _=v.level;_>n;_--)E=a.getElement(t,e,r,_,mu.downscale);S()}else{var A;if(!x&&!T&&!w)for(var R=n-1;R>=-4;R--){var L=l.get(t,R);if(L){A=L;break}}if(b(A))return a.queueElement(t,n),A;m.context.translate(m.usedWidth,0),m.context.scale(c,c),this.drawElement(m.context,t,e,d,!1),m.context.scale(1/c,1/c),m.context.translate(-m.usedWidth,0)}return f={x:m.usedWidth,texture:m,level:n,scale:c,width:u,height:h,scaledLabelShown:d},m.usedWidth+=Math.ceil(u+8),m.eleCaches.push(f),l.set(t,n,f),a.checkTextureFullness(m),f},bu.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},bu.invalidateElement=function(t){var e=this,r=e.lookup,n=[];if(r.isInvalid(t)){for(var i=-4;i<=3;i++){var a=r.getForCachedKey(t,i);a&&n.push(a)}if(r.invalidate(t))for(var o=0;o<n.length;o++){var s=n[o],l=s.texture;l.invalidatedWidth+=s.width,s.invalidated=!0,e.checkTextureUtility(l)}e.removeFromQueue(t)}},bu.checkTextureUtility=function(t){t.invalidatedWidth>=.2*t.width&&this.retireTexture(t)},bu.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);t.usedWidth/t.width>.8&&t.fullnessChecks>=10?pe(e,t):t.fullnessChecks++},bu.retireTexture=function(t){var e=t.height,r=this.getTextureQueue(e),n=this.lookup;pe(r,t),t.retired=!0;for(var i=t.eleCaches,a=0;a<i.length;a++){var o=i[a];n.deleteCache(o.key,o.level)}fe(i),this.getRetiredTextureQueue(e).push(t)},bu.addTexture=function(t,e){var r={};return this.getTextureQueue(t).push(r),r.eleCaches=[],r.height=t,r.width=Math.max(1024,e),r.usedWidth=0,r.invalidatedWidth=0,r.fullnessChecks=0,r.canvas=this.renderer.makeOffscreenCanvas(r.width,r.height),r.context=r.canvas.getContext("2d"),r},bu.recycleTexture=function(t,e){for(var r=this.getTextureQueue(t),n=this.getRetiredTextureQueue(t),i=0;i<n.length;i++){var a=n[i];if(a.width>=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,fe(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),pe(n,a),r.push(a),a}},bu.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];if(a)a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};r.push(o),n[i]=o}},bu.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,o=0;o<1&&r.size()>0;o++){var s=r.pop(),l=s.key,c=s.eles[0],h=a.hasCache(c,s.level);if(n[l]=null,!h){i.push(s);var u=e.getBoundingBox(c);e.getElement(c,u,t,s.level,mu.dequeue)}}return i},bu.removeFromQueue=function(t){var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=this.getKey(t),i=r[n];null!=i&&(1===i.eles.length?(i.reqs=te,e.updateItem(i),e.pop(),r[n]=null):i.eles.unmerge(t))},bu.onDequeue=function(t){this.onDequeues.push(t)},bu.offDequeue=function(t){pe(this.onDequeues,t)},bu.setupDequeueing=pu({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e,r){return t.dequeue(e,r)},onDeqd:function(t,e){for(var r=0;r<t.onDequeues.length;r++){(0,t.onDequeues[r])(e)}},shouldRedraw:function(t,e,r,n){for(var i=0;i<e.length;i++)for(var a=e[i].eles,o=0;o<a.length;o++){var s=a[o].boundingBox();if(lr(s,n))return!0}return!1},priority:function(t){return t.renderer.beforeRenderPriorities.eleTxrDeq}});var xu=function(t){var e=this,r=e.renderer=t,n=r.cy;e.layersByLevel={},e.firstGet=!0,e.lastInvalidationTime=Bt()-500,e.skipping=!1,e.eleTxrDeqs=n.collection(),e.scheduleElementRefinement=Nt(function(){e.refineElementTextures(e.eleTxrDeqs),e.eleTxrDeqs.unmerge(e.eleTxrDeqs)},50),r.beforeRender(function(t,r){r-e.lastInvalidationTime<=250?e.skipping=!0:e.skipping=!1},r.beforeRenderPriorities.lyrTxrSkip);e.layersQueue=new Le(function(t,e){return e.reqs-t.reqs}),e.setupDequeueing()},Tu=xu.prototype,wu=0,ku=Math.pow(2,53)-1;Tu.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),i=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(n,i),o={id:wu=++wu%ku,bb:t,level:e,width:n,height:i,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=o.context,l=-o.bb.x1,c=-o.bb.y1;return s.scale(r,r),s.translate(l,c),o},Tu.getLayers=function(t,e,r){var n=this,i=n.renderer.cy.zoom(),a=n.firstGet;if(n.firstGet=!1,null==r)if((r=Math.ceil(Ve(i*e)))<-4)r=-4;else if(i>=3.99||r>2)return null;n.validateLayersElesOrdering(r,t);var o,s,l=n.layersByLevel,c=Math.pow(2,r),h=l[r]=l[r]||[];if(n.levelIsComplete(r,t))return h;!function(){var e=function(e){if(n.validateLayersElesOrdering(e,t),n.levelIsComplete(e,t))return s=l[e],!0},i=function(t){if(!s)for(var n=r+t;-4<=n&&n<=2&&!e(n);n+=t);};i(1),i(-1);for(var a=h.length-1;a>=0;a--){var o=h[a];o.invalid&&pe(h,o)}}();var u=function(e){var i=(e=e||{}).after;!function(){if(!o){o=rr();for(var e=0;e<t.length;e++)nr(o,t[e].boundingBox())}}();var a=Math.ceil(o.w*c),s=Math.ceil(o.h*c);if(a>32767||s>32767)return null;if(a*s>16e6)return null;var l=n.makeLayer(o,r);if(null!=i){var u=h.indexOf(i)+1;h.splice(u,0,l)}else(void 0===e.insert||e.insert)&&h.unshift(l);return l};if(n.skipping&&!a)return null;for(var d=null,p=t.length/1,f=!a,g=0;g<t.length;g++){var m=t[g],y=m._private.rscratch,v=y.imgLayerCaches=y.imgLayerCaches||{},b=v[r];if(b)d=b;else{if((!d||d.eles.length>=p||!ur(d.bb,m.boundingBox()))&&!(d=u({insert:!0,after:d})))return null;s||f?n.queueLayer(d,m):n.drawEleInLayer(d,m,r,e),d.eles.push(m),v[r]=d}}return s||(f?null:h)},Tu.getEleLevelForLayerLevel=function(t,e){return t},Tu.drawEleInLayer=function(t,e,r,n){var i=this.renderer,a=t.context,o=e.boundingBox();0!==o.w&&0!==o.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(a,!1),i.drawCachedElement(a,e,null,null,r,true),i.setImgSmoothing(a,!0))},Tu.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;i<r.length;i++){var a=r[i];if(a.reqs>0)return!1;if(a.invalid)return!1;n+=a.eles.length}return n===e.length},Tu.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var i=r[n],a=-1,o=0;o<e.length;o++)if(i.eles[0]===e[o]){a=o;break}if(a<0)this.invalidateLayer(i);else{var s=a;for(o=0;o<i.eles.length;o++)if(i.eles[o]!==e[s+o]){this.invalidateLayer(i);break}}}},Tu.updateElementsInLayers=function(t,e){for(var r=et(t[0]),n=0;n<t.length;n++)for(var i=r?null:t[n],a=r?t[n]:t[n].ele,o=a._private.rscratch,s=o.imgLayerCaches=o.imgLayerCaches||{},l=-4;l<=2;l++){var c=s[l];c&&(i&&this.getEleLevelForLayerLevel(c.level)!==i.level||e(c,a,i))}},Tu.haveLayers=function(){for(var t=!1,e=-4;e<=2;e++){var r=this.layersByLevel[e];if(r&&r.length>0){t=!0;break}}return t},Tu.invalidateElements=function(t){var e=this;0!==t.length&&(e.lastInvalidationTime=Bt(),0!==t.length&&e.haveLayers()&&e.updateElementsInLayers(t,function(t,r,n){e.invalidateLayer(t)}))},Tu.invalidateLayer=function(t){if(this.lastInvalidationTime=Bt(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];pe(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i<r.length;i++){var a=r[i]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}},Tu.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,function(t,r,n){var i=t.replacement;if(i||((i=t.replacement=e.makeLayer(t.bb,t.level)).replaces=t,i.eles=t.eles),!i.reqs)for(var a=0;a<i.eles.length;a++)e.queueLayer(i,i.eles[a])})},Tu.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},Tu.queueLayer=function(t,e){var r=this.layersQueue,n=t.elesQueue,i=n.hasId=n.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;n.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,r.updateItem(t)):(t.reqs=1,r.push(t))}},Tu.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],i=0;i<1&&0!==r.size();){var a=r.peek();if(a.replacement)r.pop();else if(a.replaces&&a!==a.replaces.replacement)r.pop();else if(a.invalid)r.pop();else{var o=a.elesQueue.shift();o&&(e.drawEleInLayer(a,o,a.level,t),i++),0===n.length&&n.push(!0),0===a.elesQueue.length&&(r.pop(),a.reqs=0,a.replaces&&e.applyLayerReplacement(a),e.requestRedraw())}}return n},Tu.applyLayerReplacement=function(t){var e=this.layersByLevel[t.level],r=t.replaces,n=e.indexOf(r);if(!(n<0||r.invalid)){e[n]=t;for(var i=0;i<t.eles.length;i++){var a=t.eles[i]._private,o=a.imgLayerCaches=a.imgLayerCaches||{};o&&(o[t.level]=t)}this.requestRedraw()}},Tu.requestRedraw=Nt(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),Tu.setupDequeueing=pu({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(t,e){return t.dequeue(e)},onDeqd:ie,shouldRedraw:ee,priority:function(t){return t.renderer.beforeRenderPriorities.lyrTxrDeq}});var Cu,Eu={};function Su(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}function _u(t,e,r){for(var n,i=0;i<e.length;i++){var a=e[i];0===i&&(n=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}function Au(t,e,r){t.beginPath&&t.beginPath();for(var n=e,i=0;i<n.length;i++){var a=n[i];t.lineTo(a.x,a.y)}var o=r,s=r[0];t.moveTo(s.x,s.y);for(i=1;i<o.length;i++){a=o[i];t.lineTo(a.x,a.y)}t.closePath&&t.closePath()}function Ru(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,2*Math.PI,!1);var a=e,o=a[0];t.moveTo(o.x,o.y);for(var s=0;s<a.length;s++){var l=a[s];t.lineTo(l.x,l.y)}t.closePath&&t.closePath()}function Lu(t,e,r,n){t.arc(e,r,n,0,2*Math.PI,!1)}Eu.arrowShapeImpl=function(t){return(Cu||(Cu={polygon:Su,"triangle-backcurve":_u,"triangle-tee":Au,"circle-triangle":Ru,"triangle-cross":Au,circle:Lu}))[t]};var Iu={drawElement:function(t,e,r,n,i,a){e.isNode()?this.drawNode(t,e,r,n,i,a):this.drawEdge(t,e,r,n,i,a)},drawElementOverlay:function(t,e){e.isNode()?this.drawNodeOverlay(t,e):this.drawEdgeOverlay(t,e)},drawElementUnderlay:function(t,e){e.isNode()?this.drawNodeUnderlay(t,e):this.drawEdgeUnderlay(t,e)},drawCachedElementPortion:function(t,e,r,n,i,a,o,s){var l=this,c=r.getBoundingBox(e);if(0!==c.w&&0!==c.h){var h=r.getElement(e,c,n,i,a);if(null!=h){var u=s(l,e);if(0===u)return;var d,p,f,g,m,y,v=o(l,e),b=c.x1,x=c.y1,T=c.w,w=c.h;if(0!==v){var k=r.getRotationPoint(e);f=k.x,g=k.y,t.translate(f,g),t.rotate(v),(m=l.getImgSmoothing(t))||l.setImgSmoothing(t,!0);var C=r.getRotationOffset(e);d=C.x,p=C.y}else d=b,p=x;1!==u&&(y=t.globalAlpha,t.globalAlpha=y*u),t.drawImage(h.texture.canvas,h.x,0,h.width,h.height,d,p,T,w),1!==u&&(t.globalAlpha=y),0!==v&&(t.rotate(-v),t.translate(-f,-g),m||l.setImgSmoothing(t,!1))}else r.drawElement(t,e)}}},Du=function(){return 0},Nu=function(t,e){return t.getTextAngle(e,null)},Mu=function(t,e){return t.getTextAngle(e,"source")},Ou=function(t,e){return t.getTextAngle(e,"target")},$u=function(t,e){return e.effectiveOpacity()},Pu=function(t,e){return e.pstyle("text-opacity").pfValue*e.effectiveOpacity()};Iu.drawCachedElement=function(t,e,r,n,i,a){var o=this,s=o.data,l=s.eleTxrCache,c=s.lblTxrCache,h=s.slbTxrCache,u=s.tlbTxrCache,d=e.boundingBox(),p=!0===a?l.reasons.highQuality:null;if(0!==d.w&&0!==d.h&&e.visible()&&(!n||lr(d,n))){var f=e.isEdge(),g=e.element()._private.rscratch.badLine;o.drawElementUnderlay(t,e),o.drawCachedElementPortion(t,e,l,r,i,p,Du,$u),f&&g||o.drawCachedElementPortion(t,e,c,r,i,p,Nu,Pu),f&&!g&&(o.drawCachedElementPortion(t,e,h,r,i,p,Mu,Pu),o.drawCachedElementPortion(t,e,u,r,i,p,Ou,Pu)),o.drawElementOverlay(t,e)}},Iu.drawElements=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];this.drawElement(t,n)}},Iu.drawCachedElements=function(t,e,r,n){for(var i=0;i<e.length;i++){var a=e[i];this.drawCachedElement(t,a,r,n)}},Iu.drawCachedNodes=function(t,e,r,n){for(var i=0;i<e.length;i++){var a=e[i];a.isNode()&&this.drawCachedElement(t,a,r,n)}},Iu.drawLayeredElements=function(t,e,r,n){var i=this.data.lyrTxrCache.getLayers(e,r);if(i)for(var a=0;a<i.length;a++){var o=i[a],s=o.bb;0!==s.w&&0!==s.h&&t.drawImage(o.canvas,s.x1,s.y1,s.w,s.h)}else this.drawCachedElements(t,e,r,n)};var Bu={drawEdge:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=e._private.rscratch;if((!a||e.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var c=a?e.pstyle("opacity").value:1,h=a?e.pstyle("line-opacity").value:1,u=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,f=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,m=e.pstyle("line-outline-color").value,y=c*h,v=c*h,b=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===u?(o.eleStrokeStyle(t,e,r),o.drawEdgeTrianglePath(e,t,s.allpts)):(t.lineWidth=p,t.lineCap=f,o.eleStrokeStyle(t,e,r),o.drawEdgePath(e,t,s.allpts,d),t.lineCap="butt")},x=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;o.drawArrowheads(t,e,r)};if(t.lineJoin="round","yes"===e.pstyle("ghost").value){var T=e.pstyle("ghost-offset-x").pfValue,w=e.pstyle("ghost-offset-y").pfValue,k=e.pstyle("ghost-opacity").value,C=y*k;t.translate(T,w),b(C),x(C),t.translate(-T,-w)}else!function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;t.lineWidth=p+g,t.lineCap=f,g>0?(o.colorStrokeStyle(t,m[0],m[1],m[2],r),"straight-triangle"===u?o.drawEdgeTrianglePath(e,t,s.allpts):(o.drawEdgePath(e,t,s.allpts,d),t.lineCap="butt")):t.lineCap="butt"}();i&&o.drawEdgeUnderlay(t,e),b(),x(),i&&o.drawEdgeOverlay(t,e),o.drawElementText(t,e,null,n),r&&t.translate(l.x1,l.y1)}}},Fu=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,r){if(r.visible()){var n=r.pstyle("".concat(t,"-opacity")).value;if(0!==n){var i=this,a=i.usePaths(),o=r._private.rscratch,s=2*r.pstyle("".concat(t,"-padding")).pfValue,l=r.pstyle("".concat(t,"-color")).value;e.lineWidth=s,"self"!==o.edgeType||a?e.lineCap="round":e.lineCap="butt",i.colorStrokeStyle(e,l[0],l[1],l[2],n),i.drawEdgePath(r,e,o.allpts,"solid")}}}};Bu.drawEdgeOverlay=Fu("overlay"),Bu.drawEdgeUnderlay=Fu("underlay"),Bu.drawEdgePath=function(t,e,r,n){var i,a=t._private.rscratch,s=e,l=!1,c=this.usePaths(),h=t.pstyle("line-dash-pattern").pfValue,u=t.pstyle("line-dash-offset").pfValue;if(c){var d=r.join("$");a.pathCacheKey&&a.pathCacheKey===d?(i=e=a.pathCache,l=!0):(i=e=new Path2D,a.pathCacheKey=d,a.pathCache=i)}if(s.setLineDash)switch(n){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(h),s.lineDashOffset=u;break;case"solid":s.setLineDash([])}if(!l&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+3<r.length;p+=4)e.quadraticCurveTo(r[p],r[p+1],r[p+2],r[p+3]);break;case"straight":case"haystack":for(var f=2;f+1<r.length;f+=2)e.lineTo(r[f],r[f+1]);break;case"segments":if(a.isRound){var g,m=o(a.roundCorners);try{for(m.s();!(g=m.n()).done;){Kh(e,g.value)}}catch(v){m.e(v)}finally{m.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var y=2;y+1<r.length;y+=2)e.lineTo(r[y],r[y+1])}e=s,c?e.stroke(i):e.stroke(),e.setLineDash&&e.setLineDash([])},Bu.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,i=0;i+1<r.length;i+=2){var a=[r[i+2]-r[i],r[i+3]-r[i+1]],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[a[1]/o,-a[0]/o],l=[s[0]*n/2,s[1]*n/2];e.beginPath(),e.moveTo(r[i]-l[0],r[i+1]-l[1]),e.lineTo(r[i]+l[0],r[i+1]+l[1]),e.lineTo(r[i+2],r[i+3]),e.closePath(),e.fill()}},Bu.drawArrowheads=function(t,e,r){var n=e._private.rscratch,i="haystack"===n.edgeType;i||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),i||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},Bu.drawArrowhead=function(t,e,r,n,i,a,o){if(!(isNaN(n)||null==n||isNaN(i)||null==i||isNaN(a)||null==a)){var s=this,l=e.pstyle(r+"-arrow-shape").value;if("none"!==l){var c="hollow"===e.pstyle(r+"-arrow-fill").value?"both":"filled",h=e.pstyle(r+"-arrow-fill").value,u=e.pstyle("width").pfValue,d=e.pstyle(r+"-arrow-width"),p="match-line"===d.value?u:d.pfValue;"%"===d.units&&(p*=u);var f=e.pstyle("opacity").value;void 0===o&&(o=f);var g=t.globalCompositeOperation;1===o&&"hollow"!==h||(t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,1),s.colorStrokeStyle(t,255,255,255,1),s.drawArrowShape(e,t,c,u,l,p,n,i,a),t.globalCompositeOperation=g);var m=e.pstyle(r+"-arrow-color").value;s.colorFillStyle(t,m[0],m[1],m[2],o),s.colorStrokeStyle(t,m[0],m[1],m[2],o),s.drawArrowShape(e,t,h,u,l,p,n,i,a)}}},Bu.drawArrowShape=function(t,e,r,n,i,a,o,s,l){var c,h=this,u=this.usePaths()&&"triangle-cross"!==i,d=!1,p=e,f={x:o,y:s},g=t.pstyle("arrow-scale").value,m=this.getArrowWidth(n,g),y=h.arrowShapes[i];if(u){var v=h.arrowPathCache=h.arrowPathCache||[],b=Yt(i),x=v[b];null!=x?(c=e=x,d=!0):(c=e=new Path2D,v[b]=c)}d||(e.beginPath&&e.beginPath(),u?y.draw(e,1,0,{x:0,y:0},1):y.draw(e,m,l,f,n),e.closePath&&e.closePath()),e=p,u&&(e.translate(o,s),e.rotate(l),e.scale(m,m)),"filled"!==r&&"both"!==r||(u?e.fill(c):e.fill()),"hollow"!==r&&"both"!==r||(e.lineWidth=a/(u?m:1),e.lineJoin="miter",u?e.stroke(c):e.stroke()),u&&(e.scale(1/m,1/m),e.rotate(-l),e.translate(-o,-s))};var zu={safeDrawImage:function(t,e,r,n,i,a,o,s,l,c){if(!(i<=0||a<=0||l<=0||c<=0))try{t.drawImage(e,r,n,i,a,o,s,l,c)}catch(h){se(h)}},drawInscribedImage:function(t,e,r,n,i){var a=this,o=r.position(),s=o.x,l=o.y,c=r.cy().style(),h=c.getIndexedStyle.bind(c),u=h(r,"background-fit","value",n),d=h(r,"background-repeat","value",n),p=r.width(),f=r.height(),g=2*r.padding(),m=p+("inner"===h(r,"background-width-relative-to","value",n)?0:g),y=f+("inner"===h(r,"background-height-relative-to","value",n)?0:g),v=r._private.rscratch,b="node"===h(r,"background-clip","value",n),x=h(r,"background-image-opacity","value",n)*i,T=h(r,"background-image-smoothing","value",n),w=r.pstyle("corner-radius").value;"auto"!==w&&(w=r.pstyle("corner-radius").pfValue);var k=e.width||e.cachedW,C=e.height||e.cachedH;null!=k&&null!=C||(document.body.appendChild(e),k=e.cachedW=e.width||e.offsetWidth,C=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var E=k,S=C;if("auto"!==h(r,"background-width","value",n)&&(E="%"===h(r,"background-width","units",n)?h(r,"background-width","pfValue",n)*m:h(r,"background-width","pfValue",n)),"auto"!==h(r,"background-height","value",n)&&(S="%"===h(r,"background-height","units",n)?h(r,"background-height","pfValue",n)*y:h(r,"background-height","pfValue",n)),0!==E&&0!==S){if("contain"===u)E*=_=Math.min(m/E,y/S),S*=_;else if("cover"===u){var _;E*=_=Math.max(m/E,y/S),S*=_}var A=s-m/2,R=h(r,"background-position-x","units",n),L=h(r,"background-position-x","pfValue",n);A+="%"===R?(m-E)*L:L;var I=h(r,"background-offset-x","units",n),D=h(r,"background-offset-x","pfValue",n);A+="%"===I?(m-E)*D:D;var N=l-y/2,M=h(r,"background-position-y","units",n),O=h(r,"background-position-y","pfValue",n);N+="%"===M?(y-S)*O:O;var $=h(r,"background-offset-y","units",n),P=h(r,"background-offset-y","pfValue",n);N+="%"===$?(y-S)*P:P,v.pathCache&&(A-=s,N-=l,s=0,l=0);var B=t.globalAlpha;t.globalAlpha=x;var F=a.getImgSmoothing(t),z=!1;if("no"===T&&F?(a.setImgSmoothing(t,!1),z=!0):"yes"!==T||F||(a.setImgSmoothing(t,!0),z=!0),"no-repeat"===d)b&&(t.save(),v.pathCache?t.clip(v.pathCache):(a.nodeShapes[a.getNodeShape(r)].draw(t,s,l,m,y,w,v),t.clip())),a.safeDrawImage(t,e,0,0,k,C,A,N,E,S),b&&t.restore();else{var K=t.createPattern(e,d);t.fillStyle=K,a.nodeShapes[a.getNodeShape(r)].draw(t,s,l,m,y,w,v),t.translate(A,N),t.fill(),t.translate(-A,-N)}t.globalAlpha=B,z&&a.setImgSmoothing(t,F)}}},Ku={};function ju(t,e,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5,o=Math.min(a,n/2,i/2);t.beginPath(),t.moveTo(e+o,r),t.lineTo(e+n-o,r),t.quadraticCurveTo(e+n,r,e+n,r+o),t.lineTo(e+n,r+i-o),t.quadraticCurveTo(e+n,r+i,e+n-o,r+i),t.lineTo(e+o,r+i),t.quadraticCurveTo(e,r+i,e,r+i-o),t.lineTo(e,r+o),t.quadraticCurveTo(e,r,e+o,r),t.closePath()}Ku.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),i=Math.ceil(Ve(r*n));e=Math.pow(2,i)}return!(t.pstyle("font-size").pfValue*e<t.pstyle("min-zoomed-font-size").pfValue)},Ku.drawElementText=function(t,e,r,n,i){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this;if(null==n){if(a&&!o.eleTextBiggerThanMin(e))return}else if(!1===n)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var c=e.element()._private.rscratch.badLine,h=e.pstyle("label"),u=e.pstyle("source-label"),d=e.pstyle("target-label");if(c||(!h||!h.value)&&(!u||!u.value)&&(!d||!d.value))return;t.textAlign="center",t.textBaseline="bottom"}var p,f=!r;r&&(p=r,t.translate(-p.x1,-p.y1)),null==i?(o.drawText(t,e,null,f,a),e.isEdge()&&(o.drawText(t,e,"source",f,a),o.drawText(t,e,"target",f,a))):o.drawText(t,e,i,f,a),r&&t.translate(p.x1,p.y1)},Ku.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if((e=this.fontCaches[r]).context===t)return e;return e={context:t},this.fontCaches.push(e),e},Ku.setupTextStyle=function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*s,c=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=n+" "+o+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,c[0],c[1],c[2],s),this.colorStrokeStyle(t,h[0],h[1],h[2],l)},Ku.getTextAngle=function(t,e){var r,n=t._private.rscratch,i=e?e+"-":"",a=t.pstyle(i+"text-rotation");if("autorotate"===a.strValue){var o=ge(n,"labelAngle",e);r=t.isEdge()?o:0}else r="none"===a.strValue?0:a.pfValue;return r},Ku.drawText=function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=e._private.rscratch,o=i?e.effectiveOpacity():1;if(!i||0!==o&&0!==e.pstyle("text-opacity").value){"main"===r&&(r=null);var s,l,c=ge(a,"labelX",r),h=ge(a,"labelY",r),u=this.getLabelText(e,r);if(null!=u&&""!==u&&!isNaN(c)&&!isNaN(h)){this.setupTextStyle(t,e,i);var d,p=r?r+"-":"",f=ge(a,"labelWidth",r),g=ge(a,"labelHeight",r),m=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,v=e.isEdge(),b=e.pstyle("text-halign").value,x=e.pstyle("text-valign").value;switch(v&&(b="center",x="center"),c+=m,h+=y,0!==(d=n?this.getTextAngle(e,r):0)&&(s=c,l=h,t.translate(s,l),t.rotate(d),c=0,h=0),x){case"top":break;case"center":h+=g/2;break;case"bottom":h+=g}var T=e.pstyle("text-background-opacity").value,w=e.pstyle("text-border-opacity").value,k=e.pstyle("text-border-width").pfValue,C=e.pstyle("text-background-padding").pfValue,E=e.pstyle("text-background-shape").strValue,S="round-rectangle"===E||"roundrectangle"===E,_="circle"===E;if(T>0||k>0&&w>0){var A=t.fillStyle,R=t.strokeStyle,L=t.lineWidth,I=e.pstyle("text-background-color").value,D=e.pstyle("text-border-color").value,N=e.pstyle("text-border-style").value,M=T>0,O=k>0&&w>0,$=c-C;switch(b){case"left":$-=f;break;case"center":$-=f/2}var P=h-g-C,B=f+2*C,F=g+2*C;if(M&&(t.fillStyle="rgba(".concat(I[0],",").concat(I[1],",").concat(I[2],",").concat(T*o,")")),O&&(t.strokeStyle="rgba(".concat(D[0],",").concat(D[1],",").concat(D[2],",").concat(w*o,")"),t.lineWidth=k,t.setLineDash))switch(N){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=k/4,t.setLineDash([]);break;default:t.setLineDash([])}if(S?(t.beginPath(),ju(t,$,P,B,F,2)):_?(t.beginPath(),function(t,e,r,n,i){var a=Math.min(n,i)/2,o=e+n/2,s=r+i/2;t.beginPath(),t.arc(o,s,a,0,2*Math.PI),t.closePath()}(t,$,P,B,F)):(t.beginPath(),t.rect($,P,B,F)),M&&t.fill(),O&&t.stroke(),O&&"double"===N){var z=k/2;t.beginPath(),S?ju(t,$+z,P+z,B-2*z,F-2*z,2):t.rect($+z,P+z,B-2*z,F-2*z),t.stroke()}t.fillStyle=A,t.strokeStyle=R,t.lineWidth=L,t.setLineDash&&t.setLineDash([])}var K=2*e.pstyle("text-outline-width").pfValue;if(K>0&&(t.lineWidth=K),"wrap"===e.pstyle("text-wrap").value){var j=ge(a,"labelWrapCachedLines",r),q=ge(a,"labelLineHeight",r),W=f/2,U=this.getLabelJustification(e);switch("auto"===U||("left"===b?"left"===U?c+=-f:"center"===U&&(c+=-W):"center"===b?"left"===U?c+=-W:"right"===U&&(c+=W):"right"===b&&("center"===U?c+=W:"right"===U&&(c+=f))),x){case"top":case"center":case"bottom":h-=(j.length-1)*q}for(var G=0;G<j.length;G++)K>0&&t.strokeText(j[G],c,h),t.fillText(j[G],c,h),h+=q}else K>0&&t.strokeText(u,c,h),t.fillText(u,c,h);0!==d&&(t.rotate(-d),t.translate(-s,-l))}}};var qu={drawNode:function(t,e,r){var n,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,c=e._private,h=c.rscratch,u=e.position();if(Q(u.x)&&Q(u.y)&&(!s||e.visible())){var d,p,f=s?e.effectiveOpacity():1,g=l.usePaths(),m=!1,y=e.padding();n=e.width()+2*y,i=e.height()+2*y,r&&(p=r,t.translate(-p.x1,-p.y1));for(var v=e.pstyle("background-image").value,b=new Array(v.length),x=new Array(v.length),T=0,w=0;w<v.length;w++){var k=v[w];if(b[w]=null!=k&&"none"!==k){var C=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",w);T++,x[w]=l.getCachedImage(k,C,function(){c.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var E=e.pstyle("background-blacken").value,S=e.pstyle("border-width").pfValue,_=e.pstyle("background-opacity").value*f,A=e.pstyle("border-color").value,R=e.pstyle("border-style").value,L=e.pstyle("border-join").value,I=e.pstyle("border-cap").value,D=e.pstyle("border-position").value,N=e.pstyle("border-dash-pattern").pfValue,M=e.pstyle("border-dash-offset").pfValue,O=e.pstyle("border-opacity").value*f,$=e.pstyle("outline-width").pfValue,P=e.pstyle("outline-color").value,B=e.pstyle("outline-style").value,F=e.pstyle("outline-opacity").value*f,z=e.pstyle("outline-offset").value,K=e.pstyle("corner-radius").value;"auto"!==K&&(K=e.pstyle("corner-radius").pfValue);var j=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_;l.eleFillStyle(t,e,r)},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;l.colorStrokeStyle(t,A[0],A[1],A[2],e)},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;l.colorStrokeStyle(t,P[0],P[1],P[2],e)},U=function(t,e,r,n){var i,a=l.nodePathCache=l.nodePathCache||[],o=Vt("polygon"===r?r+","+n.join(","):r,""+e,""+t,""+K),s=a[o],c=!1;return null!=s?(i=s,c=!0,h.pathCache=i):(i=new Path2D,a[o]=h.pathCache=i),{path:i,cacheHit:c}},G=e.pstyle("shape").strValue,Y=e.pstyle("shape-polygon-points").pfValue;if(g){t.translate(u.x,u.y);var V=U(n,i,G,Y);d=V.path,m=V.cacheHit}var H=function(){if(!m){var r=u;g&&(r={x:0,y:0}),l.nodeShapes[l.getNodeShape(e)].draw(d||t,r.x,r.y,n,i,K,h)}g?t.fill(d):t.fill()},X=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=c.backgrounding,a=0,o=0;o<x.length;o++){var s=e.cy().style().getIndexedStyle(e,"background-image-containment","value",o);n&&"over"===s||!n&&"inside"===s?a++:b[o]&&x[o].complete&&!x[o].error&&(a++,l.drawInscribedImage(t,x[o],e,o,r))}c.backgrounding=!(a===T),i!==c.backgrounding&&e.updateStyle(!1)},Z=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasPie(e)&&(l.drawPie(t,e,a),r&&(g||l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,n,i,K,h)))},J=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasStripe(e)&&(t.save(),g?t.clip(h.pathCache):(l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,n,i,K,h),t.clip()),l.drawStripe(t,e,a),t.restore(),r&&(g||l.nodeShapes[l.getNodeShape(e)].draw(t,u.x,u.y,n,i,K,h)))},tt=function(){var e=(E>0?E:-E)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f),r=E>0?0:255;0!==E&&(l.colorFillStyle(t,r,r,r,e),g?t.fill(d):t.fill())},et=function(){if(S>0){if(t.lineWidth=S,t.lineCap=I,t.lineJoin=L,t.setLineDash)switch(R){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(N),t.lineDashOffset=M;break;case"solid":case"double":t.setLineDash([])}if("center"!==D){if(t.save(),t.lineWidth*=2,"inside"===D)g?t.clip(d):t.clip();else{var e=new Path2D;e.rect(-n/2-S,-i/2-S,n+2*S,i+2*S),e.addPath(d),t.clip(e,"evenodd")}g?t.stroke(d):t.stroke(),t.restore()}else g?t.stroke(d):t.stroke();if("double"===R){t.lineWidth=S/3;var r=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(d):t.stroke(),t.globalCompositeOperation=r}t.setLineDash&&t.setLineDash([])}},rt=function(){if($>0){if(t.lineWidth=$,t.lineCap="butt",t.setLineDash)switch(B){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([])}var r=u;g&&(r={x:0,y:0});var a=l.getNodeShape(e),o=S;"inside"===D&&(o=0),"outside"===D&&(o*=2);var s,c=(n+o+($+z))/n,h=(i+o+($+z))/i,d=n*c,p=i*h,f=l.nodeShapes[a].points;if(g)s=U(d,p,a,f).path;if("ellipse"===a)l.drawEllipsePath(s||t,r.x,r.y,d,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(a)){var m=0,y=0,v=0;"round-diamond"===a?m=1.4*(o+z+$):"round-heptagon"===a?(m=1.075*(o+z+$),v=-(o/2+z+$)/35):"round-hexagon"===a?m=1.12*(o+z+$):"round-pentagon"===a?(m=1.13*(o+z+$),v=-(o/2+z+$)/15):"round-tag"===a?(m=1.12*(o+z+$),y=.07*(o/2+$+z)):"round-triangle"===a&&(m=(o+z+$)*(Math.PI/2),v=-(o+z/2+$)/Math.PI),0!==m&&(d=n*(c=(n+m)/n),["round-hexagon","round-tag"].includes(a)||(p=i*(h=(i+m)/i)));for(var b=d/2,x=p/2,T=(K="auto"===K?Mr(d,p):K)+(o+$+z)/2,w=new Array(f.length/2),k=new Array(f.length/2),C=0;C<f.length/2;C++)w[C]={x:r.x+y+b*f[2*C],y:r.y+v+x*f[2*C+1]};var E,_,A,R,L=w.length;for(_=w[L-1],E=0;E<L;E++)A=w[E%L],R=w[(E+1)%L],k[E]=jh(_,A,R,T),_=A,A=R;l.drawRoundPolygonPath(s||t,r.x+y,r.y+v,n*c,i*h,f,k)}else if(["roundrectangle","round-rectangle"].includes(a))K="auto"===K?Nr(d,p):K,l.drawRoundRectanglePath(s||t,r.x,r.y,d,p,K+(o+$+z)/2);else if(["cutrectangle","cut-rectangle"].includes(a))K="auto"===K?8:K,l.drawCutRectanglePath(s||t,r.x,r.y,d,p,null,K+(o+$+z)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(a))K="auto"===K?Nr(d,p):K,l.drawBottomRoundRectanglePath(s||t,r.x,r.y,d,p,K+(o+$+z)/2);else if("barrel"===a)l.drawBarrelPath(s||t,r.x,r.y,d,p);else if(a.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(a)){f=Tr(wr(f,(o+$+z)/n)),l.drawPolygonPath(s||t,r.x,r.y,n,i,f)}else{f=Tr(wr(f,-((o+$+z)/n))),l.drawPolygonPath(s||t,r.x,r.y,n,i,f)}if(g?t.stroke(s):t.stroke(),"double"===B){t.lineWidth=o/3;var I=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(s):t.stroke(),t.globalCompositeOperation=I}t.setLineDash&&t.setLineDash([])}};if("yes"===e.pstyle("ghost").value){var nt=e.pstyle("ghost-offset-x").pfValue,it=e.pstyle("ghost-offset-y").pfValue,at=e.pstyle("ghost-opacity").value,ot=at*f;t.translate(nt,it),W(),rt(),j(at*_),H(),X(ot,!0),q(at*O),et(),Z(0!==E||0!==S),J(0!==E||0!==S),X(ot,!1),tt(ot),t.translate(-nt,-it)}g&&t.translate(-u.x,-u.y),o&&l.drawNodeUnderlay(t,e,u,n,i),g&&t.translate(u.x,u.y),W(),rt(),j(),H(),X(f,!0),q(),et(),Z(0!==E||0!==S),J(0!==E||0!==S),X(f,!1),tt(),g&&t.translate(-u.x,-u.y),l.drawElementText(t,e,null,a),o&&l.drawNodeOverlay(t,e,u,n,i),r&&t.translate(p.x1,p.y1)}}},Wu=function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(e,r,n,i,a){if(r.visible()){var o=r.pstyle("".concat(t,"-padding")).pfValue,s=r.pstyle("".concat(t,"-opacity")).value,l=r.pstyle("".concat(t,"-color")).value,c=r.pstyle("".concat(t,"-shape")).value,h=r.pstyle("".concat(t,"-corner-radius")).value;if(s>0){if(n=n||r.position(),null==i||null==a){var u=r.padding();i=r.width()+2*u,a=r.height()+2*u}this.colorFillStyle(e,l[0],l[1],l[2],s),this.nodeShapes[c].draw(e,n.x,n.y,i+2*o,a+2*o,h),e.fill()}}}};qu.drawNodeOverlay=Wu("overlay"),qu.drawNodeUnderlay=Wu("underlay"),qu.hasPie=function(t){return(t=t[0])._private.hasPie},qu.hasStripe=function(t){return(t=t[0])._private.hasStripe},qu.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i,a=e.cy().style(),o=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),l=e.pstyle("pie-start-angle").pfValue,c=n.x,h=n.y,u=e.width(),d=e.height(),p=Math.min(u,d)/2,f=0;if(this.usePaths()&&(c=0,h=0),"%"===o.units?p*=o.pfValue:void 0!==o.pfValue&&(p=o.pfValue/2),"%"===s.units?i=p*s.pfValue:void 0!==s.pfValue&&(i=s.pfValue/2),!(i>=p))for(var g=1;g<=a.pieBackgroundN;g++){var m=e.pstyle("pie-"+g+"-background-size").value,y=e.pstyle("pie-"+g+"-background-color").value,v=e.pstyle("pie-"+g+"-background-opacity").value*r,b=m/100;b+f>1&&(b=1-f);var x=1.5*Math.PI+2*Math.PI*f,T=(x+=l)+2*Math.PI*b;0===m||f>=1||f+b>1||(0===i?(t.beginPath(),t.moveTo(c,h),t.arc(c,h,p,x,T),t.closePath()):(t.beginPath(),t.arc(c,h,p,x,T),t.arc(c,h,i,T,x,!0),t.closePath()),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),f+=b)}},qu.drawStripe=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=n.x,o=n.y,s=e.width(),l=e.height(),c=0,h=this.usePaths();t.save();var u=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(u){case"vertical":break;case"righward":t.rotate(-Math.PI/2)}var p=s,f=l;"%"===d.units?(p*=d.pfValue,f*=d.pfValue):void 0!==d.pfValue&&(p=d.pfValue,f=d.pfValue),h&&(a=0,o=0),o-=p/2,a-=f/2;for(var g=1;g<=i.stripeBackgroundN;g++){var m=e.pstyle("stripe-"+g+"-background-size").value,y=e.pstyle("stripe-"+g+"-background-color").value,v=e.pstyle("stripe-"+g+"-background-opacity").value*r,b=m/100;b+c>1&&(b=1-c),0===m||c>=1||c+b>1||(t.beginPath(),t.rect(a,o+f*c,p,f*b),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),c+=b)}t.restore()};var Uu,Gu={};function Yu(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}function Vu(t,e,r){void 0===r&&(r=e);var n=t.makeOffscreenCanvas(e,r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function Hu(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}}}function Xu(t,e){return!!e.picking||"solid"===t.pstyle("background-fill").value&&("none"===t.pstyle("background-image").strValue&&(0===t.pstyle("border-width").value||(0===t.pstyle("border-opacity").value||"solid"===t.pstyle("border-style").value)))}function Zu(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Qu(t,e,r){var n=t[0]/255,i=t[1]/255,a=t[2]/255,o=e,s=r||new Array(4);return s[0]=n*o,s[1]=i*o,s[2]=a*o,s[3]=o,s}function Ju(t,e){var r=e||new Array(4);return r[0]=(255&t)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function td(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function ed(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function rd(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function nd(t,e,r,n,i,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*n,i);case t.INT:return new Int32Array(r.buffer,a*n,i)}}function id(t,e,r,n){var i=l(ed(t,r),3),a=i[0],o=i[1],s=i[2],c=rd(t,o,e*a),h=a*s,u=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,e*h,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),o===t.FLOAT?t.vertexAttribPointer(n,a,o,!1,h,0):o===t.INT&&t.vertexAttribIPointer(n,a,o,h,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var d=new Array(e),p=0;p<e;p++)d[p]=nd(t,o,c,h,a,p);return u.dataArray=c,u.stride=h,u.size=a,u.getView=function(t){return d[t]},u.setPoint=function(t,e,r){var n=d[t];n[0]=e,n[1]=r},u.bufferSubData=function(e){t.bindBuffer(t.ARRAY_BUFFER,u),e?t.bufferSubData(t.ARRAY_BUFFER,0,c,0,e*a):t.bufferSubData(t.ARRAY_BUFFER,0,c)},u}Gu.getPixelRatio=function(){var t=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r},Gu.paintCache=function(t){for(var e,r=this.paintCaches=this.paintCaches||[],n=!0,i=0;i<r.length;i++)if((e=r[i]).context===t){n=!1;break}return n&&(e={context:t},r.push(e)),e},Gu.createGradientStyleFor=function(t,e,r,n,i){var a,o=this.usePaths(),s=r.pstyle(e+"-gradient-stop-colors").value,l=r.pstyle(e+"-gradient-stop-positions").pfValue;if("radial-gradient"===n)if(r.isEdge()){var c=r.sourceEndpoint(),h=r.targetEndpoint(),u=r.midpoint(),d=Xe(c,u),p=Xe(h,u);a=t.createRadialGradient(u.x,u.y,0,u.x,u.y,Math.max(d,p))}else{var f=o?{x:0,y:0}:r.position(),g=r.paddedWidth(),m=r.paddedHeight();a=t.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(g,m))}else if(r.isEdge()){var y=r.sourceEndpoint(),v=r.targetEndpoint();a=t.createLinearGradient(y.x,y.y,v.x,v.y)}else{var b=o?{x:0,y:0}:r.position(),x=r.paddedWidth()/2,T=r.paddedHeight()/2;switch(r.pstyle("background-gradient-direction").value){case"to-bottom":a=t.createLinearGradient(b.x,b.y-T,b.x,b.y+T);break;case"to-top":a=t.createLinearGradient(b.x,b.y+T,b.x,b.y-T);break;case"to-left":a=t.createLinearGradient(b.x+x,b.y,b.x-x,b.y);break;case"to-right":a=t.createLinearGradient(b.x-x,b.y,b.x+x,b.y);break;case"to-bottom-right":case"to-right-bottom":a=t.createLinearGradient(b.x-x,b.y-T,b.x+x,b.y+T);break;case"to-top-right":case"to-right-top":a=t.createLinearGradient(b.x-x,b.y+T,b.x+x,b.y-T);break;case"to-bottom-left":case"to-left-bottom":a=t.createLinearGradient(b.x+x,b.y-T,b.x-x,b.y+T);break;case"to-top-left":case"to-left-top":a=t.createLinearGradient(b.x+x,b.y+T,b.x-x,b.y-T)}}if(!a)return null;for(var w=l.length===s.length,k=s.length,C=0;C<k;C++)a.addColorStop(w?l[C]:C/(k-1),"rgba("+s[C][0]+","+s[C][1]+","+s[C][2]+","+i+")");return a},Gu.gradientFillStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"background",e,r,n);if(!i)return null;t.fillStyle=i},Gu.colorFillStyle=function(t,e,r,n,i){t.fillStyle="rgba("+e+","+r+","+n+","+i+")"},Gu.eleFillStyle=function(t,e,r){var n=e.pstyle("background-fill").value;if("linear-gradient"===n||"radial-gradient"===n)this.gradientFillStyle(t,e,n,r);else{var i=e.pstyle("background-color").value;this.colorFillStyle(t,i[0],i[1],i[2],r)}},Gu.gradientStrokeStyle=function(t,e,r,n){var i=this.createGradientStyleFor(t,"line",e,r,n);if(!i)return null;t.strokeStyle=i},Gu.colorStrokeStyle=function(t,e,r,n,i){t.strokeStyle="rgba("+e+","+r+","+n+","+i+")"},Gu.eleStrokeStyle=function(t,e,r){var n=e.pstyle("line-fill").value;if("linear-gradient"===n||"radial-gradient"===n)this.gradientStrokeStyle(t,e,n,r);else{var i=e.pstyle("line-color").value;this.colorStrokeStyle(t,i[0],i[1],i[2],r)}},Gu.matchCanvasSize=function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),i=n[2],a=n[3],o=e.getPixelRatio(),s=e.motionBlurPxRatio;t!==e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]&&t!==e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG]||(o=s);var l,c=i*o,h=a*o;if(c!==e.canvasWidth||h!==e.canvasHeight){e.fontCaches=null;var u=r.canvasContainer;u.style.width=i+"px",u.style.height=a+"px";for(var d=0;d<e.CANVAS_LAYERS;d++)(l=r.canvases[d]).width=c,l.height=h,l.style.width=i+"px",l.style.height=a+"px";for(d=0;d<e.BUFFER_COUNT;d++)(l=r.bufferCanvases[d]).width=c,l.height=h,l.style.width=i+"px",l.style.height=a+"px";e.textureMult=1,o<=1&&(l=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,l.width=c*e.textureMult,l.height=h*e.textureMult),e.canvasWidth=c,e.canvasHeight=h,e.pixelRatio=o}},Gu.renderTo=function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},Gu.clearCanvas=function(){var t=this,e=t.data;function r(e){e.clearRect(0,0,t.canvasWidth,t.canvasHeight)}r(e.contexts[t.NODE]),r(e.contexts[t.DRAG])},Gu.render=function(t){var e=this;t=t||ue();var r=e.cy,n=t.forcedContext,i=t.drawAllLayers,a=t.drawOnlyNodeLayer,o=t.forcedZoom,s=t.forcedPan,l=void 0===t.forcedPxRatio?this.getPixelRatio():t.forcedPxRatio,c=e.data,h=c.canvasNeedsRedraw,u=e.textureOnViewport&&!n&&(e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming),d=void 0!==t.motionBlur?t.motionBlur:e.motionBlur,p=e.motionBlurPxRatio,f=r.hasCompoundNodes(),g=e.hoverData.draggingEles,m=!(!e.hoverData.selecting&&!e.touchData.selecting),y=d=d&&!n&&e.motionBlurEnabled&&!m;n||(e.prevPxRatio!==l&&(e.invalidateContainerClientCoordsCache(),e.matchCanvasSize(e.container),e.redrawHint("eles",!0),e.redrawHint("drag",!0)),e.prevPxRatio=l),!n&&e.motionBlurTimeout&&clearTimeout(e.motionBlurTimeout),d&&(null==e.mbFrames&&(e.mbFrames=0),e.mbFrames++,e.mbFrames<3&&(y=!1),e.mbFrames>e.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!u&&(h[e.NODE]=!0,h[e.SELECT_BOX]=!0);var v=r.style(),b=r.zoom(),x=void 0!==o?o:b,T=r.pan(),w={x:T.x,y:T.y},k={zoom:b,pan:{x:T.x,y:T.y}},C=e.prevViewport;void 0===C||k.zoom!==C.zoom||k.pan.x!==C.pan.x||k.pan.y!==C.pan.y||g&&!f||(e.motionBlurPxRatio=1),s&&(w=s),x*=l,w.x*=l,w.y*=l;var E=e.getCachedZSortedEles();function S(t,r,n,i,a){var o=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",e.colorFillStyle(t,255,255,255,e.motionBlurTransparency),t.fillRect(r,n,i,a),t.globalCompositeOperation=o}function _(t,r){var a,l,h,u;e.clearingMotionBlur||t!==c.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]&&t!==c.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]?(a=w,l=x,h=e.canvasWidth,u=e.canvasHeight):(a={x:T.x*p,y:T.y*p},l=b*p,h=e.canvasWidth*p,u=e.canvasHeight*p),t.setTransform(1,0,0,1,0,0),"motionBlur"===r?S(t,0,0,h,u):n||void 0!==r&&!r||t.clearRect(0,0,h,u),i||(t.translate(a.x,a.y),t.scale(l,l)),s&&t.translate(s.x,s.y),o&&t.scale(o,o)}if(u||(e.textureDrawLastFrame=!1),u){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var A=e.data.bufferContexts[e.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult}),(k=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}h[e.DRAG]=!1,h[e.NODE]=!1;var R=c.contexts[e.NODE],L=e.textureCache.texture;k=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),d?S(R,0,0,k.width,k.height):R.clearRect(0,0,k.width,k.height);var I=v.core("outside-texture-bg-color").value,D=v.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,I[0],I[1],I[2],D),R.fillRect(0,0,k.width,k.height);b=r.zoom();_(R,!1),R.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),R.drawImage(L,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else e.textureOnViewport&&!n&&(e.textureCache=null);var N=r.extent(),M=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),O=e.hideEdgesOnViewport&&M,$=[];if($[e.NODE]=!h[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,$[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),$[e.DRAG]=!h[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,$[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),h[e.NODE]||i||a||$[e.NODE]){var P=d&&!$[e.NODE]&&1!==p;_(R=n||(P?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:c.contexts[e.NODE]),d&&!P?"motionBlur":void 0),O?e.drawCachedNodes(R,E.nondrag,l,N):e.drawLayeredElements(R,E.nondrag,l,N),e.debug&&e.drawDebugPoints(R,E.nondrag),i||d||(h[e.NODE]=!1)}if(!a&&(h[e.DRAG]||i||$[e.DRAG])){P=d&&!$[e.DRAG]&&1!==p;_(R=n||(P?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:c.contexts[e.DRAG]),d&&!P?"motionBlur":void 0),O?e.drawCachedNodes(R,E.drag,l,N):e.drawCachedElements(R,E.drag,l,N),e.debug&&e.drawDebugPoints(R,E.drag),i||d||(h[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,_),d&&1!==p){var B=c.contexts[e.NODE],F=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],z=c.contexts[e.DRAG],K=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],j=function(t,r,n){t.setTransform(1,0,0,1,0,0),n||!y?t.clearRect(0,0,e.canvasWidth,e.canvasHeight):S(t,0,0,e.canvasWidth,e.canvasHeight);var i=p;t.drawImage(r,0,0,e.canvasWidth*i,e.canvasHeight*i,0,0,e.canvasWidth,e.canvasHeight)};(h[e.NODE]||$[e.NODE])&&(j(B,F,$[e.NODE]),h[e.NODE]=!1),(h[e.DRAG]||$[e.DRAG])&&(j(z,K,$[e.DRAG]),h[e.DRAG]=!1)}e.prevViewport=k,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!u,e.mbFrames=0,h[e.NODE]=!0,h[e.DRAG]=!0,e.redraw()},100)),n||r.emit("render")},Gu.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,i=r.data,a=n.style(),o=t.drawOnlyNodeLayer,s=t.drawAllLayers,l=i.canvasNeedsRedraw,c=t.forcedContext;if(r.showFps||!o&&l[r.SELECT_BOX]&&!s){var h=c||i.contexts[r.SELECT_BOX];if(e(h),1==r.selection[4]&&(r.hoverData.selecting||r.touchData.selecting)){var u=r.cy.zoom(),d=a.core("selection-box-border-width").value/u;h.lineWidth=d,h.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",h.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),d>0&&(h.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",h.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(i.bgActivePosistion&&!r.hoverData.selecting){u=r.cy.zoom();var p=i.bgActivePosistion;h.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,a.core("active-bg-size").pfValue/u,0,2*Math.PI),h.fill()}var f=r.lastRedrawTime;if(r.showFps&&f){f=Math.round(f);var g=Math.round(1e3/f),m="1 frame = "+f+" ms = "+g+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!Uu){var y=h.measureText(m);Uu=y.actualBoundingBoxAscent}h.fillText(m,0,Uu);h.strokeRect(0,Uu+10,250,20),h.fillRect(0,Uu+10,250*Math.min(g/60,1),20)}s||(l[r.SELECT_BOX]=!1)}};var ad="undefined"!=typeof Float32Array?Float32Array:Array;function od(){var t=new ad(9);return ad!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function sd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function ld(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=r[0],p=r[1];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=d*n+p*o+c,t[7]=d*i+p*s+h,t[8]=d*a+p*l+u,t}function cd(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],h=e[7],u=e[8],d=Math.sin(r),p=Math.cos(r);return t[0]=p*n+d*o,t[1]=p*i+d*s,t[2]=p*a+d*l,t[3]=p*o-d*n,t[4]=p*s-d*i,t[5]=p*l-d*a,t[6]=c,t[7]=h,t[8]=u,t}function hd(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ud=function(){return a(function t(e,r,n,a){i(this,t),this.debugID=Math.floor(1e4*Math.random()),this.r=e,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=a(e,r,r),this.scratch=a(e,r,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(t){var e=t.w,r=t.h,n=this.texHeight,i=this.texSize,a=n/r,o=e*a,s=r*a;return o>i&&(o=e*(a=i/e),s=r*a),{scale:a,texW:o,texH:s}}},{key:"draw",value:function(t,e,r){var n=this;if(this.locked)throw new Error("can't draw, atlas is locked");var i=this.texSize,a=this.texRows,o=this.texHeight,s=this.getScale(e),l=s.scale,c=s.texW,h=s.texH,u=function(t,n){if(r&&n){var i=n.context,a=t.x,s=t.row,c=a,h=o*s;i.save(),i.translate(c,h),i.scale(l,l),r(i,e),i.restore()}},d=[null,null],p=function(){u(n.freePointer,n.canvas),d[0]={x:n.freePointer.x,y:n.freePointer.row*o,w:c,h},d[1]={x:n.freePointer.x+c,y:n.freePointer.row*o,w:0,h},n.freePointer.x+=c,n.freePointer.x==i&&(n.freePointer.x=0,n.freePointer.row++)},f=function(){n.freePointer.x=0,n.freePointer.row++};if(this.freePointer.x+c<=i)p();else{if(this.freePointer.row>=a-1)return!1;this.freePointer.x===i?(f(),p()):this.enableWrapping?function(){var t=n.scratch,e=n.canvas;t.clear(),u({x:0,row:0},t);var r=i-n.freePointer.x,a=c-r,s=o,l=n.freePointer.x,p=n.freePointer.row*o,f=r;e.context.drawImage(t,0,0,f,s,l,p,f,s),d[0]={x:l,y:p,w:f,h};var g=r,m=(n.freePointer.row+1)*o,y=a;e&&e.context.drawImage(t,g,0,y,s,0,m,y,s),d[1]={x:0,y:m,w:y,h},n.freePointer.x=a,n.freePointer.row++}():(f(),p())}return this.keyToLocation.set(t,d),this.needsBuffer=!0,d}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(t){if(this.locked)return!1;var e=this.texSize,r=this.texRows,n=this.getScale(t).texW;return!(this.freePointer.x+n>e)||this.freePointer.row<r-1}},{key:"bufferIfNeeded",value:function(t){this.texture||(this.texture=function(t){var e=t.createTexture();return e.buffer=function(r){t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},e.deleteTexture=function(){t.deleteTexture(e)},e}(t,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))}},{key:"dispose",value:function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0}}])}(),dd=function(){return a(function t(e,r,n,a){i(this,t),this.r=e,this.texSize=r,this.texRows=n,this.createTextureCanvas=a,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set},[{key:"getKeys",value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:"_createAtlas",value:function(){var t=this.r,e=this.texSize,r=this.texRows,n=this.createTextureCanvas;return new ud(t,e,r,n)}},{key:"_getScratchCanvas",value:function(){if(!this.scratch){var t=this.r,e=this.texSize,r=this.texRows,n=this.createTextureCanvas,i=Math.floor(e/r);this.scratch=n(t,e,i,"scratch")}return this.scratch}},{key:"draw",value:function(t,e,r){var n=this.styleKeyToAtlas.get(t);return n||((n=this.atlases[this.atlases.length-1])&&n.canFit(e)||(n&&n.lock(),n=this._createAtlas(),this.atlases.push(n)),n.draw(t,e,r),this.styleKeyToAtlas.set(t,n)),n}},{key:"getAtlas",value:function(t){return this.styleKeyToAtlas.get(t)}},{key:"hasAtlas",value:function(t){return this.styleKeyToAtlas.has(t)}},{key:"markKeyForGC",value:function(t){this.markedKeys.add(t)}},{key:"gc",value:function(){var t=this,e=this.markedKeys;if(0!==e.size){var r,n=[],i=new Map,a=null,s=o(this.atlases);try{var h=function(){var s,h,u=r.value,d=u.getKeys(),p=(h=d,(s=e).intersection?s.intersection(h):new Set(c(s).filter(function(t){return h.has(t)})));if(0===p.size)return n.push(u),d.forEach(function(t){return i.set(t,u)}),1;a||(a=t._createAtlas(),n.push(a));var f,g=o(d);try{for(g.s();!(f=g.n()).done;){var m=f.value;if(!p.has(m)){var y=l(u.getOffsets(m),2),v=y[0],b=y[1];a.canFit({w:v.w+b.w,h:v.h})||(a.lock(),a=t._createAtlas(),n.push(a)),u.canvas&&(t._copyTextureToNewAtlas(m,u,a),i.set(m,a))}}}catch(x){g.e(x)}finally{g.f()}u.dispose()};for(s.s();!(r=s.n()).done;)h()}catch(u){s.e(u)}finally{s.f()}this.atlases=n,this.styleKeyToAtlas=i,this.markedKeys=new Set}else console.log("nothing to garbage collect")}},{key:"_copyTextureToNewAtlas",value:function(t,e,r){var n=l(e.getOffsets(t),2),i=n[0],a=n[1];if(0===a.w)r.draw(t,i,function(t){t.drawImage(e.canvas,i.x,i.y,i.w,i.h,0,0,i.w,i.h)});else{var o=this._getScratchCanvas();o.clear(),o.context.drawImage(e.canvas,i.x,i.y,i.w,i.h,0,0,i.w,i.h),o.context.drawImage(e.canvas,a.x,a.y,a.w,a.h,i.w,0,a.w,a.h);var s=i.w+a.w,c=i.h;r.draw(t,{w:s,h:c},function(t){t.drawImage(o,0,0,s,c,0,0,s,c)})}}},{key:"getCounts",value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])}();var pd=function(){return a(function t(e,r){i(this,t),this.r=e,this.globalOptions=r,this.atlasSize=r.webglTexSize,this.maxAtlasesPerBatch=r.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map},[{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"addAtlasCollection",value:function(t,e){var r=this.globalOptions,n=r.webglTexSize,i=r.createTextureCanvas,a=e.texRows,o=this._cacheScratchCanvas(i),s=new dd(this.r,n,a,o);this.collections.set(t,s)}},{key:"addRenderType",value:function(t,e){var r=e.collection;if(!this.collections.has(r))throw new Error("invalid atlas collection name '".concat(r,"'"));var n=this.collections.get(r),i=bt({type:t,atlasCollection:n},e);this.renderTypes.set(t,i)}},{key:"getRenderTypeOpts",value:function(t){return this.renderTypes.get(t)}},{key:"getAtlasCollection",value:function(t){return this.collections.get(t)}},{key:"_cacheScratchCanvas",value:function(t){var e=-1,r=-1,n=null;return function(i,a,o,s){return s?(n&&a==e&&o==r||(e=a,r=o,n=t(i,a,o)),n):t(i,a,o)}}},{key:"_key",value:function(t,e){return"".concat(t,"-").concat(e)}},{key:"invalidate",value:function(t){var e,r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.forceRedraw,a=void 0!==i&&i,s=n.filterEle,l=void 0===s?function(){return!0}:s,c=n.filterType,h=void 0===c?function(){return!0}:c,u=!1,d=!1,p=o(t);try{for(p.s();!(e=p.n()).done;){var f=e.value;if(l(f)){var g,m=o(this.renderTypes.values());try{var y=function(){var t=g.value,e=t.type;if(h(e)){var n=r.collections.get(t.collection),i=t.getKey(f),o=Array.isArray(i)?i:[i];if(a)o.forEach(function(t){return n.markKeyForGC(t)}),d=!0;else{var s=t.getID?t.getID(f):f.id(),l=r._key(e,s),c=r.typeAndIdToKey.get(l);void 0===c||Zu(o,c)||(u=!0,r.typeAndIdToKey.delete(l),c.forEach(function(t){return n.markKeyForGC(t)}))}}};for(m.s();!(g=m.n()).done;)y()}catch(v){m.e(v)}finally{m.f()}}}}catch(v){p.e(v)}finally{p.f()}return d&&(this.gc(),u=!1),u}},{key:"gc",value:function(){var t,e=o(this.collections.values());try{for(e.s();!(t=e.n()).done;){t.value.gc()}}catch(r){e.e(r)}finally{e.f()}}},{key:"getOrCreateAtlas",value:function(t,e,r,n){var i=this.renderTypes.get(e),a=this.collections.get(i.collection),o=!1,s=a.draw(n,r,function(e){i.drawClipped?(e.save(),e.beginPath(),e.rect(0,0,r.w,r.h),e.clip(),i.drawElement(e,t,r,!0,!0),e.restore()):i.drawElement(e,t,r,!0,!0),o=!0});if(o){var l=i.getID?i.getID(t):t.id(),c=this._key(e,l);this.typeAndIdToKey.has(c)?this.typeAndIdToKey.get(c).push(n):this.typeAndIdToKey.set(c,[n])}return s}},{key:"getAtlasInfo",value:function(t,e){var r=this,n=this.renderTypes.get(e),i=n.getKey(t);return(Array.isArray(i)?i:[i]).map(function(i){var a=n.getBoundingBox(t,i),o=r.getOrCreateAtlas(t,e,a,i),s=l(o.getOffsets(i),2),c=s[0];return{atlas:o,tex:c,tex1:c,tex2:s[1],bb:a}})}},{key:"getDebugInfo",value:function(){var t,e=[],r=o(this.collections);try{for(r.s();!(t=r.n()).done;){var n=l(t.value,2),i=n[0],a=n[1].getCounts(),s=a.keyCount,c=a.atlasCount;e.push({type:i,keyCount:s,atlasCount:c})}}catch(h){r.e(h)}finally{r.f()}return e}}])}(),fd=function(){return a(function t(e){i(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,e){return e})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(t)}},{key:"getAtlasIndexForBatch",value:function(t){var e=this.batchAtlases.indexOf(t);if(e<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),e=this.batchAtlases.length-1}return e}}])}(),gd={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},md=1,yd=2,vd=function(){return a(function t(e,r,n){i(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=Vu,this.atlasManager=new pd(e,n),this.batchManager=new fd(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(gd.SCREEN),this.pickingProgram=this._createShaderProgram(gd.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(t,e){this.atlasManager.addAtlasCollection(t,e)}},{key:"addTextureAtlasRenderType",value:function(t,e){this.atlasManager.addRenderType(t,e)}},{key:"addSimpleShapeRenderType",value:function(t,e){this.simpleShapeOptions.set(t,e)}},{key:"invalidate",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,r=this.atlasManager;return e?r.invalidate(t,{filterType:function(t){return t===e},forceRedraw:!0}):r.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var e=this.gl,r="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),n=this.batchManager.getIndexArray(),i="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(n.map(function(t){return"uniform sampler2D uTexture".concat(t,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x<q.y)? 1.570796327 : 0.0;\n for( int i=0; i<5; i++ ) {\n vec2 cs = vec2(cos(w),sin(w));\n vec2 u = ab*vec2( cs.x,cs.y);\n vec2 v = ab*vec2(-cs.y,cs.x);\n w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));\n }\n \n // compute final point and distance\n float d = length(p-ab*vec2(cos(w),sin(w)));\n \n // return signed distance\n return (dot(p/ab,p/ab)>1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(n.map(function(t){return"if(vAtlasId == ".concat(t,") outColor = texture(uTexture").concat(t,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(t.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),a=function(t,e,r){var n=Yu(t,t.VERTEX_SHADER,e),i=Yu(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,n),t.attachShader(a,i),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw new Error("Could not initialize shaders");return a}(e,r,i);a.aPosition=e.getAttribLocation(a,"aPosition"),a.aIndex=e.getAttribLocation(a,"aIndex"),a.aVertType=e.getAttribLocation(a,"aVertType"),a.aTransform=e.getAttribLocation(a,"aTransform"),a.aAtlasId=e.getAttribLocation(a,"aAtlasId"),a.aTex=e.getAttribLocation(a,"aTex"),a.aPointAPointB=e.getAttribLocation(a,"aPointAPointB"),a.aPointCPointD=e.getAttribLocation(a,"aPointCPointD"),a.aLineWidth=e.getAttribLocation(a,"aLineWidth"),a.aColor=e.getAttribLocation(a,"aColor"),a.aCornerRadius=e.getAttribLocation(a,"aCornerRadius"),a.aBorderColor=e.getAttribLocation(a,"aBorderColor"),a.uPanZoomMatrix=e.getUniformLocation(a,"uPanZoomMatrix"),a.uAtlasSize=e.getUniformLocation(a,"uAtlasSize"),a.uBGColor=e.getUniformLocation(a,"uBGColor"),a.uZoom=e.getUniformLocation(a,"uZoom"),a.uTextures=[];for(var o=0;o<this.batchManager.getMaxAtlasesPerBatch();o++)a.uTextures.push(e.getUniformLocation(a,"uTexture".concat(o)));return a}},{key:"_createVAO",value:function(){var t=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=t.length/2;var e=this.maxInstances,r=this.gl,n=this.program,i=r.createVertexArray();return r.bindVertexArray(i),function(t,e,r,n){var i=l(ed(t,e),2),a=i[0],o=i[1],s=rd(t,o,n),c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,s,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,a,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,a,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null)}(r,"vec2",n.aPosition,t),this.transformBuffer=function(t,e,r){for(var n=new Float32Array(9*e),i=new Array(e),a=0;a<e;a++){var o=9*a*4;i[a]=new Float32Array(n.buffer,o,9)}var s=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,s),t.bufferData(t.ARRAY_BUFFER,n.byteLength,t.DYNAMIC_DRAW);for(var l=0;l<3;l++){var c=r+l;t.enableVertexAttribArray(c),t.vertexAttribPointer(c,3,t.FLOAT,!1,36,12*l),t.vertexAttribDivisor(c,1)}return t.bindBuffer(t.ARRAY_BUFFER,null),s.getMatrixView=function(t){return i[t]},s.setData=function(t,e){i[e].set(t,0)},s.bufferSubData=function(){t.bindBuffer(t.ARRAY_BUFFER,s),t.bufferSubData(t.ARRAY_BUFFER,0,n)},s}(r,e,n.aTransform),this.indexBuffer=id(r,e,"vec4",n.aIndex),this.vertTypeBuffer=id(r,e,"int",n.aVertType),this.atlasIdBuffer=id(r,e,"int",n.aAtlasId),this.texBuffer=id(r,e,"vec4",n.aTex),this.pointAPointBBuffer=id(r,e,"vec4",n.aPointAPointB),this.pointCPointDBuffer=id(r,e,"vec4",n.aPointCPointD),this.lineWidthBuffer=id(r,e,"vec2",n.aLineWidth),this.colorBuffer=id(r,e,"vec4",n.aColor),this.cornerRadiusBuffer=id(r,e,"vec4",n.aCornerRadius),this.borderColorBuffer=id(r,e,"vec4",n.aBorderColor),r.bindVertexArray(null),i}},{key:"buffers",get:function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(t){return dt(t,"Buffer")}).map(function(e){return t[e]})),this._buffers}},{key:"startFrame",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gd.SCREEN;this.panZoomMatrix=t,this.renderTarget=e,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,e){return!!t.visible()&&(!e||!e.isVisible||e.isVisible(t))}},{key:"drawTexture",value:function(t,e,r){var n=this.atlasManager,i=this.batchManager,a=n.getRenderTypeOpts(r);if(this._isVisible(t,a)&&(!t.isEdge()||this._isValidEdge(t))){if(this.renderTarget.picking&&a.getTexPickingMode){var s=a.getTexPickingMode(t);if(s===md)return;if(s==yd)return void this.drawPickingRectangle(t,e,r)}var c,h=o(n.getAtlasInfo(t,r));try{for(h.s();!(c=h.n()).done;){var u=c.value,d=u.atlas,p=u.tex1,f=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var g=i.getAtlasIndexForBatch(d),m=0,y=[[p,!0],[f,!1]];m<y.length;m++){var v=l(y[m],2),b=v[0],x=v[1];if(0!=b.w){var T=this.instanceCount;this.vertTypeBuffer.getView(T)[0]=0,Ju(e,this.indexBuffer.getView(T)),this.atlasIdBuffer.getView(T)[0]=g;var w=this.texBuffer.getView(T);w[0]=b.x,w[1]=b.y,w[2]=b.w,w[3]=b.h;var k=this.transformBuffer.getMatrixView(T);this.setTransformMatrix(t,k,a,u,x),this.instanceCount++,x||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(C){h.e(C)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(t,e,r,n){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=0;if(r.shapeProps&&r.shapeProps.padding&&(a=t.pstyle(r.shapeProps.padding).pfValue),n){var o=n.bb,s=n.tex1,l=n.tex2,c=s.w/(s.w+l.w);i||(c=1-c);var h=this._getAdjustedBB(o,a,i,c);this._applyTransformMatrix(e,h,r,t)}else{var u=r.getBoundingBox(t),d=this._getAdjustedBB(u,a,!0,1);this._applyTransformMatrix(e,d,r,t)}}},{key:"_applyTransformMatrix",value:function(t,e,r,n){var i,a;sd(t);var o=r.getRotation?r.getRotation(n):0;if(0!==o){var s=r.getRotationPoint(n);ld(t,t,[s.x,s.y]),cd(t,t,o);var l=r.getRotationOffset(n);i=l.x+(e.xOffset||0),a=l.y+(e.yOffset||0)}else i=e.x1,a=e.y1;ld(t,t,[i,a]),hd(t,t,[e.w,e.h])}},{key:"_getAdjustedBB",value:function(t,e,r,n){var i=t.x1,a=t.y1,o=t.w,s=t.h;e&&(i-=e,a-=e,o+=2*e,s+=2*e);var l=0,c=o*n;return r&&n<1?o=c:!r&&n<1&&(i+=l=o-c,o=c),{x1:i,y1:a,w:o,h:s,xOffset:l,yOffset:t.yOffset}}},{key:"drawPickingRectangle",value:function(t,e,r){var n=this.atlasManager.getRenderTypeOpts(r),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=4,Ju(e,this.indexBuffer.getView(i)),Qu([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(t,a,n),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,e,r){var n=this.simpleShapeOptions.get(r);if(this._isVisible(t,n)){var i=n.shapeProps,a=this._getVertTypeForShape(t,i.shape);if(void 0===a||n.isSimple&&!n.isSimple(t,this.renderTarget))this.drawTexture(t,e,r);else{var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=a,5===a||6===a){var s=n.getBoundingBox(t),l=this._getCornerRadius(t,i.radius,s),c=this.cornerRadiusBuffer.getView(o);c[0]=l,c[1]=l,c[2]=l,c[3]=l,6===a&&(c[0]=0,c[2]=0)}Ju(e,this.indexBuffer.getView(o));var h=this.renderTarget.picking?1:"node-body"===r?t.effectiveOpacity():1,u=this.renderTarget.picking?1:t.pstyle(i.opacity).value*h;Qu(t.pstyle(i.color).value,u,this.colorBuffer.getView(o));var d=this.lineWidthBuffer.getView(o);if(d[0]=0,d[1]=0,i.border){var p=t.pstyle("border-width").value;if(p>0){Qu(t.pstyle("border-color").value,h*t.pstyle("border-opacity").value,this.borderColorBuffer.getView(o));var f=t.pstyle("border-position").value;if("inside"===f)d[0]=0,d[1]=-p;else if("outside"===f)d[0]=p,d[1]=0;else{var g=p/2;d[0]=g,d[1]=-g}}}var m=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(t,m,n),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(t,e){switch(t.pstyle(e).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(t,e,r){var n=r.w,i=r.h;if("auto"===t.pstyle(e).value)return Nr(n,i);var a=t.pstyle(e).pfValue,o=n/2,s=i/2;return Math.min(a,s,o)}},{key:"drawEdgeArrow",value:function(t,e,r){if(t.visible()){var n,i,a,o=t._private.rscratch;if("source"===r?(n=o.arrowStartX,i=o.arrowStartY,a=o.srcArrowAngle):(n=o.arrowEndX,i=o.arrowEndY,a=o.tgtArrowAngle),!(isNaN(n)||null==n||isNaN(i)||null==i||isNaN(a)||null==a))if("none"!==t.pstyle(r+"-arrow-shape").value){var s=t.pstyle(r+"-arrow-color").value,l=t.pstyle("opacity").value*t.pstyle("line-opacity").value,c=t.pstyle("width").pfValue,h=t.pstyle("arrow-scale").value,u=this.r.getArrowWidth(c,h),d=this.instanceCount,p=this.transformBuffer.getMatrixView(d);sd(p),ld(p,p,[n,i]),hd(p,p,[u,u]),cd(p,p,a),this.vertTypeBuffer.getView(d)[0]=3,Ju(e,this.indexBuffer.getView(d)),Qu(s,l,this.colorBuffer.getView(d)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(t,e){if(t.visible()){var r=this._getEdgePoints(t);if(r){var n=t.pstyle("opacity").value,i=t.pstyle("line-opacity").value,a=t.pstyle("width").pfValue,o=t.pstyle("line-color").value,s=n*i;if(r.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==r.length){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=1,Ju(e,this.indexBuffer.getView(l)),Qu(o,s,this.colorBuffer.getView(l)),this.lineWidthBuffer.getView(l)[0]=a;var c=this.pointAPointBBuffer.getView(l);c[0]=r[0],c[1]=r[1],c[2]=r[2],c[3]=r[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var h=0;h<r.length-2;h+=2){var u=this.instanceCount;this.vertTypeBuffer.getView(u)[0]=2,Ju(e,this.indexBuffer.getView(u)),Qu(o,s,this.colorBuffer.getView(u)),this.lineWidthBuffer.getView(u)[0]=a;var d=r[h-2],p=r[h-1],f=r[h],g=r[h+1],m=r[h+2],y=r[h+3],v=r[h+4],b=r[h+5];0==h&&(d=2*f-m+.001,p=2*g-y+.001),h==r.length-4&&(v=2*m-f+.001,b=2*y-g+.001);var x=this.pointAPointBBuffer.getView(u);x[0]=d,x[1]=p,x[2]=f,x[3]=g;var T=this.pointCPointDBuffer.getView(u);T[0]=m,T[1]=y,T[2]=v,T[3]=b,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var e=t._private.rscratch;return!e.badLine&&null!=e.allpts&&!isNaN(e.allpts[0])}},{key:"_getEdgePoints",value:function(t){var e=t._private.rscratch;if(this._isValidEdge(t)){var r=e.allpts;if(4==r.length)return r;var n=this._getNumSegments(t);return this._getCurveSegmentPoints(r,n)}}},{key:"_getNumSegments",value:function(t){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,e){if(4==t.length)return t;for(var r=Array(2*(e+1)),n=0;n<=e;n++)if(0==n)r[0]=t[0],r[1]=t[1];else if(n==e)r[2*n]=t[t.length-2],r[2*n+1]=t[t.length-1];else{var i=n/e;this._setCurvePoint(t,i,r,2*n)}return r}},{key:"_setCurvePoint",value:function(t,e,r,n){if(!(t.length<=2)){for(var i=Array(t.length-2),a=0;a<i.length;a+=2){var o=(1-e)*t[a]+e*t[a+2],s=(1-e)*t[a+1]+e*t[a+3];i[a]=o,i[a+1]=s}return this._setCurvePoint(i,e,r,n)}r[n]=t[0],r[n+1]=t[1]}},{key:"endBatch",value:function(){var t=this.gl,e=this.vao,r=this.vertexCount,n=this.instanceCount;if(0!==n){var i=this.renderTarget.picking?this.pickingProgram:this.program;t.useProgram(i),t.bindVertexArray(e);var a,s=o(this.buffers);try{for(s.s();!(a=s.n()).done;){a.value.bufferSubData(n)}}catch(f){s.e(f)}finally{s.f()}for(var l,c,h=this.batchManager.getAtlases(),u=0;u<h.length;u++)h[u].bufferIfNeeded(t);for(var d=0;d<h.length;d++)t.activeTexture(t.TEXTURE0+d),t.bindTexture(t.TEXTURE_2D,h[d].texture),t.uniform1i(i.uTextures[d],d);t.uniform1f(i.uZoom,(l=this.r,c=l.pixelRatio,l.cy.zoom()*c)),t.uniformMatrix3fv(i.uPanZoomMatrix,!1,this.panZoomMatrix),t.uniform1i(i.uAtlasSize,this.batchManager.getAtlasSize());var p=Qu(this.bgColor,1);t.uniform4fv(i.uBGColor,p),t.drawArraysInstanced(t.TRIANGLES,0,r,n),t.bindVertexArray(null),t.bindTexture(t.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:n,atlasCount:h.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var t=this.atlasManager.getDebugInfo(),e=t.reduce(function(t,e){return t+e.atlasCount},0),r=this.batchDebugInfo,n=r.reduce(function(t,e){return t+e.count},0);return{atlasInfo:t,totalAtlases:e,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:r.length,batchInfo:r,totalInstances:n}}}])}(),bd={};function xd(t,e){var r=t._private.rscratch;return ge(r,"labelWrapCachedLines",e)||[]}bd.initWebgl=function(t,e){var r=this,n=r.data.contexts[r.WEBGL];t.bgColor=function(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return xt(r)}(r),t.webglTexSize=Math.min(t.webglTexSize,n.getParameter(n.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=function(t){var e=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,e);var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0),t.bindFramebuffer(t.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(e,n){t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,n,0,t.RGBA,t.UNSIGNED_BYTE,null)},e}(n),r.pickingFrameBuffer.needsDraw=!0,r.drawing=new vd(r,n,t);var i=function(t){return function(e){return r.getTextAngle(e,t)}},a=function(t){return function(e){var r=e.pstyle(t);return r&&r.value}},s=function(t){return function(e){return e.pstyle("".concat(t,"-opacity")).value>0}},c=function(t){return"yes"===t.pstyle("text-events").strValue?yd:md},h=function(t){var e=t.position(),r=e.x,n=e.y,i=t.outerWidth(),a=t.outerHeight();return{w:i,h:a,x1:r-i/2,y1:n-a/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:h,isSimple:Xu,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:h,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:h,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:c,getKey:Td(e.getLabelKey,null),getBoundingBox:wd(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:c,getKey:Td(e.getSourceLabelKey,"source"),getBoundingBox:wd(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:c,getKey:Td(e.getTargetLabelKey,"target"),getBoundingBox:wd(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=Nt(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(t,e){var n=!1;e&&e.length>0&&(n|=r.drawing.invalidate(e)),n&&u()}),function(t){var e=t.render;t.render=function(r){r=r||{};var n=t.cy;t.webgl&&(n.zoom()>gu?(!function(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}(t),e.call(t,r)):(!function(t){var e=function(e){e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t.canvasWidth,t.canvasHeight),e.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}(t),Ed(t,r,gd.SCREEN)))};var r=t.matchCanvasSize;t.matchCanvasSize=function(e){r.call(t,e),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0},t.findNearestElements=function(e,r,n,i){return function(t,e,r){var n,i,a,s=function(t,e,r){var n,i,a,o,s=Hu(t),c=s.pan,h=s.zoom,u=function(t,e,r,n,i){var a=n*r+e.x,o=i*r+e.y;return[a,o=Math.round(t.canvasHeight-o)]}(t,c,h,e,r),d=l(u,2),p=d[0],f=d[1],g=6;if(n=p-g/2,i=f-g/2,o=g,0===(a=g)||0===o)return[];var m=t.data.contexts[t.WEBGL];m.bindFramebuffer(m.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(m.viewport(0,0,m.canvas.width,m.canvas.height),Ed(t,null,gd.PICKING),t.pickingFrameBuffer.needsDraw=!1);var y=a*o,v=new Uint8Array(4*y);m.readPixels(n,i,a,o,m.RGBA,m.UNSIGNED_BYTE,v),m.bindFramebuffer(m.FRAMEBUFFER,null);for(var b=new Set,x=0;x<y;x++){var T=td(v.slice(4*x,4*x+4))-1;T>=0&&b.add(T)}return b}(t,e,r),c=t.getCachedZSortedEles(),h=o(s);try{for(h.s();!(a=h.n()).done;){var u=c[a.value];if(!n&&u.isNode()&&(n=u),!i&&u.isEdge()&&(i=u),n&&i)break}}catch(d){h.e(d)}finally{h.f()}return[n,i].filter(Boolean)}(t,e,r)};var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0};var i=t.notify;t.notify=function(e,r){i.call(t,e,r),"viewport"===e||"bounds"===e?t.pickingFrameBuffer.needsDraw=!0:"background"===e&&t.drawing.invalidate(r,{type:"node-body"})}}(r)};var Td=function(t,e){return function(r){var n=t(r),i=xd(r,e);return i.length>1?i.map(function(t,e){return"".concat(n,"_").concat(e)}):n}},wd=function(t,e){return function(r,n){var i=t(r);if("string"==typeof n){var a=n.indexOf("_");if(a>0){var o=Number(n.substring(a+1)),s=xd(r,e),l=i.h/s.length,c=l*o,h=i.y1+c;return{x1:i.x1,w:i.w,y1:h,h:l,yOffset:c}}}return i}};function kd(t,e){var r=t.canvasWidth,n=t.canvasHeight,i=Hu(t),a=i.pan,o=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(a.x,a.y),e.scale(o,o)}function Cd(t,e,r){var n=t.drawing;e+=1,r.isNode()?(n.drawNode(r,e,"node-underlay"),n.drawNode(r,e,"node-body"),n.drawTexture(r,e,"label"),n.drawNode(r,e,"node-overlay")):(n.drawEdgeLine(r,e),n.drawEdgeArrow(r,e,"source"),n.drawEdgeArrow(r,e,"target"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"edge-source-label"),n.drawTexture(r,e,"edge-target-label"))}function Ed(t,e,r){var n;t.webglDebug&&(n=performance.now());var i=t.drawing,a=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&function(t,e){t.drawSelectionRectangle(e,function(e){return kd(t,e)})}(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var s=t.data.contexts[t.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var l=function(t){var e=t.canvasWidth,r=t.canvasHeight,n=Hu(t),i=n.pan,a=n.zoom,o=od();ld(o,o,[i.x,i.y]),hd(o,o,[a,a]);var s=od();!function(t,e,r){t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1}(s,e,r);var l,c,h,u,d,p,f,g,m,y,v,b,x,T,w,k,C,E,S,_,A,R=od();return l=R,h=o,u=(c=s)[0],d=c[1],p=c[2],f=c[3],g=c[4],m=c[5],y=c[6],v=c[7],b=c[8],x=h[0],T=h[1],w=h[2],k=h[3],C=h[4],E=h[5],S=h[6],_=h[7],A=h[8],l[0]=x*u+T*f+w*y,l[1]=x*d+T*g+w*v,l[2]=x*p+T*m+w*b,l[3]=k*u+C*f+E*y,l[4]=k*d+C*g+E*v,l[5]=k*p+C*m+E*b,l[6]=S*u+_*f+A*y,l[7]=S*d+_*g+A*v,l[8]=S*p+_*m+A*b,R}(t),c=t.getCachedZSortedEles();if(a=c.length,i.startFrame(l,r),r.screen){for(var h=0;h<c.nondrag.length;h++)Cd(t,h,c.nondrag[h]);for(var u=0;u<c.drag.length;u++)Cd(t,u,c.drag[u])}else if(r.picking)for(var d=0;d<c.length;d++)Cd(t,d,c[d]);i.endFrame(),r.screen&&t.webglDebugShowAtlases&&(function(t){var e=t.data.contexts[t.NODE];e.save(),kd(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}(t),function(t){var e=function(e,r,n){for(var i=e.atlasManager.getAtlasCollection(r),a=t.data.contexts[t.NODE],o=i.atlases,s=0;s<o.length;s++){var l=o[s].canvas;if(l){var c=l.width,h=l.height,u=c*s,d=l.height*n;a.save(),a.scale(.4,.4),a.drawImage(l,u,d),a.strokeStyle="black",a.rect(u,d,c,h),a.stroke(),a.restore()}}},r=0;e(t.drawing,"node",r++),e(t.drawing,"label",r++)}(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var p=performance.now(),f=Math.ceil(p-n),g=i.getDebugInfo(),m=["".concat(a," elements"),"".concat(g.totalInstances," instances"),"".concat(g.batchCount," batches"),"".concat(g.totalAtlases," atlases"),"".concat(g.wrappedCount," wrapped textures"),"".concat(g.simpleCount," simple shapes")].join(", ");console.log("WebGL (".concat(r.name,") - frame time ").concat(f,"ms")),console.log("Totals:"),console.log(" ".concat(m)),console.log("Texture Atlases Used:");var y,v=o(g.atlasInfo);try{for(v.s();!(y=v.n()).done;){var b=y.value;console.log(" ".concat(b.type,": ").concat(b.keyCount," keys, ").concat(b.atlasCount," atlases"))}}catch(x){v.e(x)}finally{v.f()}console.log("")}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,i.gc())}for(var Sd={drawPolygonPath:function(t,e,r,n,i,a){var o=n/2,s=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*a[0],r+s*a[1]);for(var l=1;l<a.length/2;l++)t.lineTo(e+o*a[2*l],r+s*a[2*l+1]);t.closePath()},drawRoundPolygonPath:function(t,e,r,n,i,a,o){o.forEach(function(e){return Kh(t,e)}),t.closePath()},drawRoundRectanglePath:function(t,e,r,n,i,a){var o=n/2,s=i/2,l="auto"===a?Nr(n,i):Math.min(a,s,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.arcTo(e+o,r-s,e+o,r,l),t.arcTo(e+o,r+s,e,r+s,l),t.arcTo(e-o,r+s,e-o,r,l),t.arcTo(e-o,r-s,e,r-s,l),t.lineTo(e,r-s),t.closePath()},drawBottomRoundRectanglePath:function(t,e,r,n,i,a){var o=n/2,s=i/2,l="auto"===a?Nr(n,i):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.lineTo(e+o,r-s),t.lineTo(e+o,r),t.arcTo(e+o,r+s,e,r+s,l),t.arcTo(e-o,r+s,e-o,r,l),t.lineTo(e-o,r-s),t.lineTo(e,r-s),t.closePath()},drawCutRectanglePath:function(t,e,r,n,i,a,o){var s=n/2,l=i/2,c="auto"===o?8:o;t.beginPath&&t.beginPath(),t.moveTo(e-s+c,r-l),t.lineTo(e+s-c,r-l),t.lineTo(e+s,r-l+c),t.lineTo(e+s,r+l-c),t.lineTo(e+s-c,r+l),t.lineTo(e-s+c,r+l),t.lineTo(e-s,r+l-c),t.lineTo(e-s,r-l+c),t.closePath()},drawBarrelPath:function(t,e,r,n,i){var a=n/2,o=i/2,s=e-a,l=e+a,c=r-o,h=r+o,u=Or(n,i),d=u.widthOffset,p=u.heightOffset,f=u.ctrlPtOffsetPct*d;t.beginPath&&t.beginPath(),t.moveTo(s,c+p),t.lineTo(s,h-p),t.quadraticCurveTo(s+f,h,s+d,h),t.lineTo(l-d,h),t.quadraticCurveTo(l-f,h,l,h-p),t.lineTo(l,c+p),t.quadraticCurveTo(l-f,c,l-d,c),t.lineTo(s+d,c),t.quadraticCurveTo(s+f,c,s,c+p),t.closePath()}},_d=Math.sin(0),Ad=Math.cos(0),Rd={},Ld={},Id=Math.PI/40,Dd=0*Math.PI;Dd<2*Math.PI;Dd+=Id)Rd[Dd]=Math.sin(Dd),Ld[Dd]=Math.cos(Dd);Sd.drawEllipsePath=function(t,e,r,n,i){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,i/2,0,0,2*Math.PI);else for(var a,o,s=n/2,l=i/2,c=0*Math.PI;c<2*Math.PI;c+=Id)a=e-s*Rd[c]*_d+s*Ld[c]*Ad,o=r+l*Ld[c]*_d+l*Rd[c]*Ad,0===c?t.moveTo(a,o):t.lineTo(a,o);t.closePath()};var Nd={};function Md(t){var e=t.indexOf(",");return t.substr(e+1)}function Od(t,e,r){var n=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new Zn(function(n,i){try{e.toBlob(function(t){null!=t?n(t):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(a){i(a)}});case"blob":return function(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),i=new Uint8Array(n),a=0;a<r.length;a++)i[a]=r.charCodeAt(a);return new Blob([n],{type:e})}(Md(n()),r);case"base64":return Md(n());default:return n()}}Nd.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]},Nd.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements().boundingBox(),n=this.findContainerClientCoords(),i=t.full?Math.ceil(r.w):n[2],a=t.full?Math.ceil(r.h):n[3],o=Q(t.maxWidth)||Q(t.maxHeight),s=this.getPixelRatio(),l=1;if(void 0!==t.scale)i*=t.scale,a*=t.scale,l=t.scale;else if(o){var c=1/0,h=1/0;Q(t.maxWidth)&&(c=l*t.maxWidth/i),Q(t.maxHeight)&&(h=l*t.maxHeight/a),i*=l=Math.min(c,h),a*=l}o||(i*=s,a*=s,l*=s);var u=document.createElement("canvas");u.width=i,u.height=a,u.style.width=i+"px",u.style.height=a+"px";var d=u.getContext("2d");if(i>0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(t.full)d.translate(-r.x1*l,-r.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(r.x1*l,r.y1*l);else{var f=e.pan(),g={x:f.x*l,y:f.y*l};l*=e.zoom(),d.translate(g.x,g.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-g.x,-g.y)}t.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=t.bg,d.rect(0,0,i,a),d.fill())}return u},Nd.png=function(t){return Od(t,this.bufferCanvasImage(t),"image/png")},Nd.jpg=function(t){return Od(t,this.bufferCanvasImage(t),"image/jpeg")};var $d={nodeShapeImpl:function(t,e,r,n,i,a,o,s){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,s);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}}},Pd=Fd,Bd=Fd.prototype;function Fd(t){var e=this,r=e.cy.window().document;t.webgl&&(Bd.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(Bd.CANVAS_LAYERS),contexts:new Array(Bd.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Bd.CANVAS_LAYERS),bufferCanvases:new Array(Bd.BUFFER_COUNT),bufferContexts:new Array(Bd.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=r.createElement("div");var a=e.data.canvasContainer.style;e.data.canvasContainer.style[n]=i,a.position="relative",a.zIndex="0",a.overflow="hidden";var o=t.cy.container();o.appendChild(e.data.canvasContainer),o.style[n]=i;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};f&&f.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;l<Bd.CANVAS_LAYERS;l++){var c=e.data.canvases[l]=r.createElement("canvas"),h=Bd.CANVAS_TYPES[l];e.data.contexts[l]=c.getContext(h),e.data.contexts[l]||ae("Could not create canvas of type "+h),Object.keys(s).forEach(function(t){c.style[t]=s[t]}),c.style.position="absolute",c.setAttribute("data-id","layer"+l),c.style.zIndex=String(Bd.CANVAS_LAYERS-l),e.data.canvasContainer.appendChild(c),e.data.canvasNeedsRedraw[l]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[Bd.NODE].setAttribute("data-id","layer"+Bd.NODE+"-node"),e.data.canvases[Bd.SELECT_BOX].setAttribute("data-id","layer"+Bd.SELECT_BOX+"-selectbox"),e.data.canvases[Bd.DRAG].setAttribute("data-id","layer"+Bd.DRAG+"-drag"),e.data.canvases[Bd.WEBGL]&&e.data.canvases[Bd.WEBGL].setAttribute("data-id","layer"+Bd.WEBGL+"-webgl");for(l=0;l<Bd.BUFFER_COUNT;l++)e.data.bufferCanvases[l]=r.createElement("canvas"),e.data.bufferContexts[l]=e.data.bufferCanvases[l].getContext("2d"),e.data.bufferCanvases[l].style.position="absolute",e.data.bufferCanvases[l].setAttribute("data-id","buffer"+l),e.data.bufferCanvases[l].style.zIndex=String(-l-1),e.data.bufferCanvases[l].style.visibility="hidden";e.pathsEnabled=!0;var u=rr(),d=function(t){return{x:-t.w/2,y:-t.h/2}},p=function(t){return t[0]._private.nodeKey},g=function(t){return t[0]._private.labelStyleKey},m=function(t){return t[0]._private.sourceLabelStyleKey},y=function(t){return t[0]._private.targetLabelStyleKey},v=function(t,r,n,i,a){return e.drawElement(t,r,n,!1,!1,a)},b=function(t,r,n,i,a){return e.drawElementText(t,r,n,i,"main",a)},x=function(t,r,n,i,a){return e.drawElementText(t,r,n,i,"source",a)},T=function(t,r,n,i,a){return e.drawElementText(t,r,n,i,"target",a)},w=function(t){return t.boundingBox(),t[0]._private.bodyBounds},k=function(t){return t.boundingBox(),t[0]._private.labelBounds.main||u},C=function(t){return t.boundingBox(),t[0]._private.labelBounds.source||u},E=function(t){return t.boundingBox(),t[0]._private.labelBounds.target||u},S=function(t,e){return e},_=function(t){return{x:((e=w(t)).x1+e.x2)/2,y:(e.y1+e.y2)/2};var e},A=function(t,e,r){var n=t?t+"-":"";return{x:e.x+r.pstyle(n+"text-margin-x").pfValue,y:e.y+r.pstyle(n+"text-margin-y").pfValue}},R=function(t,e,r){var n=t[0]._private.rscratch;return{x:n[e],y:n[r]}},L=function(t){return A("",R(t,"labelX","labelY"),t)},I=function(t){return A("source",R(t,"sourceLabelX","sourceLabelY"),t)},D=function(t){return A("target",R(t,"targetLabelX","targetLabelY"),t)},N=function(t){return d(w(t))},M=function(t){return d(C(t))},O=function(t){return d(E(t))},$=function(t){var e=k(t),r=d(k(t));if(t.isNode()){switch(t.pstyle("text-halign").value){case"left":r.x=-e.w-(e.leftPad||0);break;case"right":r.x=-(e.rightPad||0)}switch(t.pstyle("text-valign").value){case"top":r.y=-e.h-(e.topPad||0);break;case"bottom":r.y=-(e.botPad||0)}}return r},P=e.data.eleTxrCache=new vu(e,{getKey:p,doesEleInvalidateKey:function(t){var e=t[0]._private;return!(e.oldBackgroundTimestamp===e.backgroundTimestamp)},drawElement:v,getBoundingBox:w,getRotationPoint:_,getRotationOffset:N,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),B=e.data.lblTxrCache=new vu(e,{getKey:g,drawElement:b,getBoundingBox:k,getRotationPoint:L,getRotationOffset:$,isVisible:S}),F=e.data.slbTxrCache=new vu(e,{getKey:m,drawElement:x,getBoundingBox:C,getRotationPoint:I,getRotationOffset:M,isVisible:S}),z=e.data.tlbTxrCache=new vu(e,{getKey:y,drawElement:T,getBoundingBox:E,getRotationPoint:D,getRotationOffset:O,isVisible:S}),K=e.data.lyrTxrCache=new xu(e);e.onUpdateEleCalcs(function(t,e){P.invalidateElements(e),B.invalidateElements(e),F.invalidateElements(e),z.invalidateElements(e),K.invalidateElements(e);for(var r=0;r<e.length;r++){var n=e[r]._private;n.oldBackgroundTimestamp=n.backgroundTimestamp}});var j=function(t){for(var e=0;e<t.length;e++)K.enqueueElementRefinement(t[e].ele)};P.onDequeue(j),B.onDequeue(j),F.onDequeue(j),z.onDequeue(j),t.webgl&&e.initWebgl(t,{getStyleKey:p,getLabelKey:g,getSourceLabelKey:m,getTargetLabelKey:y,drawElement:v,drawLabel:b,drawSourceLabel:x,drawTargetLabel:T,getElementBox:w,getLabelBox:k,getSourceLabelBox:C,getTargetLabelBox:E,getElementRotationPoint:_,getElementRotationOffset:N,getLabelRotationPoint:L,getSourceLabelRotationPoint:I,getTargetLabelRotationPoint:D,getLabelRotationOffset:$,getSourceLabelRotationOffset:M,getTargetLabelRotationOffset:O})}Bd.CANVAS_LAYERS=3,Bd.SELECT_BOX=0,Bd.DRAG=1,Bd.NODE=2,Bd.WEBGL=3,Bd.CANVAS_TYPES=["2d","2d","2d","webgl2"],Bd.BUFFER_COUNT=3,Bd.TEXTURE_BUFFER=0,Bd.MOTIONBLUR_BUFFER_NODE=1,Bd.MOTIONBLUR_BUFFER_DRAG=2,Bd.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Bd.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Bd.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Bd.SELECT_BOX]=e;break;case"gc":r.data.gc=!0}};var zd="undefined"!=typeof Path2D;Bd.path2dEnabled=function(t){if(void 0===t)return this.pathsEnabled;this.pathsEnabled=!!t},Bd.usePaths=function(){return zd&&this.pathsEnabled},Bd.setImgSmoothing=function(t,e){null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},Bd.getImgSmoothing=function(t){return null!=t.imageSmoothingEnabled?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},Bd.makeOffscreenCanvas=function(t,e){var r;"undefined"!==("undefined"==typeof OffscreenCanvas?"undefined":u(OffscreenCanvas))?r=new OffscreenCanvas(t,e):((r=this.cy.window().document.createElement("canvas")).width=t,r.height=e);return r},[Eu,Iu,Bu,zu,Ku,qu,Gu,bd,Sd,Nd,$d].forEach(function(t){bt(Bd,t)});var Kd=[{type:"layout",extensions:ph},{type:"renderer",extensions:[{name:"null",impl:fh},{name:"base",impl:hu},{name:"canvas",impl:Pd}]}],jd={},qd={};function Wd(t,e,r){var n=r,i=function(r){se("Can not register `"+e+"` for `"+t+"` since `"+r+"` already exists in the prototype and can not be overridden")};if("core"===t){if(Sc.prototype[e])return i(e);Sc.prototype[e]=r}else if("collection"===t){if(jl.prototype[e])return i(e);jl.prototype[e]=r}else if("layout"===t){for(var a=function(t){this.options=t,r.call(this,t),Z(this._private)||(this._private={}),this._private.cy=t.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(r.prototype),s=[],l=0;l<s.length;l++){var c=s[l];o[c]=o[c]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var h=r.prototype.stop;o.stop=function(){var t=this.options;if(t&&t.animate){var e=this.animations;if(e)for(var r=0;r<e.length;r++)e[r].stop()}return h?h.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var u=function(t){return t._private.cy},d={addEventFields:function(t,e){e.layout=t,e.cy=u(t),e.target=t},bubble:function(){return!0},parent:function(t){return u(t)}};bt(o,{createEmitter:function(){return this._private.emitter=new ol(d,this),this},emitter:function(){return this._private.emitter},on:function(t,e){return this.emitter().on(t,e),this},one:function(t,e){return this.emitter().one(t,e),this},once:function(t,e){return this.emitter().one(t,e),this},removeListener:function(t,e){return this.emitter().removeListener(t,e),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(t,e){return this.emitter().emit(t,e),this}}),Co.eventAliasesOn(o),n=a}else if("renderer"===t&&"null"!==e&&"base"!==e){var p=Ud("renderer","base"),f=p.prototype,g=r,m=r.prototype,y=function(){p.apply(this,arguments),g.apply(this,arguments)},v=y.prototype;for(var b in f){var x=f[b];if(null!=m[b])return i(b);v[b]=x}for(var T in m)v[T]=m[T];f.clientFunctions.forEach(function(t){v[t]=v[t]||function(){ae("Renderer does not implement `renderer."+t+"()` on its prototype")}}),n=y}else if("__proto__"===t||"constructor"===t||"prototype"===t)return ae(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return wt({map:jd,keys:[t,e],value:n})}function Ud(t,e){return kt({map:jd,keys:[t,e]})}function Gd(t,e,r,n,i){return wt({map:qd,keys:[t,e,r,n],value:i})}function Yd(t,e,r,n){return kt({map:qd,keys:[t,e,r,n]})}var Vd=function(){return 2===arguments.length?Ud.apply(null,arguments):3===arguments.length?Wd.apply(null,arguments):4===arguments.length?Yd.apply(null,arguments):5===arguments.length?Gd.apply(null,arguments):void ae("Invalid extension access syntax")};Sc.prototype.extension=Vd,Kd.forEach(function(t){t.extensions.forEach(function(e){Wd(t.type,e.name,e.impl)})});var Hd=function(){if(!(this instanceof Hd))return new Hd;this.length=0},Xd=Hd.prototype;Xd.instanceString=function(){return"stylesheet"},Xd.selector=function(t){return this[this.length++]={selector:t,properties:[]},this},Xd.css=function(t,e){var r=this.length-1;if(V(t))this[r].properties.push({name:t,value:e});else if(Z(t))for(var n=t,i=Object.keys(n),a=0;a<i.length;a++){var o=i[a],s=n[o];if(null!=s){var l=Tc.properties[o]||Tc.properties[ct(o)];if(null!=l){var c=l.name,h=s;this[r].properties.push({name:c,value:h})}}}return this},Xd.style=Xd.css,Xd.generateStyle=function(t){var e=new Tc(t);return this.appendToStyle(e)},Xd.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,i=r.properties;t.selector(n);for(var a=0;a<i.length;a++){var o=i[a];t.css(o.name,o.value)}}return t};var Zd=function(t){return void 0===t&&(t={}),Z(t)?new Sc(t):V(t)?Vd.apply(Vd,arguments):void 0};Zd.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(Zd),t.apply(null,e),this},Zd.warnings=function(t){return oe(t)},Zd.version="3.33.3",Zd.stylesheet=Zd.Stylesheet=Hd},1444(t,e,r){"use strict";function n(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r<n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function i(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function a(t){return t}r.d(e,{JLW:()=>rc,l78:()=>f,tlR:()=>p,qrM:()=>gc,Yu4:()=>yc,IA3:()=>bc,Wi0:()=>Tc,PGM:()=>wc,OEq:()=>Cc,y8u:()=>_c,olC:()=>Rc,IrU:()=>Ic,oDi:()=>Mc,Q7f:()=>$c,cVp:()=>Bc,lUB:()=>ac,Lx9:()=>zc,nVG:()=>Vc,uxU:()=>Hc,Xf2:()=>Qc,GZz:()=>th,UPb:()=>rh,dyv:()=>eh,GPZ:()=>ki,Sk5:()=>ji,bEH:()=>Ta,n8j:()=>lc,T9B:()=>n,jkA:()=>i,rLf:()=>uc,WH:()=>La,m4Y:()=>co,UMr:()=>Ra,w7C:()=>Sl,zt:()=>Al,Ltv:()=>Rl,UAC:()=>_o,DCK:()=>as,TUC:()=>$o,Agd:()=>Eo,t6C:()=>To,wXd:()=>ko,ABi:()=>Do,Ui6:()=>Go,rGn:()=>Po,ucG:()=>wo,YPH:()=>Io,Mol:()=>Oo,PGu:()=>No,GuW:()=>Mo,hkb:()=>ea}),Object.defineProperty(a,"name",{value:"default",configurable:!0});var o=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function c(t){return e=>+t(e)}function h(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function u(){return!this.__axis}function d(t,e){var r=[],n=null,i=null,d=6,p=6,f=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,m=1===t||4===t?-1:1,y=4===t||2===t?"x":"y",v=1===t||3===t?s:l;function b(s){var l=n??(e.ticks?e.ticks.apply(e,r):e.domain()),b=i??(e.tickFormat?e.tickFormat.apply(e,r):a),x=Math.max(d,0)+f,T=e.range(),w=+T[0]+g,k=+T[T.length-1]+g,C=(e.bandwidth?h:c)(e.copy(),g),E=s.selection?s.selection():s,S=E.selectAll(".domain").data([null]),_=E.selectAll(".tick").data(l,e).order(),A=_.exit(),R=_.enter().append("g").attr("class","tick"),L=_.select("line"),I=_.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(R),L=L.merge(R.append("line").attr("stroke","currentColor").attr(y+"2",m*d)),I=I.merge(R.append("text").attr("fill","currentColor").attr(y,m*x).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==E&&(S=S.transition(s),_=_.transition(s),L=L.transition(s),I=I.transition(s),A=A.transition(s).attr("opacity",o).attr("transform",function(t){return isFinite(t=C(t))?v(t+g):this.getAttribute("transform")}),R.attr("opacity",o).attr("transform",function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:C(t))+g)})),A.remove(),S.attr("d",4===t||2===t?p?"M"+m*p+","+w+"H"+g+"V"+k+"H"+m*p:"M"+g+","+w+"V"+k:p?"M"+w+","+m*p+"V"+g+"H"+k+"V"+m*p:"M"+w+","+g+"H"+k),_.attr("opacity",1).attr("transform",function(t){return v(C(t)+g)}),L.attr(y+"2",m*d),I.attr(y,m*x).text(b),E.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),E.each(function(){this.__axis=C})}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return r=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),b):r.slice()},b.tickValues=function(t){return arguments.length?(n=null==t?null:Array.from(t),b):n&&n.slice()},b.tickFormat=function(t){return arguments.length?(i=t,b):i},b.tickSize=function(t){return arguments.length?(d=p=+t,b):d},b.tickSizeInner=function(t){return arguments.length?(d=+t,b):d},b.tickSizeOuter=function(t){return arguments.length?(p=+t,b):p},b.tickPadding=function(t){return arguments.length?(f=+t,b):f},b.offset=function(t){return arguments.length?(g=+t,b):g},b}function p(t){return d(1,t)}function f(t){return d(3,t)}function g(){}function m(t){return null==t?g:function(){return this.querySelector(t)}}function y(t){"function"!=typeof t&&(t=m(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,o,s=e[i],l=s.length,c=n[i]=new Array(l),h=0;h<l;++h)(a=s[h])&&(o=t.call(a,a.__data__,h,s))&&("__data__"in a&&(o.__data__=a.__data__),c[h]=o);return new oe(n,this._parents)}function v(){return[]}function b(t){return null==t?v:function(){return this.querySelectorAll(t)}}function x(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function T(t){t="function"==typeof t?x(t):b(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(n.push(t.call(o,o.__data__,c,s)),i.push(o));return new oe(n,i)}function w(t){return function(){return this.matches(t)}}function k(t){return function(e){return e.matches(t)}}Object.defineProperty(m,"name",{value:"default",configurable:!0}),Object.defineProperty(y,"name",{value:"default",configurable:!0}),Object.defineProperty(b,"name",{value:"default",configurable:!0}),Object.defineProperty(T,"name",{value:"default",configurable:!0}),Object.defineProperty(w,"name",{value:"default",configurable:!0}),Object.defineProperty(S,"name",{value:"default",configurable:!0});var C=Array.prototype.find;function E(){return this.firstElementChild}function S(t){return this.select(null==t?E:function(t){return function(){return C.call(this.children,t)}}("function"==typeof t?t:k(t)))}Object.defineProperty(R,"name",{value:"default",configurable:!0});var _=Array.prototype.filter;function A(){return Array.from(this.children)}function R(t){return this.selectAll(null==t?A:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:k(t)))}function L(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,o=e[i],s=o.length,l=n[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new oe(n,this._parents)}function I(t){return new Array(t.length)}function D(){return new oe(this._enter||this._groups.map(I),this._parents)}function N(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function M(t){return function(){return t}}function O(t,e,r,n,i,a){for(var o,s=0,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],n[s]=o):r[s]=new N(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function $(t,e,r,n,i,a,o){var s,l,c,h=new Map,u=e.length,d=a.length,p=new Array(u);for(s=0;s<u;++s)(l=e[s])&&(p[s]=c=o.call(l,l.__data__,s,e)+"",h.has(c)?i[s]=l:h.set(c,l));for(s=0;s<d;++s)c=o.call(t,a[s],s,a)+"",(l=h.get(c))?(n[s]=l,l.__data__=a[s],h.delete(c)):r[s]=new N(t,a[s]);for(s=0;s<u;++s)(l=e[s])&&h.get(p[s])===l&&(i[s]=l)}function P(t){return t.__data__}function B(t,e){if(!arguments.length)return Array.from(this,P);var r=e?$:O,n=this._parents,i=this._groups;"function"!=typeof t&&(t=M(t));for(var a=i.length,o=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var h=n[c],u=i[c],d=u.length,p=F(t.call(h,h&&h.__data__,c,n)),f=p.length,g=s[c]=new Array(f),m=o[c]=new Array(f);r(h,u,g,m,l[c]=new Array(d),p,e);for(var y,v,b=0,x=0;b<f;++b)if(y=g[b]){for(b>=x&&(x=b+1);!(v=m[x])&&++x<f;);y._next=v||null}}return(o=new oe(o,n))._enter=s,o._exit=l,o}function F(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function z(){return new oe(this._exit||this._groups.map(I),this._parents)}function K(t,e,r){var n=this.enter(),i=this,a=this.exit();return"function"==typeof t?(n=t(n))&&(n=n.selection()):n=n.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}function j(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,o=Math.min(i,a),s=new Array(i),l=0;l<o;++l)for(var c,h=r[l],u=n[l],d=h.length,p=s[l]=new Array(d),f=0;f<d;++f)(c=h[f]||u[f])&&(p[f]=c);for(;l<i;++l)s[l]=r[l];return new oe(s,this._parents)}function q(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n,i=t[e],a=i.length-1,o=i[a];--a>=0;)(n=i[a])&&(o&&4^n.compareDocumentPosition(o)&&o.parentNode.insertBefore(n,o),o=n);return this}function W(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=U);for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var o,s=r[a],l=s.length,c=i[a]=new Array(l),h=0;h<l;++h)(o=s[h])&&(c[h]=o);c.sort(e)}return new oe(i,this._parents).order()}function U(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function G(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Y(){return Array.from(this)}function V(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var o=n[i];if(o)return o}return null}function H(){let t=0;for(const e of this)++t;return t}function X(){return!this.node()}function Z(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i,a=e[r],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this}Object.defineProperty(L,"name",{value:"default",configurable:!0}),Object.defineProperty(I,"name",{value:"default",configurable:!0}),Object.defineProperty(D,"name",{value:"default",configurable:!0}),N.prototype={constructor:N,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)}},Object.defineProperty(M,"name",{value:"default",configurable:!0}),Object.defineProperty(B,"name",{value:"default",configurable:!0}),Object.defineProperty(z,"name",{value:"default",configurable:!0}),Object.defineProperty(K,"name",{value:"default",configurable:!0}),Object.defineProperty(j,"name",{value:"default",configurable:!0}),Object.defineProperty(q,"name",{value:"default",configurable:!0}),Object.defineProperty(W,"name",{value:"default",configurable:!0}),Object.defineProperty(G,"name",{value:"default",configurable:!0}),Object.defineProperty(Y,"name",{value:"default",configurable:!0}),Object.defineProperty(V,"name",{value:"default",configurable:!0}),Object.defineProperty(H,"name",{value:"default",configurable:!0}),Object.defineProperty(X,"name",{value:"default",configurable:!0}),Object.defineProperty(Z,"name",{value:"default",configurable:!0});var Q="http://www.w3.org/1999/xhtml";const J={svg:"http://www.w3.org/2000/svg",xhtml:Q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tt(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),J.hasOwnProperty(e)?{space:J[e],local:t}:t}function et(t){return function(){this.removeAttribute(t)}}function rt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nt(t,e){return function(){this.setAttribute(t,e)}}function it(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function at(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function ot(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function st(t,e){var r=tt(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((null==e?r.local?rt:et:"function"==typeof e?r.local?ot:at:r.local?it:nt)(r,e))}function lt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ct(t){return function(){this.style.removeProperty(t)}}function ht(t,e,r){return function(){this.style.setProperty(t,e,r)}}function ut(t,e,r){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function dt(t,e,r){return arguments.length>1?this.each((null==e?ct:"function"==typeof e?ut:ht)(t,e,r??"")):pt(this.node(),t)}function pt(t,e){return t.style.getPropertyValue(e)||lt(t).getComputedStyle(t,null).getPropertyValue(e)}function ft(t){return function(){delete this[t]}}function gt(t,e){return function(){this[t]=e}}function mt(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function yt(t,e){return arguments.length>1?this.each((null==e?ft:"function"==typeof e?mt:gt)(t,e)):this.node()[t]}function vt(t){return t.trim().split(/^|\s+/)}function bt(t){return t.classList||new xt(t)}function xt(t){this._node=t,this._names=vt(t.getAttribute("class")||"")}function Tt(t,e){for(var r=bt(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function wt(t,e){for(var r=bt(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function kt(t){return function(){Tt(this,t)}}function Ct(t){return function(){wt(this,t)}}function Et(t,e){return function(){(e.apply(this,arguments)?Tt:wt)(this,t)}}function St(t,e){var r=vt(t+"");if(arguments.length<2){for(var n=bt(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each(("function"==typeof e?Et:e?kt:Ct)(r,e))}function _t(){this.textContent=""}function At(t){return function(){this.textContent=t}}function Rt(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Lt(t){return arguments.length?this.each(null==t?_t:("function"==typeof t?Rt:At)(t)):this.node().textContent}function It(){this.innerHTML=""}function Dt(t){return function(){this.innerHTML=t}}function Nt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Mt(t){return arguments.length?this.each(null==t?It:("function"==typeof t?Nt:Dt)(t)):this.node().innerHTML}function Ot(){this.nextSibling&&this.parentNode.appendChild(this)}function $t(){return this.each(Ot)}function Pt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Bt(){return this.each(Pt)}function Ft(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Q&&e.documentElement.namespaceURI===Q?e.createElement(t):e.createElementNS(r,t)}}function zt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Kt(t){var e=tt(t);return(e.local?zt:Ft)(e)}function jt(t){var e="function"==typeof t?t:Kt(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function qt(){return null}function Wt(t,e){var r="function"==typeof t?t:Kt(t),n=null==e?qt:"function"==typeof e?e:m(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function Ut(){var t=this.parentNode;t&&t.removeChild(this)}function Gt(){return this.each(Ut)}function Yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ht(t){return this.select(t?Vt:Yt)}function Xt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Zt(t){return function(){var e=this.__on;if(e){for(var r,n=0,i=-1,a=e.length;n<a;++n)r=e[n],t.type&&r.type!==t.type||r.name!==t.name?e[++i]=r:this.removeEventListener(r.type,r.listener,r.options);++i?e.length=i:delete this.__on}}}function Qt(t,e,r){return function(){var n,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((n=i[o]).type===t.type&&n.name===t.name)return this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),void(n.value=e);this.addEventListener(t.type,a,r),n={type:t.type,name:t.name,value:e,listener:a,options:r},i?i.push(n):this.__on=[n]}}function Jt(t,e,r){var n,i,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Qt:Zt,n=0;n<o;++n)this.each(s(a[n],e,r));return this}var s=this.node().__on;if(s)for(var l,c=0,h=s.length;c<h;++c)for(n=0,l=s[c];n<o;++n)if((i=a[n]).type===l.type&&i.name===l.name)return l.value}function te(t,e,r){var n=lt(t),i=n.CustomEvent;"function"==typeof i?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 ee(t,e){return function(){return te(this,t,e)}}function re(t,e){return function(){return te(this,t,e.apply(this,arguments))}}function ne(t,e){return this.each(("function"==typeof e?re:ee)(t,e))}function*ie(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n,i=t[e],a=0,o=i.length;a<o;++a)(n=i[a])&&(yield n)}Object.defineProperty(tt,"name",{value:"default",configurable:!0}),Object.defineProperty(st,"name",{value:"default",configurable:!0}),Object.defineProperty(lt,"name",{value:"default",configurable:!0}),Object.defineProperty(dt,"name",{value:"default",configurable:!0}),Object.defineProperty(yt,"name",{value:"default",configurable:!0}),Object.defineProperty(St,"name",{value:"default",configurable:!0}),xt.prototype={add:function(t){this._names.indexOf(t)<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}},Object.defineProperty(Lt,"name",{value:"default",configurable:!0}),Object.defineProperty(Mt,"name",{value:"default",configurable:!0}),Object.defineProperty($t,"name",{value:"default",configurable:!0}),Object.defineProperty(Bt,"name",{value:"default",configurable:!0}),Object.defineProperty(Kt,"name",{value:"default",configurable:!0}),Object.defineProperty(jt,"name",{value:"default",configurable:!0}),Object.defineProperty(Wt,"name",{value:"default",configurable:!0}),Object.defineProperty(Gt,"name",{value:"default",configurable:!0}),Object.defineProperty(Ht,"name",{value:"default",configurable:!0}),Object.defineProperty(Xt,"name",{value:"default",configurable:!0}),Object.defineProperty(Jt,"name",{value:"default",configurable:!0}),Object.defineProperty(ne,"name",{value:"default",configurable:!0}),Object.defineProperty(ie,"name",{value:"default",configurable:!0});var ae=[null];function oe(t,e){this._groups=t,this._parents=e}function se(){return new oe([[document.documentElement]],ae)}oe.prototype=se.prototype={constructor:oe,select:y,selectAll:T,selectChild:S,selectChildren:R,filter:L,data:B,enter:D,exit:z,join:K,merge:j,selection:function(){return this},order:q,sort:W,call:G,nodes:Y,node:V,size:H,empty:X,each:Z,attr:st,style:dt,property:yt,classed:St,text:Lt,html:Mt,raise:$t,lower:Bt,append:jt,insert:Wt,remove:Gt,clone:Ht,datum:Xt,on:Jt,dispatch:ne,[Symbol.iterator]:ie};const le=se;var ce={value:()=>{}};function he(){for(var t,e=0,r=arguments.length,n={};e<r;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new ue(n)}function ue(t){this._=t}function de(t,e){for(var r,n=0,i=t.length;n<i;++n)if((r=t[n]).name===e)return r.value}function pe(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=ce,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=r&&t.push({name:e,value:r}),t}ue.prototype=he.prototype={constructor:ue,on:function(t,e){var r,n,i=this._,a=(n=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=a[o]).type)i[r]=pe(i[r],t.name,e);else if(null==e)for(r in i)i[r]=pe(i[r],t.name,null);return this}for(;++o<s;)if((r=(t=a[o]).type)&&(r=de(i[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new ue(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,n,i=new Array(r),a=0;a<r;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(n=this._[t]).length;a<r;++a)n[a].value.apply(e,i)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}};const fe=he;var ge,me,ye=0,ve=0,be=0,xe=0,Te=0,we=0,ke="object"==typeof performance&&performance.now?performance:Date,Ce="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ee(){return Te||(Ce(Se),Te=ke.now()+we)}function Se(){Te=0}function _e(){this._call=this._time=this._next=null}function Ae(t,e,r){var n=new _e;return n.restart(t,e,r),n}function Re(){Te=(xe=ke.now())+we,ye=ve=0;try{!function(){Ee(),++ye;for(var t,e=ge;e;)(t=Te-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ye}()}finally{ye=0,function(){var t,e,r=ge,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:ge=e);me=t,Ie(n)}(),Te=0}}function Le(){var t=ke.now(),e=t-xe;e>1e3&&(we-=e,xe=t)}function Ie(t){ye||(ve&&(ve=clearTimeout(ve)),t-Te>24?(t<1/0&&(ve=setTimeout(Re,t-ke.now()-we)),be&&(be=clearInterval(be))):(be||(xe=ke.now(),be=setInterval(Le,1e3)),ye=1,Ce(Re)))}function De(t,e,r){var n=new _e;return e=null==e?0:+e,n.restart(r=>{n.stop(),t(r+e)},e,r),n}_e.prototype=Ae.prototype={constructor:_e,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Ee():+r)+(null==e?0:+e),this._next||me===this||(me?me._next=this:ge=this,me=this),this._call=t,this._time=r,Ie()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ie())}},Object.defineProperty(De,"name",{value:"default",configurable:!0}),Object.defineProperty(Oe,"name",{value:"default",configurable:!0});var Ne=fe("start","end","cancel","interrupt"),Me=[];function Oe(t,e,r,n,i,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};!function(t,e,r){var n,i=t.__transition;function a(t){r.state=1,r.timer.restart(o,r.delay,r.time),r.delay<=t&&o(t-r.delay)}function o(a){var c,h,u,d;if(1!==r.state)return l();for(c in i)if((d=i[c]).name===r.name){if(3===d.state)return De(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[c])}if(De(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(a))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,n=new Array(u=r.tween.length),c=0,h=-1;c<u;++c)(d=r.tween[c].value.call(t,t.__data__,r.index,r.group))&&(n[++h]=d);n.length=h+1}}function s(e){for(var i=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),a=-1,o=n.length;++a<o;)n[a].call(t,i);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var n in r.state=6,r.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=r,r.timer=Ae(a,0,r.time)}(t,r,{name:e,index:n,group:i,on:Ne,tween:Me,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function $e(t,e){var r=Be(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function Pe(t,e){var r=Be(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Be(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Fe(t,e){var r,n,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(r=a[i]).name===e?(n=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(n?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[i]):o=!1;o&&delete t.__transition}}function ze(t){return this.each(function(){Fe(this,t)})}function Ke(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}Object.defineProperty(Fe,"name",{value:"default",configurable:!0}),Object.defineProperty(ze,"name",{value:"default",configurable:!0}),Object.defineProperty(Ke,"name",{value:"default",configurable:!0}),Object.defineProperty(Ue,"name",{value:"default",configurable:!0});var je,qe=180/Math.PI,We={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ue(t,e,r,n,i,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*qe,skewX:Math.atan(l)*qe,scaleX:o,scaleY:s}}function Ge(t,e,r,n){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,i,a,o,s){if(t!==i||n!==a){var l=o.push("translate(",null,e,null,r);s.push({i:l-4,x:Ke(t,i)},{i:l-2,x:Ke(n,a)})}else(i||a)&&o.push("translate("+i+e+a+r)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,r,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:Ke(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:Ke(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Ke(t,r)},{i:s-2,x:Ke(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r<n;)s[(e=l[r]).i]=e.x(t);return s.join("")}}}var Ye=Ge(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?We:Ue(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Ve=Ge(function(t){return null==t?We:(je||(je=document.createElementNS("http://www.w3.org/2000/svg","g")),je.setAttribute("transform",t),(t=je.transform.baseVal.consolidate())?Ue((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):We)},", ",")",")");function He(t,e){var r,n;return function(){var i=Pe(this,t),a=i.tween;if(a!==r)for(var o=0,s=(n=r=a).length;o<s;++o)if(n[o].name===e){(n=n.slice()).splice(o,1);break}i.tween=n}}function Xe(t,e,r){var n,i;if("function"!=typeof r)throw new Error;return function(){var a=Pe(this,t),o=a.tween;if(o!==n){i=(n=o).slice();for(var s={name:e,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=s;break}l===c&&i.push(s)}a.tween=i}}function Ze(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n,i=Be(this.node(),r).tween,a=0,o=i.length;a<o;++a)if((n=i[a]).name===t)return n.value;return null}return this.each((null==e?He:Xe)(r,t,e))}function Qe(t,e,r){var n=t._id;return t.each(function(){var t=Pe(this,n);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Be(t,n).value[e]}}function Je(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function tr(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function er(){}Object.defineProperty(Ze,"name",{value:"default",configurable:!0}),Object.defineProperty(Je,"name",{value:"default",configurable:!0});var rr=.7,nr=1/rr,ir="\\s*([+-]?\\d+)\\s*",ar="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",or="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sr=/^#([0-9a-f]{3,8})$/,lr=new RegExp(`^rgb\\(${ir},${ir},${ir}\\)$`),cr=new RegExp(`^rgb\\(${or},${or},${or}\\)$`),hr=new RegExp(`^rgba\\(${ir},${ir},${ir},${ar}\\)$`),ur=new RegExp(`^rgba\\(${or},${or},${or},${ar}\\)$`),dr=new RegExp(`^hsl\\(${ar},${or},${or}\\)$`),pr=new RegExp(`^hsla\\(${ar},${or},${or},${ar}\\)$`),fr={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};function gr(){return this.rgb().formatHex()}function mr(){return this.rgb().formatRgb()}function yr(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=sr.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?vr(e):3===r?new wr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?br(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?br(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lr.exec(t))?new wr(e[1],e[2],e[3],1):(e=cr.exec(t))?new wr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=hr.exec(t))?br(e[1],e[2],e[3],e[4]):(e=ur.exec(t))?br(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=dr.exec(t))?Ar(e[1],e[2]/100,e[3]/100,1):(e=pr.exec(t))?Ar(e[1],e[2]/100,e[3]/100,e[4]):fr.hasOwnProperty(t)?vr(fr[t]):"transparent"===t?new wr(NaN,NaN,NaN,0):null}function vr(t){return new wr(t>>16&255,t>>8&255,255&t,1)}function br(t,e,r,n){return n<=0&&(t=e=r=NaN),new wr(t,e,r,n)}function xr(t){return t instanceof er||(t=yr(t)),t?new wr((t=t.rgb()).r,t.g,t.b,t.opacity):new wr}function Tr(t,e,r,n){return 1===arguments.length?xr(t):new wr(t,e,r,n??1)}function wr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function kr(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}`}function Cr(){const t=Er(this.opacity);return`${1===t?"rgb(":"rgba("}${Sr(this.r)}, ${Sr(this.g)}, ${Sr(this.b)}${1===t?")":`, ${t})`}`}function Er(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Sr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _r(t){return((t=Sr(t))<16?"0":"")+t.toString(16)}function Ar(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Lr(t,e,r,n)}function Rr(t){if(t instanceof Lr)return new Lr(t.h,t.s,t.l,t.opacity);if(t instanceof er||(t=yr(t)),!t)return new Lr;if(t instanceof Lr)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(r-n)/s+6*(r<n):r===a?(n-e)/s+2:(e-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Lr(o,s,l,t.opacity)}function Lr(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Ir(t){return(t=(t||0)%360)<0?t+360:t}function Dr(t){return Math.max(0,Math.min(1,t||0))}function Nr(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Mr(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function Or(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],o=n>0?t[n-1]:2*i-a,s=n<e-1?t[n+2]:2*a-i;return Mr((r-n/e)*e,o,i,a,s)}}function $r(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],o=t[(n+1)%e],s=t[(n+2)%e];return Mr((r-n/e)*e,i,a,o,s)}}Je(er,yr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:gr,formatHex:gr,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Rr(this).formatHsl()},formatRgb:mr,toString:mr}),Je(wr,Tr,tr(er,{brighter(t){return t=null==t?nr:Math.pow(nr,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wr(Sr(this.r),Sr(this.g),Sr(this.b),Er(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:kr,formatHex:kr,formatHex8:function(){return`#${_r(this.r)}${_r(this.g)}${_r(this.b)}${_r(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Cr,toString:Cr})),Je(Lr,function(t,e,r,n){return 1===arguments.length?Rr(t):new Lr(t,e,r,n??1)},tr(er,{brighter(t){return t=null==t?nr:Math.pow(nr,t),new Lr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?rr:Math.pow(rr,t),new Lr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),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 wr(Nr(t>=240?t-240:t+120,i,n),Nr(t,i,n),Nr(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Lr(Ir(this.h),Dr(this.s),Dr(this.l),Er(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=Er(this.opacity);return`${1===t?"hsl(":"hsla("}${Ir(this.h)}, ${100*Dr(this.s)}%, ${100*Dr(this.l)}%${1===t?")":`, ${t})`}`}})),Object.defineProperty(Or,"name",{value:"default",configurable:!0}),Object.defineProperty($r,"name",{value:"default",configurable:!0});const Pr=t=>()=>t;function Br(t,e){return function(r){return t+r*e}}function Fr(t){return 1===(t=+t)?zr:function(e,r){return 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)}}(e,r,t):Pr(isNaN(e)?r:e)}}function zr(t,e){var r=e-t;return r?Br(t,r):Pr(isNaN(t)?e:t)}(Object.getOwnPropertyDescriptor(Pr,"name")||{}).writable||Object.defineProperty(Pr,"name",{value:"default",configurable:!0});const Kr=function t(e){var r=Fr(e);function n(t,e){var n=r((t=Tr(t)).r,(e=Tr(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),o=zr(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function jr(t){return function(e){var r,n,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(r=0;r<i;++r)n=Tr(e[r]),a[r]=n.r||0,o[r]=n.g||0,s[r]=n.b||0;return a=t(a),o=t(o),s=t(s),n.opacity=1,function(t){return n.r=a(t),n.g=o(t),n.b=s(t),n+""}}}jr(Or),jr($r);Object.defineProperty(Ur,"name",{value:"default",configurable:!0});var qr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wr=new RegExp(qr.source,"g");function Ur(t,e){var r,n,i,a=qr.lastIndex=Wr.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(r=qr.exec(t))&&(n=Wr.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Ke(r,n)})),a=Wr.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join("")})}function Gr(t,e){var r;return("number"==typeof e?Ke:e instanceof yr?Kr:(r=yr(e))?(e=r,Kr):Ur)(t,e)}function Yr(t){return function(){this.removeAttribute(t)}}function Vr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hr(t,e,r){var n,i,a=r+"";return function(){var o=this.getAttribute(t);return o===a?null:o===n?i:i=e(n=o,r)}}function Xr(t,e,r){var n,i,a=r+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===n?i:i=e(n=o,r)}}function Zr(t,e,r){var n,i,a;return function(){var o,s,l=r(this);if(null!=l)return(o=this.getAttribute(t))===(s=l+"")?null:o===n&&s===i?a:(i=s,a=e(n=o,l));this.removeAttribute(t)}}function Qr(t,e,r){var n,i,a;return function(){var o,s,l=r(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:o===n&&s===i?a:(i=s,a=e(n=o,l));this.removeAttributeNS(t.space,t.local)}}function Jr(t,e){var r=tt(t),n="transform"===r?Ve:Gr;return this.attrTween(t,"function"==typeof e?(r.local?Qr:Zr)(r,n,Qe(this,"attr."+t,e)):null==e?(r.local?Vr:Yr)(r):(r.local?Xr:Hr)(r,n,e))}function tn(t,e){var r,n;function i(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,i)),r}return i._value=e,i}function en(t,e){var r,n;function i(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,i)),r}return i._value=e,i}function rn(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var n=tt(t);return this.tween(r,(n.local?tn:en)(n,e))}function nn(t,e){return function(){$e(this,t).delay=+e.apply(this,arguments)}}function an(t,e){return e=+e,function(){$e(this,t).delay=e}}function on(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nn:an)(e,t)):Be(this.node(),e).delay}function sn(t,e){return function(){Pe(this,t).duration=+e.apply(this,arguments)}}function ln(t,e){return e=+e,function(){Pe(this,t).duration=e}}function cn(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?sn:ln)(e,t)):Be(this.node(),e).duration}function hn(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Pe(this,t).ease=e}}(e,t)):Be(this.node(),e).ease}function un(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;Pe(this,t).ease=r}}(this._id,t))}function dn(t){"function"!=typeof t&&(t=w(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a,o=e[i],s=o.length,l=n[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&l.push(a);return new An(n,this._parents,this._name,this._id)}function pn(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),o=new Array(n),s=0;s<a;++s)for(var l,c=e[s],h=r[s],u=c.length,d=o[s]=new Array(u),p=0;p<u;++p)(l=c[p]||h[p])&&(d[p]=l);for(;s<n;++s)o[s]=e[s];return new An(o,this._parents,this._name,this._id)}function fn(t,e){var r=this._id;return arguments.length<2?Be(this.node(),r).on.on(t):this.each(function(t,e,r){var n,i,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?$e:Pe;return function(){var o=a(this,t),s=o.on;s!==n&&(i=(n=s).copy()).on(e,r),o.on=i}}(r,t,e))}function gn(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))}function mn(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=m(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o<i;++o)for(var s,l,c=n[o],h=c.length,u=a[o]=new Array(h),d=0;d<h;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),u[d]=l,Oe(u[d],e,r,d,u,Be(s,r)));return new An(a,this._parents,e,r)}function yn(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=b(t));for(var n=this._groups,i=n.length,a=[],o=[],s=0;s<i;++s)for(var l,c=n[s],h=c.length,u=0;u<h;++u)if(l=c[u]){for(var d,p=t.call(l,l.__data__,u,c),f=Be(l,r),g=0,m=p.length;g<m;++g)(d=p[g])&&Oe(d,e,r,g,p,f);a.push(p),o.push(l)}return new An(a,o,e,r)}Object.defineProperty(Gr,"name",{value:"default",configurable:!0}),Object.defineProperty(Jr,"name",{value:"default",configurable:!0}),Object.defineProperty(rn,"name",{value:"default",configurable:!0}),Object.defineProperty(on,"name",{value:"default",configurable:!0}),Object.defineProperty(cn,"name",{value:"default",configurable:!0}),Object.defineProperty(hn,"name",{value:"default",configurable:!0}),Object.defineProperty(un,"name",{value:"default",configurable:!0}),Object.defineProperty(dn,"name",{value:"default",configurable:!0}),Object.defineProperty(pn,"name",{value:"default",configurable:!0}),Object.defineProperty(fn,"name",{value:"default",configurable:!0}),Object.defineProperty(gn,"name",{value:"default",configurable:!0}),Object.defineProperty(mn,"name",{value:"default",configurable:!0}),Object.defineProperty(yn,"name",{value:"default",configurable:!0}),Object.defineProperty(bn,"name",{value:"default",configurable:!0});var vn=le.prototype.constructor;function bn(){return new vn(this._groups,this._parents)}function xn(t){return function(){this.style.removeProperty(t)}}function Tn(t,e,r){var n="transform"==(t+="")?Ye:Gr;return null==e?this.styleTween(t,function(t,e){var r,n,i;return function(){var a=pt(this,t),o=(this.style.removeProperty(t),pt(this,t));return a===o?null:a===r&&o===n?i:i=e(r=a,n=o)}}(t,n)).on("end.style."+t,xn(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var n,i,a;return function(){var o=pt(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=pt(this,t)),o===l?null:o===n&&l===i?a:(i=l,a=e(n=o,s))}}(t,n,Qe(this,"style."+t,e))).each(function(t,e){var r,n,i,a,o="style."+e,s="end."+o;return function(){var l=Pe(this,t),c=l.on,h=null==l.value[o]?a||(a=xn(e)):void 0;c===r&&i===h||(n=(r=c).copy()).on(s,i=h),l.on=n}}(this._id,t)):this.styleTween(t,function(t,e,r){var n,i,a=r+"";return function(){var o=pt(this,t);return o===a?null:o===n?i:i=e(n=o,r)}}(t,n,e),r).on("end.style."+t,null)}function wn(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,function(t,e,r){var n,i;function a(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&function(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}(t,a,r)),n}return a._value=e,a}(t,e,r??""))}function kn(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(Qe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))}function Cn(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function n(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&function(t){return function(e){this.textContent=t.call(this,e)}}(n)),e}return n._value=t,n}(t))}function En(){for(var t=this._name,e=this._id,r=Rn(),n=this._groups,i=n.length,a=0;a<i;++a)for(var o,s=n[a],l=s.length,c=0;c<l;++c)if(o=s[c]){var h=Be(o,e);Oe(o,t,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new An(n,this._parents,t,r)}function Sn(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,o){var s={value:o},l={value:function(){0===--i&&a()}};r.each(function(){var r=Pe(this,n),i=r.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),r.on=e}),0===i&&a()})}Object.defineProperty(Tn,"name",{value:"default",configurable:!0}),Object.defineProperty(wn,"name",{value:"default",configurable:!0}),Object.defineProperty(kn,"name",{value:"default",configurable:!0}),Object.defineProperty(Cn,"name",{value:"default",configurable:!0}),Object.defineProperty(En,"name",{value:"default",configurable:!0}),Object.defineProperty(Sn,"name",{value:"default",configurable:!0});var _n=0;function An(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Rn(){return++_n}var Ln=le.prototype;An.prototype=function(t){return le().transition(t)}.prototype={constructor:An,select:mn,selectAll:yn,selectChild:Ln.selectChild,selectChildren:Ln.selectChildren,filter:dn,merge:pn,selection:bn,transition:En,call:Ln.call,nodes:Ln.nodes,node:Ln.node,size:Ln.size,empty:Ln.empty,each:Ln.each,on:fn,attr:Jr,attrTween:rn,style:Tn,styleTween:wn,text:kn,textTween:Cn,remove:gn,tween:Ze,delay:on,duration:cn,ease:hn,easeVarying:un,end:Sn,[Symbol.iterator]:Ln[Symbol.iterator]},Object.defineProperty(Bn,"name",{value:"default",configurable:!0});var In,Dn,Nn,Mn,On,$n={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Pn(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 Bn(t){var e,r;t instanceof An?(e=t._id,t=t._name):(e=Rn(),(r=$n).time=Ee(),t=null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var o,s=n[a],l=s.length,c=0;c<l;++c)(o=s[c])&&Oe(o,t,e,c,s,r||Pn(o,e));return new An(n,this._parents,t,e)}le.prototype.interrupt=ze,le.prototype.transition=Bn,Object.defineProperty(function(){return si(Xn)},"name",{value:"default",configurable:!0});var Fn={name:"drag"},zn={name:"space"},Kn={name:"handle"},jn={name:"center"};const{abs:qn,max:Wn,min:Un}=Math;function Gn(t){return[+t[0],+t[1]]}function Yn(t){return[Gn(t[0]),Gn(t[1])]}var Vn={name:"x",handles:["w","e"].map(ri),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Hn={name:"y",handles:["n","s"].map(ri),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Xn={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(ri),input:function(t){return null==t?null:Yn(t)},output:function(t){return t}},Zn={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qn={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Jn={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ti={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ei={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function ri(t){return{type:t}}function ni(t){return!t.ctrlKey&&!t.button}function ii(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ai(){return navigator.maxTouchPoints||"ontouchstart"in this}function oi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function si(t){var e,r=ii,n=ni,i=ai,a=!0,o=(void 0)("start","brush","end"),s=6;function l(e){var r=e.property("__brush",g).selectAll(".overlay").data([ri("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Zn.overlay).merge(r).each(function(){var t=oi(this).extent;Dn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([ri("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Zn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var n=e.selectAll(".handle").data(t.handles,function(t){return t.type});n.exit().remove(),n.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return Zn[t.type]}),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",f).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=Dn(this),e=oi(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function h(t,e,r){var n=t.__brush.emitter;return!n||r&&n.clean?new u(t,e,r):n}function u(t,e,r){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=r}function d(r){if((!e||r.touches)&&n.apply(this,arguments)){var i,o,s,l,u,d,p,f,g,m,y,v=this,b=r.target.__data__.type,x="selection"===(a&&r.metaKey?b="overlay":b)?Fn:a&&r.altKey?jn:Kn,T=t===Hn?null:ti[b],w=t===Vn?null:ei[b],k=oi(v),C=k.extent,E=k.selection,S=C[0][0],_=C[0][1],A=C[1][0],R=C[1][1],L=0,I=0,D=T&&w&&a&&r.shiftKey,N=Array.from(r.touches||[r],t=>{const e=t.identifier;return(t=In(t,v)).point0=t.slice(),t.identifier=e,t});Nn(v);var M=h(v,arguments,!0).beforestart();if("overlay"===b){E&&(g=!0);const e=[N[0],N[1]||N[0]];k.selection=E=[[i=t===Hn?S:Un(e[0][0],e[1][0]),s=t===Vn?_:Un(e[0][1],e[1][1])],[u=t===Hn?A:Wn(e[0][0],e[1][0]),p=t===Vn?R:Wn(e[0][1],e[1][1])]],N.length>1&&F(r)}else i=E[0][0],s=E[0][1],u=E[1][0],p=E[1][1];o=i,l=s,d=u,f=p;var O=Dn(v).attr("pointer-events","none"),$=O.selectAll(".overlay").attr("cursor",Zn[b]);if(r.touches)M.moved=B,M.ended=z;else{var P=Dn(r.view).on("mousemove.brush",B,!0).on("mouseup.brush",z,!0);a&&P.on("keydown.brush",function(t){switch(t.keyCode){case 16:D=T&&w;break;case 18:x===Kn&&(T&&(u=d-L*T,i=o+L*T),w&&(p=f-I*w,s=l+I*w),x=jn,F(t));break;case 32:x!==Kn&&x!==jn||(T<0?u=d-L:T>0&&(i=o-L),w<0?p=f-I:w>0&&(s=l-I),x=zn,$.attr("cursor",Zn.selection),F(t));break;default:return}On(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:D&&(m=y=D=!1,F(t));break;case 18:x===jn&&(T<0?u=d:T>0&&(i=o),w<0?p=f:w>0&&(s=l),x=Kn,F(t));break;case 32:x===zn&&(t.altKey?(T&&(u=d-L*T,i=o+L*T),w&&(p=f-I*w,s=l+I*w),x=jn):(T<0?u=d:T>0&&(i=o),w<0?p=f:w>0&&(s=l),x=Kn),$.attr("cursor",Zn[b]),F(t));break;default:return}On(t)},!0),(void 0)(r.view)}c.call(v),M.start(r,x.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of N)t.identifier===e.identifier&&(t.cur=In(e,v));if(D&&!m&&!y&&1===N.length){const t=N[0];qn(t.cur[0]-t[0])>qn(t.cur[1]-t[1])?y=!0:m=!0}for(const e of N)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);g=!0,On(t),F(t)}function F(t){const e=N[0],r=e.point0;var n;switch(L=e[0]-r[0],I=e[1]-r[1],x){case zn:case Fn:T&&(L=Wn(S-i,Un(A-u,L)),o=i+L,d=u+L),w&&(I=Wn(_-s,Un(R-p,I)),l=s+I,f=p+I);break;case Kn:N[1]?(T&&(o=Wn(S,Un(A,N[0][0])),d=Wn(S,Un(A,N[1][0])),T=1),w&&(l=Wn(_,Un(R,N[0][1])),f=Wn(_,Un(R,N[1][1])),w=1)):(T<0?(L=Wn(S-i,Un(A-i,L)),o=i+L,d=u):T>0&&(L=Wn(S-u,Un(A-u,L)),o=i,d=u+L),w<0?(I=Wn(_-s,Un(R-s,I)),l=s+I,f=p):w>0&&(I=Wn(_-p,Un(R-p,I)),l=s,f=p+I));break;case jn:T&&(o=Wn(S,Un(A,i-L*T)),d=Wn(S,Un(A,u+L*T))),w&&(l=Wn(_,Un(R,s-I*w)),f=Wn(_,Un(R,p+I*w)))}d<o&&(T*=-1,n=i,i=u,u=n,n=o,o=d,d=n,b in Qn&&$.attr("cursor",Zn[b=Qn[b]])),f<l&&(w*=-1,n=s,s=p,p=n,n=l,l=f,f=n,b in Jn&&$.attr("cursor",Zn[b=Jn[b]])),k.selection&&(E=k.selection),m&&(o=E[0][0],d=E[1][0]),y&&(l=E[0][1],f=E[1][1]),E[0][0]===o&&E[0][1]===l&&E[1][0]===d&&E[1][1]===f||(k.selection=[[o,l],[d,f]],c.call(v),M.brush(t,x.name))}function z(t){if((void 0)(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else(void 0)(t.view,g),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);O.attr("pointer-events","all"),$.attr("cursor",Zn.overlay),k.selection&&(E=k.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(E)&&(k.selection=null,c.call(v)),M.end(t,x.name)}}function p(t){h(this,arguments).moved(t)}function f(t){h(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=Yn(r.apply(this,arguments)),e.dim=t,e}return l.move=function(e,r,n){e.tween?e.on("start.brush",function(t){h(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){h(this,arguments).end(t)}).tween("brush",function(){var e=this,n=e.__brush,i=h(e,arguments),a=n.selection,o=t.input("function"==typeof r?r.apply(this,arguments):r,n.extent),s=(void 0)(a,o);function l(t){n.selection=1===t&&null===o?null:s(t),c.call(e),i.brush()}return null!==a&&null!==o?l:l(1)}):e.each(function(){var e=this,i=arguments,a=e.__brush,o=t.input("function"==typeof r?r.apply(e,i):r,a.extent),s=h(e,i).beforestart();Nn(e),a.selection=null===o?null:o,c.call(e),s.start(n).brush(n).end(n)})},l.clear=function(t,e){l.move(t,null,e)},u.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,r,n){var i=Dn(this.that).datum();o.call(e,this.that,new(void 0)(e,{sourceEvent:r,target:l,selection:t.output(this.state.selection),mode:n,dispatch:o}),i)}},l.extent=function(t){return arguments.length?(r="function"==typeof t?t:Mn(Yn(t)),l):r},l.filter=function(t){return arguments.length?(n="function"==typeof t?t:Mn(!!t),l):n},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Mn(!!t),l):i},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(a=!!t,l):a},l.on=function(){var t=o.on.apply(o,arguments);return t===o?l:t},l}function li(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ci(t,e){if(!isFinite(t)||0===t)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function hi(t){return(t=ci(Math.abs(t)))?t[1]:NaN}function ui(t,e){return function(r,n){for(var i=r.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function di(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}Object.defineProperty(li,"name",{value:"default",configurable:!0}),Object.defineProperty(hi,"name",{value:"default",configurable:!0}),Object.defineProperty(ui,"name",{value:"default",configurable:!0}),Object.defineProperty(di,"name",{value:"default",configurable:!0});var pi,fi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gi(t){if(!(e=fi.exec(t)))throw new Error("invalid format: "+t);var e;return new mi({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]})}function mi(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yi(t){t:for(var e,r=t.length,n=1,i=-1;n<r;++n)switch(t[n]){case".":i=e=n;break;case"0":0===i&&(i=n),e=n;break;default:if(!+t[n])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}function vi(t,e){var r=ci(t,e);if(!r)return pi=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(pi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+ci(t,Math.max(0,e+a-1))[0]}function bi(t,e){var r=ci(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")}gi.prototype=mi.prototype,mi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},Object.defineProperty(yi,"name",{value:"default",configurable:!0}),Object.defineProperty(vi,"name",{value:"default",configurable:!0}),Object.defineProperty(bi,"name",{value:"default",configurable:!0});const xi={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:li,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)=>bi(100*t,e),r:bi,s:vi,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ti(t){return t}Object.defineProperty(Ti,"name",{value:"default",configurable:!0}),Object.defineProperty(_i,"name",{value:"default",configurable:!0});var wi,ki,Ci,Ei=Array.prototype.map,Si=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _i(t){var e=void 0===t.grouping||void 0===t.thousands?Ti:ui(Ei.call(t.grouping,Number),t.thousands+""),r=void 0===t.currency?"":t.currency[0]+"",n=void 0===t.currency?"":t.currency[1]+"",i=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Ti:di(Ei.call(t.numerals,String)),o=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(t,c){var h=(t=gi(t)).fill,u=t.align,d=t.sign,p=t.symbol,f=t.zero,g=t.width,m=t.comma,y=t.precision,v=t.trim,b=t.type;"n"===b?(m=!0,b="g"):xi[b]||(void 0===y&&(y=12),v=!0,b="g"),(f||"0"===h&&"="===u)&&(f=!0,h="0",u="=");var x=(c&&void 0!==c.prefix?c.prefix:"")+("$"===p?r:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),T=("$"===p?n:/[%p]/.test(b)?o:"")+(c&&void 0!==c.suffix?c.suffix:""),w=xi[b],k=/[defgprs%]/.test(b);function C(t){var r,n,o,c=x,p=T;if("c"===b)p=w(t)+p,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),y),v&&(t=yi(t)),C&&0===+t&&"+"!==d&&(C=!1),c=(C?"("===d?d:s:"-"===d||"("===d?"":d)+c,p=("s"!==b||isNaN(t)||void 0===pi?"":Si[8+pi/3])+p+(C&&"("===d?")":""),k)for(r=-1,n=t.length;++r<n;)if(48>(o=t.charCodeAt(r))||o>57){p=(46===o?i+t.slice(r+1):t.slice(r))+p,t=t.slice(0,r);break}}m&&!f&&(t=e(t,1/0));var E=c.length+t.length+p.length,S=E<g?new Array(g-E+1).join(h):"";switch(m&&f&&(t=e(S+t,S.length?g-p.length:1/0),S=""),u){case"<":t=c+t+p+S;break;case"=":t=c+S+t+p;break;case"^":t=S.slice(0,E=S.length>>1)+c+t+p+S.slice(E);break;default:t=S+c+t+p}return a(t)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),C.toString=function(){return t+""},C}return{format:c,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(hi(e)/3))),n=Math.pow(10,-r),i=c(((t=gi(t)).type="f",t),{suffix:Si[8+r/3]});return function(t){return i(n*t)}}}}function Ai(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function Ri(){return this.eachAfter(Ai)}function Li(t,e){let r=-1;for(const n of this)t.call(e,n,++r,this);return this}function Ii(t,e){for(var r,n,i=this,a=[i],o=-1;i=a.pop();)if(t.call(e,i,++o,this),r=i.children)for(n=r.length-1;n>=0;--n)a.push(r[n]);return this}function Di(t,e){for(var r,n,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),r=a.children)for(n=0,i=r.length;n<i;++n)o.push(r[n]);for(;a=s.pop();)t.call(e,a,++l,this);return this}function Ni(t,e){let r=-1;for(const n of this)if(t.call(e,n,++r,this))return n}function Mi(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r})}function Oi(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function $i(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n}function Pi(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function Bi(){return Array.from(this)}function Fi(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function zi(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*Ki(){var t,e,r,n,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(r=0,n=e.length;r<n;++r)a.push(e[r])}while(a.length)}function ji(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Wi)):void 0===e&&(e=qi);for(var r,n,i,a,o,s=new Yi(t),l=[s];r=l.pop();)if((i=e(r.data))&&(o=(i=Array.from(i)).length))for(r.children=i,a=o-1;a>=0;--a)l.push(n=i[a]=new Yi(i[a])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(Gi)}function qi(t){return t.children}function Wi(t){return Array.isArray(t)?t[1]:null}function Ui(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Gi(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Yi(t){this.data=t,this.depth=this.height=0,this.parent=null}function Vi(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Hi(t,e,r,n,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(n-e)/t.value;++s<l;)(a=o[s]).y0=r,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function Xi(t,e,r,n,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-r)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=n,a.y0=r,a.y1=r+=a.value*c}wi=_i({thousands:",",grouping:[3],currency:["$",""]}),ki=wi.format,Ci=wi.formatPrefix,Object.defineProperty(Ri,"name",{value:"default",configurable:!0}),Object.defineProperty(Li,"name",{value:"default",configurable:!0}),Object.defineProperty(Ii,"name",{value:"default",configurable:!0}),Object.defineProperty(Di,"name",{value:"default",configurable:!0}),Object.defineProperty(Ni,"name",{value:"default",configurable:!0}),Object.defineProperty(Mi,"name",{value:"default",configurable:!0}),Object.defineProperty(Oi,"name",{value:"default",configurable:!0}),Object.defineProperty($i,"name",{value:"default",configurable:!0}),Object.defineProperty(Pi,"name",{value:"default",configurable:!0}),Object.defineProperty(Bi,"name",{value:"default",configurable:!0}),Object.defineProperty(Fi,"name",{value:"default",configurable:!0}),Object.defineProperty(zi,"name",{value:"default",configurable:!0}),Object.defineProperty(Ki,"name",{value:"default",configurable:!0}),Yi.prototype=ji.prototype={constructor:Yi,count:Ri,each:Li,eachAfter:Di,eachBefore:Ii,find:Ni,sum:Mi,sort:Oi,path:$i,ancestors:Pi,descendants:Bi,leaves:Fi,links:zi,copy:function(){return ji(this).eachBefore(Ui)},[Symbol.iterator]:Ki},Object.defineProperty(Vi,"name",{value:"default",configurable:!0}),Object.defineProperty(Hi,"name",{value:"default",configurable:!0}),Object.defineProperty(Xi,"name",{value:"default",configurable:!0});const Zi=function t(e){function r(t,r,n,i,a){!function(t,e,r,n,i,a){for(var o,s,l,c,h,u,d,p,f,g,m,y=[],v=e.children,b=0,x=0,T=v.length,w=e.value;b<T;){l=i-r,c=a-n;do{h=v[x++].value}while(!h&&x<T);for(u=d=h,m=h*h*(g=Math.max(c/l,l/c)/(w*t)),f=Math.max(d/m,m/u);x<T;++x){if(h+=s=v[x].value,s<u&&(u=s),s>d&&(d=s),m=h*h*g,(p=Math.max(d/m,m/u))>f){h-=s;break}f=p}y.push(o={value:h,dice:l<c,children:v.slice(b,x)}),o.dice?Hi(o,r,n,i,w?n+=c*h/w:a):Xi(o,r,n,w?r+=l*h/w:i,a),w-=h,b=x}}(e,t,r,n,i,a)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}((1+Math.sqrt(5))/2);function Qi(t){if("function"!=typeof t)throw new Error;return t}function Ji(){return 0}function ta(t){return function(){return t}}function ea(){var t=Zi,e=!1,r=1,n=1,i=[0],a=Ji,o=Ji,s=Ji,l=Ji,c=Ji;function h(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(u),i=[0],e&&t.eachBefore(Vi),t}function u(e){var r=i[e.depth],n=e.x0+r,h=e.y0+r,u=e.x1-r,d=e.y1-r;u<n&&(n=u=(n+u)/2),d<h&&(h=d=(h+d)/2),e.x0=n,e.y0=h,e.x1=u,e.y1=d,e.children&&(r=i[e.depth+1]=a(e)/2,n+=c(e)-r,h+=o(e)-r,(u-=s(e)-r)<n&&(n=u=(n+u)/2),(d-=l(e)-r)<h&&(h=d=(h+d)/2),t(e,n,h,u,d))}return h.round=function(t){return arguments.length?(e=!!t,h):e},h.size=function(t){return arguments.length?(r=+t[0],n=+t[1],h):[r,n]},h.tile=function(e){return arguments.length?(t=Qi(e),h):t},h.padding=function(t){return arguments.length?h.paddingInner(t).paddingOuter(t):h.paddingInner()},h.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:ta(+t),h):a},h.paddingOuter=function(t){return arguments.length?h.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):h.paddingTop()},h.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:ta(+t),h):o},h.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:ta(+t),h):s},h.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:ta(+t),h):l},h.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:ta(+t),h):c},h}Object.defineProperty(ta,"name",{value:"default",configurable:!0}),Object.defineProperty(ea,"name",{value:"default",configurable:!0});const ra=Math.PI/180,na=180/Math.PI,ia=.96422,aa=.82521,oa=4/29,sa=6/29,la=3*sa*sa,ca=sa*sa*sa;function ha(t){if(t instanceof ua)return new ua(t.l,t.a,t.b,t.opacity);if(t instanceof va)return ba(t);t instanceof wr||(t=xr(t));var e,r,n=ga(t.r),i=ga(t.g),a=ga(t.b),o=da((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=da((.4360747*n+.3850649*i+.1430804*a)/ia),r=da((.0139322*n+.0971045*i+.7141733*a)/aa)),new ua(116*o-16,500*(e-o),200*(o-r),t.opacity)}function ua(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function da(t){return t>ca?Math.pow(t,1/3):t/la+oa}function pa(t){return t>sa?t*t*t:la*(t-oa)}function fa(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ga(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ma(t){if(t instanceof va)return new va(t.h,t.c,t.l,t.opacity);if(t instanceof ua||(t=ha(t)),0===t.a&&0===t.b)return new va(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*na;return new va(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ya(t,e,r,n){return 1===arguments.length?ma(t):new va(t,e,r,n??1)}function va(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function ba(t){if(isNaN(t.h))return new ua(t.l,0,0,t.opacity);var e=t.h*ra;return new ua(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function xa(t){return function(e,r){var n=t((e=ya(e)).h,(r=ya(r)).h),i=zr(e.c,r.c),a=zr(e.l,r.l),o=zr(e.opacity,r.opacity);return function(t){return e.h=n(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}Je(ua,function(t,e,r,n){return 1===arguments.length?ha(t):new ua(t,e,r,n??1)},tr(er,{brighter(t){return new ua(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new ua(this.l-18*(t??1),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 new wr(fa(3.1338561*(e=ia*pa(e))-1.6168667*(t=1*pa(t))-.4906146*(r=aa*pa(r))),fa(-.9787684*e+1.9161415*t+.033454*r),fa(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Je(va,ya,tr(er,{brighter(t){return new va(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new va(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return ba(this).rgb()}}));const Ta=xa(function(t,e){var r=e-t;return r?Br(t,r>180||r<-180?r-360*Math.round(r/360):r):Pr(isNaN(t)?e:t)});xa(zr);function wa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class ka extends Map{constructor(t,e=_a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,n]of t)this.set(r,n)}get(t){return super.get(Ca(this,t))}has(t){return super.has(Ca(this,t))}set(t,e){return super.set(Ea(this,t),e)}delete(t){return super.delete(Sa(this,t))}}Set;function Ca({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function Ea({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function Sa({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function _a(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Aa=Symbol("implicit");function Ra(){var t=new ka,e=[],r=[],n=Aa;function i(i){let a=t.get(i);if(void 0===a){if(n!==Aa)return n;t.set(i,a=e.push(i)-1)}return r[a%r.length]}return i.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new ka;for(const n of r)t.has(n)||t.set(n,e.push(n)-1);return i},i.range=function(t){return arguments.length?(r=Array.from(t),i):r.slice()},i.unknown=function(t){return arguments.length?(n=t,i):n},i.copy=function(){return Ra(e,r).unknown(n)},wa.apply(i,arguments),i}function La(){var t,e,r=Ra().unknown(void 0),n=r.domain,i=r.range,a=0,o=1,s=!1,l=0,c=0,h=.5;function u(){var r=n().length,u=o<a,d=u?o:a,p=u?a:o;t=(p-d)/Math.max(1,r-l+2*c),s&&(t=Math.floor(t)),d+=(p-d-t*(r-l))*h,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var f=function(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n<i;)a[n]=t+n*r;return a}(r).map(function(e){return d+t*e});return i(u?f.reverse():f)}return delete r.unknown,r.domain=function(t){return arguments.length?(n(t),u()):n()},r.range=function(t){return arguments.length?([a,o]=t,a=+a,o=+o,u()):[a,o]},r.rangeRound=function(t){return[a,o]=t,a=+a,o=+o,s=!0,u()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(s=!!t,u()):s},r.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),u()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},r.paddingOuter=function(t){return arguments.length?(c=+t,u()):c},r.align=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),u()):h},r.copy=function(){return La(n(),[a,o]).round(s).paddingInner(l).paddingOuter(c).align(h)},wa.apply(u(),arguments)}const Ia=Math.sqrt(50),Da=Math.sqrt(10),Na=Math.sqrt(2);function Ma(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=Ia?10:a>=Da?5:a>=Na?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(t*c),l=Math.round(e*c),s/c<t&&++s,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(t/c),l=Math.round(e/c),s*c<t&&++s,l*c>e&&--l),l<s&&.5<=r&&r<2?Ma(t,e,2*r):[s,l,c]}function Oa(t,e,r){return Ma(t=+t,e=+e,r=+r)[2]}function $a(t,e,r){r=+r;const n=(e=+e)<(t=+t),i=n?Oa(e,t,r):Oa(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function Pa(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ba(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Fa(t){let e,r,n;function i(t,n,i=0,a=t.length){if(i<a){if(0!==e(n,n))return a;do{const e=i+a>>>1;r(t[e],n)<0?i=e+1:a=e}while(i<a)}return i}return 2!==t.length?(e=Pa,r=(e,r)=>Pa(t(e),r),n=(e,r)=>t(e)-r):(e=t===Pa||t===Ba?t:za,r=t,n=t),{left:i,center:function(t,e,r=0,a=t.length){const o=i(t,e,r,a-1);return o>r&&n(t[o-1],e)>-n(t[o],e)?o-1:o},right:function(t,n,i=0,a=t.length){if(i<a){if(0!==e(n,n))return a;do{const e=i+a>>>1;r(t[e],n)<=0?i=e+1:a=e}while(i<a)}return i}}}function za(){return 0}const Ka=Fa(Pa),ja=Ka.right,qa=(Ka.left,Fa(function(t){return null===t?NaN:+t}).center,ja);function Wa(t,e){var r,n=e?e.length:0,i=t?Math.min(n,t.length):0,a=new Array(i),o=new Array(n);for(r=0;r<i;++r)a[r]=Va(t[r],e[r]);for(;r<n;++r)o[r]=e[r];return function(t){for(r=0;r<i;++r)o[r]=a[r](t);return o}}function Ua(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Ga(t,e){var r,n={},i={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?n[r]=Va(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}function Ya(t,e){e||(e=[]);var r,n=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(r=0;r<n;++r)i[r]=t[r]*(1-a)+e[r]*a;return i}}function Va(t,e){var r,n,i=typeof e;return null==e||"boolean"===i?Pr(e):("number"===i?Ke:"string"===i?(r=yr(e))?(e=r,Kr):Ur:e instanceof yr?Kr:e instanceof Date?Ua:(n=e,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(e)?Wa:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ga:Ke:Ya))(t,e)}function Ha(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function Xa(t){return+t}Object.defineProperty(function(t,e){return((void 0)(e)?void 0:Wa)(t,e)},"name",{value:"default",configurable:!0}),Object.defineProperty(Ua,"name",{value:"default",configurable:!0}),Object.defineProperty(Ga,"name",{value:"default",configurable:!0}),Object.defineProperty(Ya,"name",{value:"default",configurable:!0}),Object.defineProperty(Va,"name",{value:"default",configurable:!0}),Object.defineProperty(Ha,"name",{value:"default",configurable:!0});var Za=[0,1];function Qa(t){return t}function Ja(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function to(t,e,r){var n=t[0],i=t[1],a=e[0],o=e[1];return i<n?(n=Ja(i,n),a=r(o,a)):(n=Ja(n,i),a=r(a,o)),function(t){return a(n(t))}}function eo(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),o=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<n;)i[o]=Ja(t[o],t[o+1]),a[o]=r(e[o],e[o+1]);return function(e){var r=qa(t,e,1,n)-1;return a[r](i[r](e))}}function ro(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function no(){var t,e,r,n,i,a,o=Za,s=Za,l=Va,c=Qa;function h(){var t,e,r,l=Math.min(o.length,s.length);return c!==Qa&&(t=o[0],e=o[l-1],t>e&&(r=t,t=e,e=r),c=function(r){return Math.max(t,Math.min(e,r))}),n=l>2?eo:to,i=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(i||(i=n(o.map(t),s,l)))(t(c(e)))}return u.invert=function(r){return c(e((a||(a=n(s,o.map(t),Ke)))(r)))},u.domain=function(t){return arguments.length?(o=Array.from(t,Xa),h()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Ha,h()},u.clamp=function(t){return arguments.length?(c=!!t||Qa,h()):c!==Qa},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,n){return t=r,e=n,h()}}function io(){return no()(Qa,Qa)}function ao(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hi(e)/3)))-hi(Math.abs(t)))}function oo(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,hi(e)-hi(t))+1}function so(t){return Math.max(0,-hi(Math.abs(t)))}function lo(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const n=e<t,[i,a,o]=n?Ma(e,t,r):Ma(t,e,r);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(a-c)/-o;else for(let c=0;c<s;++c)l[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}(r[0],r[r.length-1],t??10)},t.tickFormat=function(t,r){var n=e();return function(t,e,r,n){var i,a=$a(t,e,r);switch((n=gi(n??",f")).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=ao(a,o))||(n.precision=i),Ci(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=oo(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=so(a))||(n.precision=i-2*("%"===n.type))}return ki(n)}(n[0],n[n.length-1],t??10,r)},t.nice=function(r){null==r&&(r=10);var n,i,a=e(),o=0,s=a.length-1,l=a[o],c=a[s],h=10;for(c<l&&(i=l,l=c,c=i,i=o,o=s,s=i);h-- >0;){if((i=Oa(l,c,r))===n)return a[o]=l,a[s]=c,e(a);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}n=i}return t},t}function co(){var t=io();return t.copy=function(){return ro(t,co())},wa.apply(t,arguments),lo(t)}Object.defineProperty(ao,"name",{value:"default",configurable:!0}),Object.defineProperty(oo,"name",{value:"default",configurable:!0}),Object.defineProperty(so,"name",{value:"default",configurable:!0});const ho=1e3,uo=6e4,po=36e5,fo=864e5,go=6048e5,mo=2592e6,yo=31536e6,vo=new Date,bo=new Date;function xo(t,e,r,n){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),i.round=t=>{const e=i(t),r=i.ceil(t);return t-e<r-t?e:r},i.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),i.range=(r,n,a)=>{const o=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r<n&&a>0))return o;let s;do{o.push(s=new Date(+r)),e(r,a),t(r)}while(s<r&&r<n);return o},i.filter=r=>xo(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,n)=>{if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}),r&&(i.count=(e,n)=>(vo.setTime(+e),bo.setTime(+n),t(vo),t(bo),Math.floor(r(vo,bo))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(n?e=>n(e)%t===0:e=>i.count(0,e)%t===0):i:null)),i}const To=xo(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);To.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?xo(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):To:null);To.range;const wo=xo(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ho)},(t,e)=>(e-t)/ho,t=>t.getUTCSeconds()),ko=(wo.range,xo(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ho)},(t,e)=>{t.setTime(+t+e*uo)},(t,e)=>(e-t)/uo,t=>t.getMinutes())),Co=(ko.range,xo(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*uo)},(t,e)=>(e-t)/uo,t=>t.getUTCMinutes())),Eo=(Co.range,xo(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ho-t.getMinutes()*uo)},(t,e)=>{t.setTime(+t+e*po)},(t,e)=>(e-t)/po,t=>t.getHours())),So=(Eo.range,xo(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*po)},(t,e)=>(e-t)/po,t=>t.getUTCHours())),_o=(So.range,xo(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*uo)/fo,t=>t.getDate()-1)),Ao=(_o.range,xo(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/fo,t=>t.getUTCDate()-1)),Ro=(Ao.range,xo(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/fo,t=>Math.floor(t/fo)));Ro.range;function Lo(t){return xo(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*uo)/go)}const Io=Lo(0),Do=Lo(1),No=Lo(2),Mo=Lo(3),Oo=Lo(4),$o=Lo(5),Po=Lo(6);Io.range,Do.range,No.range,Mo.range,Oo.range,$o.range,Po.range;function Bo(t){return xo(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/go)}const Fo=Bo(0),zo=Bo(1),Ko=Bo(2),jo=Bo(3),qo=Bo(4),Wo=Bo(5),Uo=Bo(6),Go=(Fo.range,zo.range,Ko.range,jo.range,qo.range,Wo.range,Uo.range,xo(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),Yo=(Go.range,xo(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),Vo=(Yo.range,xo(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));Vo.every=t=>isFinite(t=Math.floor(t))&&t>0?xo(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null;Vo.range;const Ho=xo(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ho.every=t=>isFinite(t=Math.floor(t))&&t>0?xo(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null;Ho.range;function Xo(t,e,r,n,i,a){const o=[[wo,1,ho],[wo,5,5e3],[wo,15,15e3],[wo,30,3e4],[a,1,uo],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,po],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,fo],[n,2,1728e5],[r,1,go],[e,1,mo],[e,3,7776e6],[t,1,yo]];function s(e,r,n){const i=Math.abs(r-e)/n,a=Fa(([,,t])=>t).right(o,i);if(a===o.length)return t.every($a(e/yo,r/yo,n));if(0===a)return To.every(Math.max($a(e,r,n),1));const[s,l]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(l)}return[function(t,e,r){const n=e<t;n&&([t,e]=[e,t]);const i=r&&"function"==typeof r.range?r:s(t,e,r),a=i?i.range(t,+e+1):[];return n?a.reverse():a},s]}const[Zo,Qo]=Xo(Ho,Yo,Fo,Ro,So,Co),[Jo,ts]=Xo(Vo,Go,Io,_o,Eo,ko);function es(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 rs(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 ns(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var is,as,os={"-":"",_:" ",0:"0"},ss=/^\s*\d+/,ls=/^%/,cs=/[\\^$*+?|[\]().{}]/g;function hs(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function us(t){return t.replace(cs,"\\$&")}function ds(t){return new RegExp("^(?:"+t.map(us).join("|")+")","i")}function ps(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function fs(t,e,r){var n=ss.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function gs(t,e,r){var n=ss.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function ms(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function ys(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function vs(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function bs(t,e,r){var n=ss.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function xs(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Ts(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 ws(t,e,r){var n=ss.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function ks(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Cs(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Es(t,e,r){var n=ss.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Ss(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function _s(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function As(t,e,r){var n=ss.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Rs(t,e,r){var n=ss.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Ls(t,e,r){var n=ss.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Is(t,e,r){var n=ls.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Ds(t,e,r){var n=ss.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Ns(t,e,r){var n=ss.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Ms(t,e){return hs(t.getDate(),e,2)}function Os(t,e){return hs(t.getHours(),e,2)}function $s(t,e){return hs(t.getHours()%12||12,e,2)}function Ps(t,e){return hs(1+_o.count(Vo(t),t),e,3)}function Bs(t,e){return hs(t.getMilliseconds(),e,3)}function Fs(t,e){return Bs(t,e)+"000"}function zs(t,e){return hs(t.getMonth()+1,e,2)}function Ks(t,e){return hs(t.getMinutes(),e,2)}function js(t,e){return hs(t.getSeconds(),e,2)}function qs(t){var e=t.getDay();return 0===e?7:e}function Ws(t,e){return hs(Io.count(Vo(t)-1,t),e,2)}function Us(t){var e=t.getDay();return e>=4||0===e?Oo(t):Oo.ceil(t)}function Gs(t,e){return t=Us(t),hs(Oo.count(Vo(t),t)+(4===Vo(t).getDay()),e,2)}function Ys(t){return t.getDay()}function Vs(t,e){return hs(Do.count(Vo(t)-1,t),e,2)}function Hs(t,e){return hs(t.getFullYear()%100,e,2)}function Xs(t,e){return hs((t=Us(t)).getFullYear()%100,e,2)}function Zs(t,e){return hs(t.getFullYear()%1e4,e,4)}function Qs(t,e){var r=t.getDay();return hs((t=r>=4||0===r?Oo(t):Oo.ceil(t)).getFullYear()%1e4,e,4)}function Js(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+hs(e/60|0,"0",2)+hs(e%60,"0",2)}function tl(t,e){return hs(t.getUTCDate(),e,2)}function el(t,e){return hs(t.getUTCHours(),e,2)}function rl(t,e){return hs(t.getUTCHours()%12||12,e,2)}function nl(t,e){return hs(1+Ao.count(Ho(t),t),e,3)}function il(t,e){return hs(t.getUTCMilliseconds(),e,3)}function al(t,e){return il(t,e)+"000"}function ol(t,e){return hs(t.getUTCMonth()+1,e,2)}function sl(t,e){return hs(t.getUTCMinutes(),e,2)}function ll(t,e){return hs(t.getUTCSeconds(),e,2)}function cl(t){var e=t.getUTCDay();return 0===e?7:e}function hl(t,e){return hs(Fo.count(Ho(t)-1,t),e,2)}function ul(t){var e=t.getUTCDay();return e>=4||0===e?qo(t):qo.ceil(t)}function dl(t,e){return t=ul(t),hs(qo.count(Ho(t),t)+(4===Ho(t).getUTCDay()),e,2)}function pl(t){return t.getUTCDay()}function fl(t,e){return hs(zo.count(Ho(t)-1,t),e,2)}function gl(t,e){return hs(t.getUTCFullYear()%100,e,2)}function ml(t,e){return hs((t=ul(t)).getUTCFullYear()%100,e,2)}function yl(t,e){return hs(t.getUTCFullYear()%1e4,e,4)}function vl(t,e){var r=t.getUTCDay();return hs((t=r>=4||0===r?qo(t):qo.ceil(t)).getUTCFullYear()%1e4,e,4)}function bl(){return"+0000"}function xl(){return"%"}function Tl(t){return+t}function wl(t){return Math.floor(+t/1e3)}function kl(t){return new Date(t)}function Cl(t){return t instanceof Date?+t:+new Date(+t)}function El(t,e,r,n,i,a,o,s,l,c){var h=io(),u=h.invert,d=h.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y");function T(t){return(l(t)<t?p:s(t)<t?f:o(t)<t?g:a(t)<t?m:n(t)<t?i(t)<t?y:v:r(t)<t?b:x)(t)}return h.invert=function(t){return new Date(u(t))},h.domain=function(t){return arguments.length?d(Array.from(t,Cl)):d().map(kl)},h.ticks=function(e){var r=d();return t(r[0],r[r.length-1],e??10)},h.tickFormat=function(t,e){return null==e?T:c(e)},h.nice=function(t){var r=d();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],t??10)),t?d(function(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}(r,t)):h},h.copy=function(){return ro(h,El(t,e,r,n,i,a,o,s,l,c))},h}function Sl(){return wa.apply(El(Jo,ts,Vo,Go,Io,_o,Eo,ko,wo,as).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function _l(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(6*n,6*++n);return r}!function(t){is=function(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,l=t.shortMonths,c=ds(i),h=ps(i),u=ds(a),d=ps(a),p=ds(o),f=ps(o),g=ds(s),m=ps(s),y=ds(l),v=ps(l),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ms,e:Ms,f:Fs,g:Xs,G:Qs,H:Os,I:$s,j:Ps,L:Bs,m:zs,M:Ks,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Tl,s:wl,S:js,u:qs,U:Ws,V:Gs,w:Ys,W:Vs,x:null,X:null,y:Hs,Y:Zs,Z:Js,"%":xl},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:tl,e:tl,f:al,g:ml,G:vl,H:el,I:rl,j:nl,L:il,m:ol,M:sl,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Tl,s:wl,S:ll,u:cl,U:hl,V:dl,w:pl,W:fl,x:null,X:null,y:gl,Y:yl,Z:bl,"%":xl},T={a:function(t,e,r){var n=p.exec(e.slice(r));return n?(t.w=f.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){var n=u.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){var n=g.exec(e.slice(r));return n?(t.m=m.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,r,n){return C(t,e,r,n)},d:Cs,e:Cs,f:Ls,g:xs,G:bs,H:Ss,I:Ss,j:Es,L:Rs,m:ks,M:_s,p:function(t,e,r){var n=c.exec(e.slice(r));return n?(t.p=h.get(n[0].toLowerCase()),r+n[0].length):-1},q:ws,Q:Ds,s:Ns,S:As,u:gs,U:ms,V:ys,w:fs,W:vs,x:function(t,e,n){return C(t,r,e,n)},X:function(t,e,r){return C(t,n,e,r)},y:xs,Y:bs,Z:Ts,"%":Is};function w(t,e){return function(r){var n,i,a,o=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=os[n=t.charAt(++s)])?n=t.charAt(++s):i="e"===n?" ":"0",(a=e[n])&&(n=a(r,i)),o.push(n),l=s+1);return o.push(t.slice(l,s)),o.join("")}}function k(t,e){return function(r){var n,i,a=ns(1900,void 0,1);if(C(a,t,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=rs(ns(a.y,0,1))).getUTCDay(),n=i>4||0===i?zo.ceil(n):zo(n),n=Ao.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=es(ns(a.y,0,1))).getDay(),n=i>4||0===i?Do.ceil(n):Do(n),n=_o.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?rs(ns(a.y,0,1)).getUTCDay():es(ns(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,rs(a)):es(a)}}function C(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o<s;){if(n>=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=T[i in os?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return b.x=w(r,b),b.X=w(n,b),b.c=w(e,b),x.x=w(r,x),x.X=w(n,x),x.c=w(e,x),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(t),as=is.format,is.parse,is.utcFormat,is.utcParse}({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"]}),Object.defineProperty(_l,"name",{value:"default",configurable:!0});const Al=_l("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Rl(t){return"string"==typeof t?new oe([[document.querySelector(t)]],[document.documentElement]):new oe([[t]],ae)}function Ll(t){return function(){return t}}Object.defineProperty(Rl,"name",{value:"default",configurable:!0}),Object.defineProperty(Ll,"name",{value:"default",configurable:!0});const Il=Math.abs,Dl=Math.atan2,Nl=Math.cos,Ml=Math.max,Ol=Math.min,$l=Math.sin,Pl=Math.sqrt,Bl=1e-12,Fl=Math.PI,zl=Fl/2,Kl=2*Fl;function jl(t){return t>=1?zl:t<=-1?-zl:Math.asin(t)}const ql=Math.PI,Wl=2*ql,Ul=1e-6,Gl=Wl-Ul;function Yl(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class Vl{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Yl:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Yl;const r=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,n){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(t,e,r,n,i,a){this._append`C${+t},${+e},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,r,n,i){if(t=+t,e=+e,r=+r,n=+n,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=r-t,l=n-e,c=a-t,h=o-e,u=c*c+h*h;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Ul)if(Math.abs(h*s-l*c)>Ul&&i){let d=r-a,p=n-o,f=s*s+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(u),v=i*Math.tan((ql-Math.acos((f+u-g)/(2*m*y)))/2),b=v/y,x=v/m;Math.abs(b-1)>Ul&&this._append`L${t+b*c},${e+b*h}`,this._append`A${i},${i},0,0,${+(h*d>c*p)},${this._x1=t+x*s},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,n,i,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(n),s=r*Math.sin(n),l=t+o,c=e+s,h=1^a,u=a?n-i:i-n;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ul||Math.abs(this._y1-c)>Ul)&&this._append`L${l},${c}`,r&&(u<0&&(u=u%Wl+Wl),u>Gl?this._append`A${r},${r},0,1,${h},${t-o},${e-s}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:u>Ul&&this._append`A${r},${r},0,${+(u>=ql)},${h},${this._x1=t+r*Math.cos(i)},${this._y1=e+r*Math.sin(i)}`)}rect(t,e,r,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function Hl(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Vl(e)}function Xl(t){return t.innerRadius}function Zl(t){return t.outerRadius}function Ql(t){return t.startAngle}function Jl(t){return t.endAngle}function tc(t){return t&&t.padAngle}function ec(t,e,r,n,i,a,o){var s=t-r,l=e-n,c=(o?a:-a)/Pl(s*s+l*l),h=c*l,u=-c*s,d=t+h,p=e+u,f=r+h,g=n+u,m=(d+f)/2,y=(p+g)/2,v=f-d,b=g-p,x=v*v+b*b,T=i-a,w=d*g-f*p,k=(b<0?-1:1)*Pl(Ml(0,T*T*x-w*w)),C=(w*b-v*k)/x,E=(-w*v-b*k)/x,S=(w*b+v*k)/x,_=(-w*v+b*k)/x,A=C-m,R=E-y,L=S-m,I=_-y;return A*A+R*R>L*L+I*I&&(C=S,E=_),{cx:C,cy:E,x01:-h,y01:-u,x11:C*(i/T-1),y11:E*(i/T-1)}}function rc(){var t=Xl,e=Zl,r=Ll(0),n=null,i=Ql,a=Jl,o=tc,s=null,l=Hl(c);function c(){var c,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=i.apply(this,arguments)-zl,g=a.apply(this,arguments)-zl,m=Il(g-f),y=g>f;if(s||(s=c=l()),p<d&&(h=p,p=d,d=h),p>Bl)if(m>Kl-Bl)s.moveTo(p*Nl(f),p*$l(f)),s.arc(0,0,p,f,g,!y),d>Bl&&(s.moveTo(d*Nl(g),d*$l(g)),s.arc(0,0,d,g,f,y));else{var v,b,x=f,T=g,w=f,k=g,C=m,E=m,S=o.apply(this,arguments)/2,_=S>Bl&&(n?+n.apply(this,arguments):Pl(d*d+p*p)),A=Ol(Il(p-d)/2,+r.apply(this,arguments)),R=A,L=A;if(_>Bl){var I=jl(_/d*$l(S)),D=jl(_/p*$l(S));(C-=2*I)>Bl?(w+=I*=y?1:-1,k-=I):(C=0,w=k=(f+g)/2),(E-=2*D)>Bl?(x+=D*=y?1:-1,T-=D):(E=0,x=T=(f+g)/2)}var N=p*Nl(x),M=p*$l(x),O=d*Nl(k),$=d*$l(k);if(A>Bl){var P,B=p*Nl(T),F=p*$l(T),z=d*Nl(w),K=d*$l(w);if(m<Fl)if(P=function(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,h=o-i,u=s-a,d=u*l-h*c;if(!(d*d<Bl))return[t+(d=(h*(e-a)-u*(t-i))/d)*l,e+d*c]}(N,M,z,K,B,F,O,$)){var j=N-P[0],q=M-P[1],W=B-P[0],U=F-P[1],G=1/$l(((u=(j*W+q*U)/(Pl(j*j+q*q)*Pl(W*W+U*U)))>1?0:u<-1?Fl:Math.acos(u))/2),Y=Pl(P[0]*P[0]+P[1]*P[1]);R=Ol(A,(d-Y)/(G-1)),L=Ol(A,(p-Y)/(G+1))}else R=L=0}E>Bl?L>Bl?(v=ec(z,K,N,M,p,L,y),b=ec(B,F,O,$,p,L,y),s.moveTo(v.cx+v.x01,v.cy+v.y01),L<A?s.arc(v.cx,v.cy,L,Dl(v.y01,v.x01),Dl(b.y01,b.x01),!y):(s.arc(v.cx,v.cy,L,Dl(v.y01,v.x01),Dl(v.y11,v.x11),!y),s.arc(0,0,p,Dl(v.cy+v.y11,v.cx+v.x11),Dl(b.cy+b.y11,b.cx+b.x11),!y),s.arc(b.cx,b.cy,L,Dl(b.y11,b.x11),Dl(b.y01,b.x01),!y))):(s.moveTo(N,M),s.arc(0,0,p,x,T,!y)):s.moveTo(N,M),d>Bl&&C>Bl?R>Bl?(v=ec(O,$,B,F,d,-R,y),b=ec(N,M,z,K,d,-R,y),s.lineTo(v.cx+v.x01,v.cy+v.y01),R<A?s.arc(v.cx,v.cy,R,Dl(v.y01,v.x01),Dl(b.y01,b.x01),!y):(s.arc(v.cx,v.cy,R,Dl(v.y01,v.x01),Dl(v.y11,v.x11),!y),s.arc(0,0,d,Dl(v.cy+v.y11,v.cx+v.x11),Dl(b.cy+b.y11,b.cx+b.x11),y),s.arc(b.cx,b.cy,R,Dl(b.y11,b.x11),Dl(b.y01,b.x01),!y))):s.arc(0,0,d,k,w,y):s.lineTo(O,$)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Fl/2;return[Nl(n)*r,$l(n)*r]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ll(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ll(+t),c):e},c.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:Ll(+t),c):r},c.padRadius=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Ll(+t),c):n},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ll(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ll(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ll(+t),c):o},c.context=function(t){return arguments.length?(s=t??null,c):s},c}Object.defineProperty(rc,"name",{value:"default",configurable:!0}),Object.defineProperty(nc,"name",{value:"default",configurable:!0});Array.prototype.slice;function nc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ic(t){this._context=t}function ac(t){return new ic(t)}function oc(t){return t[0]}function sc(t){return t[1]}function lc(t,e){var r=Ll(!0),n=null,i=ac,a=null,o=Hl(s);function s(s){var l,c,h,u=(s=nc(s)).length,d=!1;for(null==n&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&r(c=s[l],l,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(c,l,s),+e(c,l,s));if(h)return a=null,h+""||null}return t="function"==typeof t?t:void 0===t?oc:Ll(t),e="function"==typeof e?e:void 0===e?sc:Ll(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:Ll(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:Ll(+t),s):e},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:Ll(!!t),s):r},s.curve=function(t){return arguments.length?(i=t,null!=n&&(a=i(n)),s):i},s.context=function(t){return arguments.length?(null==t?n=a=null:a=i(n=t),s):n},s}function cc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function hc(t){return t}function uc(){var t=hc,e=cc,r=null,n=Ll(0),i=Ll(Kl),a=Ll(0);function o(o){var s,l,c,h,u,d=(o=nc(o)).length,p=0,f=new Array(d),g=new Array(d),m=+n.apply(this,arguments),y=Math.min(Kl,Math.max(-Kl,i.apply(this,arguments)-m)),v=Math.min(Math.abs(y)/d,a.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s<d;++s)(u=g[f[s]=s]=+t(o[s],s,o))>0&&(p+=u);for(null!=e?f.sort(function(t,r){return e(g[t],g[r])}):null!=r&&f.sort(function(t,e){return r(o[t],o[e])}),s=0,c=p?(y-d*b)/p:0;s<d;++s,m=h)l=f[s],h=m+((u=g[l])>0?u*c:0)+b,g[l]={data:o[l],index:s,value:u,startAngle:m,endAngle:h,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Ll(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,r=null,o):e},o.sort=function(t){return arguments.length?(r=t,e=null,o):r},o.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:Ll(+t),o):n},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ll(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ll(+t),o):a},o}function dc(){}function pc(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 fc(t){this._context=t}function gc(t){return new fc(t)}function mc(t){this._context=t}function yc(t){return new mc(t)}function vc(t){this._context=t}function bc(t){return new vc(t)}Object.defineProperty(ac,"name",{value:"default",configurable:!0}),ic.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}},Object.defineProperty(lc,"name",{value:"default",configurable:!0}),Object.defineProperty(cc,"name",{value:"default",configurable:!0}),Object.defineProperty(hc,"name",{value:"default",configurable:!0}),Object.defineProperty(uc,"name",{value:"default",configurable:!0}),Object.defineProperty(dc,"name",{value:"default",configurable:!0}),Object.defineProperty(gc,"name",{value:"default",configurable:!0}),fc.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:pc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:pc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Object.defineProperty(yc,"name",{value:"default",configurable:!0}),mc.prototype={areaStart:dc,areaEnd:dc,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)}},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:pc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Object.defineProperty(bc,"name",{value:"default",configurable:!0}),vc.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||0!==this._line&&3===this._point)&&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:pc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class xc{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function Tc(t){return new xc(t,!0)}function wc(t){return new xc(t,!1)}function kc(t,e){this._basis=new fc(t),this._beta=e}kc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Cc=function t(e){function r(t){return 1===e?new fc(t):new kc(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function Ec(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Sc(t,e){this._context=t,this._k=(1-e)/6}Sc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ec(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ec(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _c=function t(e){function r(t){return new Sc(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ac(t,e){this._context=t,this._k=(1-e)/6}Ac.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ec(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Rc=function t(e){function r(t){return new Ac(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Lc(t,e){this._context=t,this._k=(1-e)/6}Lc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&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,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ec(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ic=function t(e){function r(t){return new Lc(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Dc(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Bl){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Bl){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Nc(t,e){this._context=t,this._alpha=e}Nc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}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;default:Dc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mc=function t(e){function r(t){return e?new Nc(t,e):new Sc(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Oc(t,e){this._context=t,this._alpha=e}Oc.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Dc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $c=function t(e){function r(t){return e?new Oc(t,e):new Ac(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Pc(t,e){this._context=t,this._alpha=e}Pc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Dc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Bc=function t(e){function r(t){return e?new Pc(t,e):new Lc(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Fc(t){this._context=t}function zc(t){return new Fc(t)}function Kc(t){return t<0?-1:1}function jc(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Kc(a)+Kc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function qc(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Wc(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function Uc(t){this._context=t}function Gc(t){this._context=new Yc(t)}function Yc(t){this._context=t}function Vc(t){return new Uc(t)}function Hc(t){return new Gc(t)}function Xc(t){this._context=t}function Zc(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/a[e-1],a[e]-=r,o[e]-=r*o[e-1];for(i[n-1]=o[n-1]/a[n-1],e=n-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Qc(t){return new Xc(t)}function Jc(t,e){this._context=t,this._t=e}function th(t){return new Jc(t,.5)}function eh(t){return new Jc(t,0)}function rh(t){return new Jc(t,1)}function nh(t,e,r){this.k=t,this.x=e,this.y=r}Object.defineProperty(zc,"name",{value:"default",configurable:!0}),Fc.prototype={areaStart:dc,areaEnd:dc,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))}},Uc.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:Wc(this,this._t0,qc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+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,Wc(this,qc(this,r=jc(this,t,e)),r);break;default:Wc(this,this._t0,r=jc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Gc.prototype=Object.create(Uc.prototype)).point=function(t,e){Uc.prototype.point.call(this,e,t)},Yc.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,a){this._context.bezierCurveTo(e,t,n,r,a,i)}},Object.defineProperty(Qc,"name",{value:"default",configurable:!0}),Xc.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]),2===r)this._context.lineTo(t[1],e[1]);else for(var n=Zc(t),i=Zc(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===r)&&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)}},Object.defineProperty(th,"name",{value:"default",configurable:!0}),Jc.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&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)}}this._x=t,this._y=e}},nh.prototype={constructor:nh,scale:function(t){return 1===t?this:new nh(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new nh(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+")"}};var ih,ah,oh,sh,lh,ch,hh,uh;new nh(1,0,0);function dh(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function ph(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function fh(){return this.__zoom||lh}function gh(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function mh(){return navigator.maxTouchPoints||"ontouchstart"in this}function yh(t,e,r){var n=t.invertX(e[0][0])-r[0][0],i=t.invertX(e[1][0])-r[1][0],a=t.invertY(e[0][1])-r[0][1],o=t.invertY(e[1][1])-r[1][1];return t.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}nh.prototype,Object.defineProperty(function(){var t,e,r,n=dh,i=ph,a=yh,o=gh,s=mh,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],h=250,u=void 0,d=(void 0)("start","zoom","end"),p=0,f=10;function g(t){t.property("__zoom",fh).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",C).filter(s).on("touchstart.zoom",E).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",_).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new ch(e,t.x,t.y)}function y(t,e,r){var n=e[0]-r[0]*t.k,i=e[1]-r[1]*t.k;return n===t.x&&i===t.y?t:new ch(t.k,n,i)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function b(t,e,r,n){t.on("start.zoom",function(){x(this,arguments).event(n).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(n).end()}).tween("zoom",function(){var t=this,a=arguments,o=x(t,a).event(n),s=i.apply(t,a),l=null==r?v(s):"function"==typeof r?r.apply(t,a):r,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),h=t.__zoom,d="function"==typeof e?e.apply(t,a):e,p=u(h.invert(l).concat(c/h.k),d.invert(l).concat(c/d.k));return function(t){if(1===t)t=d;else{var e=p(t),r=c/e[2];t=new ch(r,l[0]-e[0]*r,l[1]-e[1]*r)}o.zoom(null,t)}})}function x(t,e,r){return!r&&t.__zooming||new T(t,e)}function T(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function w(t,...e){if(n.apply(this,arguments)){var r=x(this,e).event(t),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,o.apply(this,arguments)))),h=ih(t);if(r.wheel)r.mouse[0][0]===h[0]&&r.mouse[0][1]===h[1]||(r.mouse[1]=i.invert(r.mouse[0]=h)),clearTimeout(r.wheel);else{if(i.k===s)return;r.mouse=[h,i.invert(h)],oh(this),r.start()}hh(t),r.wheel=setTimeout(function(){r.wheel=null,r.end()},150),r.zoom("mouse",a(y(m(i,s),r.mouse[0],r.mouse[1]),r.extent,c))}}function k(t,...e){if(!r&&n.apply(this,arguments)){var i=t.currentTarget,o=x(this,e,!0).event(t),s=ah(t.view).on("mousemove.zoom",function(t){if(hh(t),!o.moved){var e=t.clientX-h,r=t.clientY-u;o.moved=e*e+r*r>p}o.event(t).zoom("mouse",a(y(o.that.__zoom,o.mouse[0]=ih(t,i),o.mouse[1]),o.extent,c))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),(void 0)(t.view,o.moved),hh(t),o.event(t).end()},!0),l=ih(t,i),h=t.clientX,u=t.clientY;(void 0)(t.view),uh(t),o.mouse=[l,this.__zoom.invert(l)],oh(this),o.start()}}function C(t,...e){if(n.apply(this,arguments)){var r=this.__zoom,o=ih(t.changedTouches?t.changedTouches[0]:t,this),s=r.invert(o),l=r.k*(t.shiftKey?.5:2),u=a(y(m(r,l),o,s),i.apply(this,e),c);hh(t),h>0?ah(this).transition().duration(h).call(b,u,o,t):ah(this).call(g.transform,u,o,t)}}function E(r,...i){if(n.apply(this,arguments)){var a,o,s,l,c=r.touches,h=c.length,u=x(this,i,r.changedTouches.length===h).event(r);for(uh(r),o=0;o<h;++o)s=c[o],l=[l=ih(s,this),this.__zoom.invert(l),s.identifier],u.touch0?u.touch1||u.touch0[2]===l[2]||(u.touch1=l,u.taps=0):(u.touch0=l,a=!0,u.taps=1+!!t);t&&(t=clearTimeout(t)),a&&(u.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),oh(this),u.start())}}function S(t,...e){if(this.__zooming){var r,n,i,o,s=x(this,e).event(t),l=t.changedTouches,h=l.length;for(hh(t),r=0;r<h;++r)n=l[r],i=ih(n,this),s.touch0&&s.touch0[2]===n.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===n.identifier&&(s.touch1[0]=i);if(n=s.that.__zoom,s.touch1){var u=s.touch0[0],d=s.touch0[1],p=s.touch1[0],f=s.touch1[1],g=(g=p[0]-u[0])*g+(g=p[1]-u[1])*g,v=(v=f[0]-d[0])*v+(v=f[1]-d[1])*v;n=m(n,Math.sqrt(g/v)),i=[(u[0]+p[0])/2,(u[1]+p[1])/2],o=[(d[0]+f[0])/2,(d[1]+f[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],o=s.touch0[1]}s.zoom("touch",a(y(n,i,o),s.extent,c))}}function _(t,...n){if(this.__zooming){var i,a,o=x(this,n).event(t),s=t.changedTouches,l=s.length;for(uh(t),r&&clearTimeout(r),r=setTimeout(function(){r=null},500),i=0;i<l;++i)a=s[i],o.touch0&&o.touch0[2]===a.identifier?delete o.touch0:o.touch1&&o.touch1[2]===a.identifier&&delete o.touch1;if(o.touch1&&!o.touch0&&(o.touch0=o.touch1,delete o.touch1),o.touch0)o.touch0[1]=this.__zoom.invert(o.touch0[0]);else if(o.end(),2===o.taps&&(a=ih(a,this),Math.hypot(e[0]-a[0],e[1]-a[1])<f)){var c=ah(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return g.transform=function(t,e,r,n){var i=t.selection?t.selection():t;i.property("__zoom",fh),t!==i?b(t,e,r,n):i.interrupt().each(function(){x(this,arguments).event(n).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},g.scaleBy=function(t,e,r,n){g.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},r,n)},g.scaleTo=function(t,e,r,n){g.transform(t,function(){var t=i.apply(this,arguments),n=this.__zoom,o=null==r?v(t):"function"==typeof r?r.apply(this,arguments):r,s=n.invert(o),l="function"==typeof e?e.apply(this,arguments):e;return a(y(m(n,l),o,s),t,c)},r,n)},g.translateBy=function(t,e,r,n){g.transform(t,function(){return a(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),i.apply(this,arguments),c)},null,n)},g.translateTo=function(t,e,r,n,o){g.transform(t,function(){var t=i.apply(this,arguments),o=this.__zoom,s=null==n?v(t):"function"==typeof n?n.apply(this,arguments):n;return a(lh.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof r?-r.apply(this,arguments):-r),t,c)},n,o)},T.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=ah(this.that).datum();d.call(t,this.that,new(void 0)(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:d}),e)}},g.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:sh(+t),g):o},g.filter=function(t){return arguments.length?(n="function"==typeof t?t:sh(!!t),g):n},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:sh(!!t),g):s},g.extent=function(t){return arguments.length?(i="function"==typeof t?t:sh([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):i},g.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],g):[l[0],l[1]]},g.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],g):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},g.constrain=function(t){return arguments.length?(a=t,g):a},g.duration=function(t){return arguments.length?(h=+t,g):h},g.interpolate=function(t){return arguments.length?(u=t,g):u},g.on=function(){var t=d.on.apply(d,arguments);return t===d?g:t},g.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,g):Math.sqrt(p)},g.tapDistance=function(t){return arguments.length?(f=+t,g):f},g},"name",{value:"default",configurable:!0})},5422(t,e,r){"use strict";r.d(e,{Zp:()=>Nr});var n=r(8058),i=r(3456),a=0;const o=function(t){var e=++a;return(0,i.A)(t)+e};var s=r(9142),l=r(7671);const c=function(t){return(null==t?0:t.length)?(0,l.A)(t,1):[]};var h=r(4722),u=Math.ceil,d=Math.max;const p=function(t,e,r,n){for(var i=-1,a=d(u((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o};var f=r(6984),g=r(8446),m=r(5353),y=r(3149);const v=function(t,e,r){if(!(0,y.A)(r))return!1;var n=typeof e;return!!("number"==n?(0,g.A)(r)&&(0,m.A)(e,r.length):"string"==n&&e in r)&&(0,f.A)(r[e],t)};var b=/\s/;const x=function(t){for(var e=t.length;e--&&b.test(t.charAt(e)););return e};var T=/^\s+/;const w=function(t){return t?t.slice(0,x(t)+1).replace(T,""):t};var k=r(1882),C=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,S=/^0o[0-7]+$/i,_=parseInt;const A=function(t){if("number"==typeof t)return t;if((0,k.A)(t))return NaN;if((0,y.A)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,y.A)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=w(t);var r=E.test(t);return r||S.test(t)?_(t.slice(2),r?2:8):C.test(t)?NaN:+t};var R=1/0;const L=function(t){return t?(t=A(t))===R||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};const I=function(t){return function(e,r,n){return n&&"number"!=typeof n&&v(e,r,n)&&(r=n=void 0),e=L(e),void 0===r?(r=e,e=0):r=L(r),n=void 0===n?e<r?1:-1:L(n),p(e,r,n,t)}}();var D=r(697);class N{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return M(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&M(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e}toString(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,O)),r=r._prev;return"["+t.join(", ")+"]"}}function M(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function O(t,e){if("_next"!==t&&"_prev"!==t)return e}var $=s.A(1);function P(t,e){if(t.nodeCount()<=1)return[];var r=function(t,e){var r=new D.T,i=0,a=0;n.A(t.nodes(),function(t){r.setNode(t,{v:t,in:0,out:0})}),n.A(t.edges(),function(t){var n=r.edge(t.v,t.w)||0,o=e(t),s=n+o;r.setEdge(t.v,t.w,s),a=Math.max(a,r.node(t.v).out+=o),i=Math.max(i,r.node(t.w).in+=o)});var o=I(a+i+3).map(function(){return new N}),s=i+1;return n.A(r.nodes(),function(t){F(o,s,r.node(t))}),{graph:r,buckets:o,zeroIdx:s}}(t,e||$),i=function(t,e,r){var n,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;n=o.dequeue();)B(t,e,r,n);for(;n=a.dequeue();)B(t,e,r,n);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(n=e[s].dequeue()){i=i.concat(B(t,e,r,n,!0));break}}return i}(r.graph,r.buckets,r.zeroIdx);return c(h.A(i,function(e){return t.outEdges(e.v,e.w)}))}function B(t,e,r,i,a){var o=a?[]:void 0;return n.A(t.inEdges(i.v),function(n){var i=t.edge(n),s=t.node(n.v);a&&o.push({v:n.v,w:n.w}),s.out-=i,F(e,r,s)}),n.A(t.outEdges(i.v),function(n){var i=t.edge(n),a=n.w,o=t.node(a);o.in-=i,F(e,r,o)}),t.removeNode(i.v),o}function F(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 z(t){var e="greedy"===t.graph().acyclicer?P(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],r={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,r[o]=!0,n.A(t.outEdges(o),function(t){Object.prototype.hasOwnProperty.call(r,t.w)?e.push(t):a(t.w)}),delete r[o])}return n.A(t.nodes(),a),e}(t);n.A(e,function(e){var r=t.edge(e);t.removeEdge(e),r.forwardName=e.name,r.reversed=!0,t.setEdge(e.w,e.v,r,o("rev"))})}var K=r(2080),j=r(2528);const q=function(t,e,r){(void 0!==r&&!(0,f.A)(t[e],r)||void 0===r&&!(e in t))&&(0,j.A)(t,e,r)};var W=r(7132),U=r(154),G=r(1801),Y=r(9759),V=r(407),H=r(5175),X=r(2049),Z=r(3533),Q=r(1200),J=r(9610),tt=r(9672),et=r(5647),rt=r(3098),nt=Function.prototype,it=Object.prototype,at=nt.toString,ot=it.hasOwnProperty,st=at.call(Object);const lt=function(t){if(!(0,rt.A)(t)||"[object Object]"!=(0,tt.A)(t))return!1;var e=(0,et.A)(t);if(null===e)return!0;var r=ot.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&at.call(r)==st};var ct=r(4749);const ht=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var ut=r(2031),dt=r(9999);const pt=function(t){return(0,ut.A)(t,(0,dt.A)(t))};const ft=function(t,e,r,n,i,a,o){var s=ht(t,r),l=ht(e,r),c=o.get(l);if(c)q(t,r,c);else{var h=a?a(s,l,r+"",t,e,o):void 0,u=void 0===h;if(u){var d=(0,X.A)(l),p=!d&&(0,Q.A)(l),f=!d&&!p&&(0,ct.A)(l);h=l,d||p||f?(0,X.A)(s)?h=s:(0,Z.A)(s)?h=(0,Y.A)(s):p?(u=!1,h=(0,U.A)(l,!0)):f?(u=!1,h=(0,G.A)(l,!0)):h=[]:lt(l)||(0,H.A)(l)?(h=s,(0,H.A)(s)?h=pt(s):(0,y.A)(s)&&!(0,J.A)(s)||(h=(0,V.A)(l))):u=!1}u&&(o.set(l,h),i(h,l,n,a,o),o.delete(l)),q(t,r,h)}};const gt=function t(e,r,n,i,a){e!==r&&(0,W.A)(r,function(o,s){if(a||(a=new K.A),(0,y.A)(o))ft(e,r,s,n,t,i,a);else{var l=i?i(ht(e,s),o,s+"",e,r,a):void 0;void 0===l&&(l=o),q(e,s,l)}},dt.A)};var mt=r(4326);const yt=function(t){return(0,mt.A)(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&v(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,a)}return e})}(function(t,e,r){gt(t,e,r)});var vt=r(6318),bt=r(2851),xt=r(4878),Tt=r(901);const wt=function(t,e,r,n){if(!(0,y.A)(t))return t;for(var i=-1,a=(e=(0,xt.A)(e,t)).length,o=a-1,s=t;null!=s&&++i<a;){var l=(0,Tt.A)(e[i]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=o){var h=s[l];void 0===(c=n?n(h,l,s):void 0)&&(c=(0,y.A)(h)?h:(0,m.A)(e[i+1])?[]:{})}(0,bt.A)(s,l,c),s=s[l]}return t};const kt=function(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var o=e[n],s=(0,vt.A)(t,o);r(s,o)&&wt(a,(0,xt.A)(o,t),s)}return a};var Ct=r(6964);const Et=function(t,e){return kt(t,e,function(e,r){return(0,Ct.A)(t,r)})};var St=r(5255),_t=r(7424);const At=function(t){return(0,_t.A)((0,St.A)(t,void 0,c),t+"")}(function(t,e){return null==t?{}:Et(t,e)});var Rt=Object.prototype,Lt=Rt.hasOwnProperty;const It=(0,mt.A)(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&v(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],o=(0,dt.A)(a),s=-1,l=o.length;++s<l;){var c=o[s],h=t[c];(void 0===h||(0,f.A)(h,Rt[c])&&!Lt.call(t,c))&&(t[c]=a[c])}return t});const Dt=function(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],o=e(a);if(null!=o&&(void 0===s?o==o&&!(0,k.A)(o):r(o,s)))var s=o,l=a}return l};const Nt=function(t,e){return t>e};var Mt=r(9008);const Ot=function(t){return t&&t.length?Dt(t,Mt.A,Nt):void 0};const $t=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};var Pt=r(9841),Bt=r(4425);const Ft=function(t,e){var r={};return e=(0,Bt.A)(e,3),(0,Pt.A)(t,function(t,n,i){(0,j.A)(r,n,e(t,n,i))}),r};var zt=r(9592);const Kt=function(t,e){return t<e};const jt=function(t){return t&&t.length?Dt(t,Mt.A,Kt):void 0};var qt=Object.prototype.hasOwnProperty;const Wt=function(t,e){return null!=t&&qt.call(t,e)};var Ut=r(5054);const Gt=function(t,e){return null!=t&&(0,Ut.A)(t,e,Wt)};var Yt=r(1917);const Vt=function(){return Yt.A.Date.now()};function Ht(t,e,r,n){var i;do{i=o(n)}while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function Xt(t){var e=new D.T({multigraph:t.isMultigraph()}).setGraph(t.graph());return n.A(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),n.A(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function Zt(t,e){var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,l=t.width/2,c=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),r=c*o/s,n=c):(o<0&&(l=-l),r=l,n=l*s/o),{x:i+r,y:a+n}}function Qt(t){var e=h.A(I(te(t)+1),function(){return[]});return n.A(t.nodes(),function(r){var n=t.node(r),i=n.rank;zt.A(i)||(e[i][n.order]=r)}),e}function Jt(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Ht(t,"border",i,e)}function te(t){return Ot(h.A(t.nodes(),function(e){var r=t.node(e).rank;if(!zt.A(r))return r}))}function ee(t,e){var r=Vt();try{return e()}finally{console.log(t+" time: "+(Vt()-r)+"ms")}}function re(t,e){return e()}function ne(t,e,r,n,i,a){var o={width:0,height:0,rank:a,borderType:e},s=i[e][a-1],l=Ht(t,"border",o,r);i[e][a]=l,t.setParent(l,n),s&&t.setEdge(s,l,{weight:1})}function ie(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){n.A(t.nodes(),function(e){se(t.node(e))}),n.A(t.edges(),function(e){var r=t.edge(e);n.A(r.points,se),Object.prototype.hasOwnProperty.call(r,"y")&&se(r)})}(t),"lr"!==e&&"rl"!==e||(!function(t){n.A(t.nodes(),function(e){le(t.node(e))}),n.A(t.edges(),function(e){var r=t.edge(e);n.A(r.points,le),Object.prototype.hasOwnProperty.call(r,"x")&&le(r)})}(t),ae(t))}function ae(t){n.A(t.nodes(),function(e){oe(t.node(e))}),n.A(t.edges(),function(e){oe(t.edge(e))})}function oe(t){var e=t.width;t.width=t.height,t.height=e}function se(t){t.y=-t.y}function le(t){var e=t.x;t.x=t.y,t.y=e}function ce(t){t.graph().dummyChains=[],n.A(t.edges(),function(e){!function(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,o=e.name,s=t.edge(e),l=s.labelRank;if(a===n+1)return;t.removeEdge(e);var c,h,u=void 0;for(h=0,++n;n<a;++h,++n)s.points=[],c=Ht(t,"edge",u={width:0,height:0,edgeLabel:s,edgeObj:e,rank:n},"_d"),n===l&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),t.setEdge(r,c,{weight:s.weight},o),0===h&&t.graph().dummyChains.push(c),r=c;t.setEdge(r,i,{weight:s.weight},o)}(t,e)})}const he=function(t,e){return t&&t.length?Dt(t,(0,Bt.A)(e,2),Kt):void 0};function ue(t){var e={};n.A(t.sources(),function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=jt(h.A(t.outEdges(n),function(e){return r(e.w)-t.edge(e).minlen}));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a})}function de(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function pe(t){var e,r,n=new D.T({directed:!1}),i=t.nodes()[0],a=t.nodeCount();for(n.setNode(i,{});fe(n,t)<a;)e=ge(n,t),r=n.hasNode(e.v)?de(t,e):-de(t,e),me(n,t,r);return n}function fe(t,e){return n.A(t.nodes(),function r(i){n.A(e.nodeEdges(i),function(n){var a=n.v,o=i===a?n.w:a;t.hasNode(o)||de(e,n)||(t.setNode(o,{}),t.setEdge(i,o,{}),r(o))})}),t.nodeCount()}function ge(t,e){return he(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return de(e,r)})}function me(t,e,r){n.A(t.nodes(),function(t){e.node(t).rank+=r})}var ye=r(7422);const ve=function(t){return function(e,r,n){var i=Object(e);if(!(0,g.A)(e)){var a=(0,Bt.A)(r,3);e=(0,ye.A)(e),r=function(t){return a(i[t],t,i)}}var o=t(e,r,n);return o>-1?i[a?e[o]:o]:void 0}};var be=r(5707);const xe=function(t){var e=L(t),r=e%1;return e==e?r?e-r:e:0};var Te=Math.max;const we=ve(function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:xe(r);return i<0&&(i=Te(n+i,0)),(0,be.A)(t,(0,Bt.A)(e,3),i)});var ke=r(6070);s.A(1);s.A(1);r(4453),r(9137);(0,r(805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Ce="\\ud800-\\udfff",Ee="["+Ce+"]",Se="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_e="\\ud83c[\\udffb-\\udfff]",Ae="[^"+Ce+"]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Le="[\\ud800-\\udbff][\\udc00-\\udfff]",Ie="(?:"+Se+"|"+_e+")"+"?",De="[\\ufe0e\\ufe0f]?",Ne=De+Ie+("(?:\\u200d(?:"+[Ae,Re,Le].join("|")+")"+De+Ie+")*"),Me="(?:"+[Ae+Se+"?",Se,Re,Le,Ee].join("|")+")";RegExp(_e+"(?="+_e+")|"+Me+Ne,"g");function Oe(){}function $e(t,e,r){X.A(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return n.A(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);Pe(t,e,"post"===r,o,i,a)}),a}function Pe(t,e,r,i,a,o){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r||o.push(e),n.A(a(e),function(e){Pe(t,e,r,i,a,o)}),r&&o.push(e))}Oe.prototype=new Error;r(2857);function Be(t){t=function(t){var e=(new D.T).setGraph(t.graph());return n.A(t.nodes(),function(r){e.setNode(r,t.node(r))}),n.A(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}(t),ue(t);var e,r=pe(t);for(Ke(r),Fe(r,t);e=qe(r);)Ue(r,t,e,We(r,t,e))}function Fe(t,e){var r=function(t,e){return $e(t,e,"post")}(t,t.nodes());r=r.slice(0,r.length-1),n.A(r,function(r){!function(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=ze(t,e,r)}(t,e,r)})}function ze(t,e,r){var i=t.node(r).parent,a=!0,o=e.edge(r,i),s=0;return o||(a=!1,o=e.edge(i,r)),s=o.weight,n.A(e.nodeEdges(r),function(n){var o,l,c=n.v===r,h=c?n.w:n.v;if(h!==i){var u=c===a,d=e.edge(n).weight;if(s+=u?d:-d,o=r,l=h,t.hasEdge(o,l)){var p=t.edge(r,h).cutvalue;s+=u?-p:p}}}),s}function Ke(t,e){arguments.length<2&&(e=t.nodes()[0]),je(t,{},1,e)}function je(t,e,r,i,a){var o=r,s=t.node(i);return e[i]=!0,n.A(t.neighbors(i),function(n){Object.prototype.hasOwnProperty.call(e,n)||(r=je(t,e,r,n,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function qe(t){return we(t.edges(),function(e){return t.edge(e).cutvalue<0})}function We(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),o=t.node(i),s=a,l=!1;a.lim>o.lim&&(s=o,l=!0);var c=ke.A(e.edges(),function(e){return l===Ge(t,t.node(e.v),s)&&l!==Ge(t,t.node(e.w),s)});return he(c,function(t){return de(e,t)})}function Ue(t,e,r,i){var a=r.v,o=r.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),Ke(t),Fe(t,e),function(t,e){var r=we(t.nodes(),function(t){return!e.node(t).parent}),i=function(t,e){return $e(t,e,"pre")}(t,r);i=i.slice(1),n.A(i,function(r){var n=t.node(r).parent,i=e.edge(r,n),a=!1;i||(i=e.edge(n,r),a=!0),e.node(r).rank=e.node(n).rank+(a?i.minlen:-i.minlen)})}(t,e)}function Ge(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function Ye(t){switch(t.graph().ranker){case"network-simplex":default:He(t);break;case"tight-tree":!function(t){ue(t),pe(t)}(t);break;case"longest-path":Ve(t)}}Be.initLowLimValues=Ke,Be.initCutValues=Fe,Be.calcCutValue=ze,Be.leaveEdge=qe,Be.enterEdge=We,Be.exchangeEdges=Ue;var Ve=ue;function He(t){Be(t)}var Xe=r(2866),Ze=r(3130);function Qe(t){var e=Ht(t,"root",{},"_root"),r=function(t){var e={};function r(i,a){var o=t.children(i);o&&o.length&&n.A(o,function(t){r(t,a+1)}),e[i]=a}return n.A(t.children(),function(t){r(t,1)}),e}(t),i=Ot(Xe.A(r))-1,a=2*i+1;t.graph().nestingRoot=e,n.A(t.edges(),function(e){t.edge(e).minlen*=a});var o=function(t){return Ze.A(t.edges(),function(e,r){return e+t.edge(r).weight},0)}(t)+1;n.A(t.children(),function(n){Je(t,e,a,o,i,r,n)}),t.graph().nodeRankFactor=a}function Je(t,e,r,i,a,o,s){var l=t.children(s);if(l.length){var c=Jt(t,"_bt"),h=Jt(t,"_bb"),u=t.node(s);t.setParent(c,s),u.borderTop=c,t.setParent(h,s),u.borderBottom=h,n.A(l,function(n){Je(t,e,r,i,a,o,n);var l=t.node(n),u=l.borderTop?l.borderTop:n,d=l.borderBottom?l.borderBottom:n,p=l.borderTop?i:2*i,f=u!==d?1:a-o[s]+1;t.setEdge(c,u,{weight:p,minlen:f,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:f,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,c,{weight:0,minlen:a+o[s]})}else s!==e&&t.setEdge(e,s,{weight:0,minlen:r})}var tr=r(970);const er=function(t){return(0,tr.A)(t,5)};function rr(t,e,r){var i=function(t){var e;for(;t.hasNode(e=o("_root")););return e}(t),a=new D.T({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(e){return t.node(e)});return n.A(t.nodes(),function(o){var s=t.node(o),l=t.parent(o);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(o),a.setParent(o,l||i),n.A(t[r](o),function(e){var r=e.v===o?e.w:e.v,n=a.edge(r,o),i=zt.A(n)?0:n.weight;a.setEdge(r,o,{weight:t.edge(e).weight+i})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&a.setNode(o,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),a}const nr=function(t,e,r){for(var n=-1,i=t.length,a=e.length,o={};++n<i;){var s=n<a?e[n]:void 0;r(o,t[n],s)}return o};const ir=function(t,e){return nr(t||[],e||[],bt.A)};var ar=r(5572),or=r(2568);const sr=function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t};var lr=r(2789);const cr=function(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=(0,k.A)(t),o=void 0!==e,s=null===e,l=e==e,c=(0,k.A)(e);if(!s&&!c&&!a&&t>e||a&&o&&l&&!s&&!c||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!c&&t<e||c&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!l)return-1}return 0};const hr=function(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,s=r.length;++n<o;){var l=cr(i[n],a[n]);if(l)return n>=s?l:l*("desc"==r[n]?-1:1)}return t.index-e.index};const ur=function(t,e,r){e=e.length?(0,ar.A)(e,function(t){return(0,X.A)(t)?function(e){return(0,vt.A)(e,1===t.length?t[0]:t)}:t}):[Mt.A];var n=-1;e=(0,ar.A)(e,(0,lr.A)(Bt.A));var i=(0,or.A)(t,function(t,r,i){return{criteria:(0,ar.A)(e,function(e){return e(t)}),index:++n,value:t}});return sr(i,function(t,e){return hr(t,e,r)})};const dr=(0,mt.A)(function(t,e){if(null==t)return[];var r=e.length;return r>1&&v(t,e[0],e[1])?e=[]:r>2&&v(e[0],e[1],e[2])&&(e=[e[0]]),ur(t,(0,l.A)(e,1),[])});function pr(t,e){for(var r=0,n=1;n<e.length;++n)r+=fr(t,e[n-1],e[n]);return r}function fr(t,e,r){for(var i=ir(r,h.A(r,function(t,e){return e})),a=c(h.A(e,function(e){return dr(h.A(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var s=2*o-1;o-=1;var l=h.A(new Array(s),function(){return 0}),u=0;return n.A(a.forEach(function(t){var e=t.pos+o;l[e]+=t.weight;for(var r=0;e>0;)e%2&&(r+=l[e+1]),l[e=e-1>>1]+=t.weight;u+=t.weight*r})),u}function gr(t,e){var r={};return n.A(t,function(t,e){var n=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};zt.A(t.barycenter)||(n.barycenter=t.barycenter,n.weight=t.weight)}),n.A(e.edges(),function(t){var e=r[t.v],n=r[t.w];zt.A(e)||zt.A(n)||(n.indegree++,e.out.push(r[t.w]))}),function(t){var e=[];function r(t){return function(e){e.merged||(zt.A(e.barycenter)||zt.A(t.barycenter)||e.barycenter>=t.barycenter)&&function(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}(t,e)}}function i(e){return function(r){r.in.push(e),0===--r.indegree&&t.push(r)}}for(;t.length;){var a=t.pop();e.push(a),n.A(a.in.reverse(),r(a)),n.A(a.out,i(a))}return h.A(ke.A(e,function(t){return!t.merged}),function(t){return At(t,["vs","i","barycenter","weight"])})}(ke.A(r,function(t){return!t.indegree}))}function mr(t,e){var r,i=function(t,e){var r={lhs:[],rhs:[]};return n.A(t,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")}),a=i.lhs,o=dr(i.rhs,function(t){return-t.i}),s=[],l=0,h=0,u=0;a.sort((r=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:r?e.i-t.i:t.i-e.i})),u=yr(s,o,u),n.A(a,function(t){u+=t.vs.length,s.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,u=yr(s,o,u)});var d={vs:c(s)};return h&&(d.barycenter=l/h,d.weight=h),d}function yr(t,e,r){for(var n;e.length&&(n=$t(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function vr(t,e,r,i){var a=t.children(e),o=t.node(e),s=o?o.borderLeft:void 0,l=o?o.borderRight:void 0,u={};s&&(a=ke.A(a,function(t){return t!==s&&t!==l}));var d=function(t,e){return h.A(e,function(e){var r=t.inEdges(e);if(r.length){var n=Ze.A(r,function(e,r){var n=t.edge(r),i=t.node(r.v);return{sum:e.sum+n.weight*i.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:e,barycenter:n.sum/n.weight,weight:n.weight}}return{v:e}})}(t,a);n.A(d,function(e){if(t.children(e.v).length){var n=vr(t,e.v,r,i);u[e.v]=n,Object.prototype.hasOwnProperty.call(n,"barycenter")&&(a=e,o=n,zt.A(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o});var p=gr(d,r);!function(t,e){n.A(t,function(t){t.vs=c(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}(p,u);var f=mr(p,i);if(s&&(f.vs=c([s,f.vs,l]),t.predecessors(s).length)){var g=t.node(t.predecessors(s)[0]),m=t.node(t.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+g.order+m.order)/(f.weight+2),f.weight+=2}return f}function br(t){var e=te(t),r=xr(t,I(1,e+1),"inEdges"),i=xr(t,I(e-1,-1,-1),"outEdges"),a=function(t){var e={},r=ke.A(t.nodes(),function(e){return!t.children(e).length}),i=Ot(h.A(r,function(e){return t.node(e).rank})),a=h.A(I(i+1),function(){return[]}),o=dr(r,function(e){return t.node(e).rank});return n.A(o,function r(i){if(!Gt(e,i)){e[i]=!0;var o=t.node(i);a[o.rank].push(i),n.A(t.successors(i),r)}}),a}(t);wr(t,a);for(var o,s=Number.POSITIVE_INFINITY,l=0,c=0;c<4;++l,++c){Tr(l%2?r:i,l%4>=2);var u=pr(t,a=Qt(t));u<s&&(c=0,o=er(a),s=u)}wr(t,o)}function xr(t,e,r){return h.A(e,function(e){return rr(t,e,r)})}function Tr(t,e){var r=new D.T;n.A(t,function(t){var i=t.graph().root,a=vr(t,i,r,e);n.A(a.vs,function(e,r){t.node(e).order=r}),function(t,e,r){var i,a={};n.A(r,function(r){for(var n,o,s=t.parent(r);s;){if((n=t.parent(s))?(o=a[n],a[n]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=n}})}(t,r,a.vs)})}function wr(t,e){n.A(e,function(e){n.A(e,function(e,r){t.node(e).order=r})})}function kr(t){var e=function(t){var e={},r=0;function i(a){var o=r;n.A(t.children(a),i),e[a]={low:o,lim:r++}}return n.A(t.children(),i),e}(t);n.A(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=function(t,e,r,n){var i,a,o=[],s=[],l=Math.min(e[r].low,e[n].low),c=Math.max(e[r].lim,e[n].lim);i=r;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>l||c>e[i].lim));a=i,i=n;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,l=0,c=o[l],h=!0;r!==i.w;){if(n=t.node(r),h){for(;(c=o[l])!==s&&t.node(c).maxRank<n.rank;)l++;c===s&&(h=!1)}if(!h){for(;l<o.length-1&&t.node(c=o[l+1]).minRank<=n.rank;)l++;c=o[l]}t.setParent(r,c),r=t.successors(r)[0]}})}var Cr=r(9922);const Er=function(t,e){return t&&(0,Pt.A)(t,(0,Cr.A)(e))};const Sr=function(t,e){return null==t?t:(0,W.A)(t,(0,Cr.A)(e),dt.A)};function _r(t,e){var r={};return Ze.A(e,function(e,i){var a=0,o=0,s=e.length,l=$t(i);return n.A(i,function(e,c){var h=function(t,e){if(t.node(e).dummy)return we(t.predecessors(e),function(e){return t.node(e).dummy})}(t,e),u=h?t.node(h).order:s;(h||e===l)&&(n.A(i.slice(o,c+1),function(e){n.A(t.predecessors(e),function(n){var i=t.node(n),o=i.order;!(o<a||u<o)||i.dummy&&t.node(e).dummy||Ar(r,n,e)})}),o=c+1,a=u)}),i}),r}function Ar(t,e,r){if(e>r){var n=e;e=r,r=n}Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=t[e];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Rr(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function Lr(t,e,r,i,a){var o={},s=function(t,e,r,i){var a=new D.T,o=t.graph(),s=function(t,e,r){return function(n,i,a){var o,s=n.node(i),l=n.node(a),c=0;if(c+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":o=-s.width/2;break;case"r":o=s.width/2}if(o&&(c+=r?o:-o),o=0,c+=(s.dummy?e:t)/2,c+=(l.dummy?e:t)/2,c+=l.width/2,Object.prototype.hasOwnProperty.call(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":o=l.width/2;break;case"r":o=-l.width/2}return o&&(c+=r?o:-o),o=0,c}}(o.nodesep,o.edgesep,i);return n.A(e,function(e){var i;n.A(e,function(e){var n=r[e];if(a.setNode(n),i){var o=r[i],l=a.edge(o,n);a.setEdge(o,n,Math.max(s(t,e,i),l||0))}i=e})}),a}(t,e,r,a),l=a?"borderLeft":"borderRight";function c(t,e){for(var r=s.nodes(),n=r.pop(),i={};n;)i[n]?t(n):(i[n]=!0,r.push(n),r=r.concat(e(n))),n=r.pop()}return c(function(t){o[t]=s.inEdges(t).reduce(function(t,e){return Math.max(t,o[e.v]+s.edge(e))},0)},s.predecessors.bind(s)),c(function(e){var r=s.outEdges(e).reduce(function(t,e){return Math.min(t,o[e.w]-s.edge(e))},Number.POSITIVE_INFINITY),n=t.node(e);r!==Number.POSITIVE_INFINITY&&n.borderType!==l&&(o[e]=Math.max(o[e],r))},s.successors.bind(s)),n.A(i,function(t){o[t]=o[r[t]]}),o}function Ir(t){var e,r=Qt(t),i=yt(_r(t,r),function(t,e){var r={};function i(e,i,a,o,s){var l;n.A(I(i,a),function(i){l=e[i],t.node(l).dummy&&n.A(t.predecessors(l),function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&Ar(r,e,l)})})}return Ze.A(e,function(e,r){var a,o=-1,s=0;return n.A(r,function(n,l){if("border"===t.node(n).dummy){var c=t.predecessors(n);c.length&&(a=t.node(c[0]).order,i(r,s,l,o,a),s=l,o=a)}i(r,s,r.length,a,e.length)}),r}),r}(t,r)),a={};n.A(["u","d"],function(o){e="u"===o?r:Xe.A(r).reverse(),n.A(["l","r"],function(r){"r"===r&&(e=h.A(e,function(t){return Xe.A(t).reverse()}));var s=("u"===o?t.predecessors:t.successors).bind(t),l=function(t,e,r,i){var a={},o={},s={};return n.A(e,function(t){n.A(t,function(t,e){a[t]=t,o[t]=t,s[t]=e})}),n.A(e,function(t){var e=-1;n.A(t,function(t){var n=i(t);if(n.length){n=dr(n,function(t){return s[t]});for(var l=(n.length-1)/2,c=Math.floor(l),h=Math.ceil(l);c<=h;++c){var u=n[c];o[t]===t&&e<s[u]&&!Rr(r,t,u)&&(o[u]=t,o[t]=a[t]=a[u],e=s[u])}}})}),{root:a,align:o}}(0,e,i,s),c=Lr(t,e,l.root,l.align,"r"===r);"r"===r&&(c=Ft(c,function(t){return-t})),a[o+r]=c})});var o=function(t,e){return he(Xe.A(e),function(e){var r=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return Sr(e,function(e,i){var a=function(t,e){return t.node(e).width}(t,i)/2;r=Math.max(e+a,r),n=Math.min(e-a,n)}),r-n})}(t,a);return function(t,e){var r=Xe.A(e),i=jt(r),a=Ot(r);n.A(["u","d"],function(r){n.A(["l","r"],function(n){var o,s=r+n,l=t[s];if(l!==e){var c=Xe.A(l);(o="l"===n?i-jt(c):a-Ot(c))&&(t[s]=Ft(l,function(t){return t+o}))}})})}(a,o),function(t,e){return Ft(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=dr(h.A(t,n));return(i[1]+i[2])/2})}(a,t.graph().align)}function Dr(t){(function(t){var e=Qt(t),r=t.graph().ranksep,i=0;n.A(e,function(e){var a=Ot(h.A(e,function(e){return t.node(e).height}));n.A(e,function(e){t.node(e).y=i+a/2}),i+=a+r})})(t=Xt(t)),Er(Ir(t),function(e,r){t.node(r).x=e})}function Nr(t,e){var r=e&&e.debugTiming?ee:re;r("layout",()=>{var e=r(" buildLayoutGraph",()=>function(t){var e=new D.T({multigraph:!0,compound:!0}),r=qr(t.graph());return e.setGraph(yt({},Or,jr(r,Mr),At(r,$r))),n.A(t.nodes(),function(r){var n=qr(t.node(r));e.setNode(r,It(jr(n,Pr),Br)),e.setParent(r,t.parent(r))}),n.A(t.edges(),function(r){var n=qr(t.edge(r));e.setEdge(r,yt({},zr,jr(n,Fr),At(n,Kr)))}),e}(t));r(" runLayout",()=>function(t,e){e(" makeSpaceForEdgeLabels",()=>function(t){var e=t.graph();e.ranksep/=2,n.A(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}(t)),e(" removeSelfEdges",()=>function(t){n.A(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)}})}(t)),e(" acyclic",()=>z(t)),e(" nestingGraph.run",()=>Qe(t)),e(" rank",()=>Ye(Xt(t))),e(" injectEdgeLabelProxies",()=>function(t){n.A(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i={rank:(t.node(e.w).rank-n.rank)/2+n.rank,e};Ht(t,"edge-proxy",i,"_ep")}})}(t)),e(" removeEmptyRanks",()=>function(t){var e=jt(h.A(t.nodes(),function(e){return t.node(e).rank})),r=[];n.A(t.nodes(),function(n){var i=t.node(n).rank-e;r[i]||(r[i]=[]),r[i].push(n)});var i=0,a=t.graph().nodeRankFactor;n.A(r,function(e,r){zt.A(e)&&r%a!==0?--i:i&&n.A(e,function(e){t.node(e).rank+=i})})}(t)),e(" nestingGraph.cleanup",()=>function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,n.A(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}(t)),e(" normalizeRanks",()=>function(t){var e=jt(h.A(t.nodes(),function(e){return t.node(e).rank}));n.A(t.nodes(),function(r){var n=t.node(r);Gt(n,"rank")&&(n.rank-=e)})}(t)),e(" assignRankMinMax",()=>function(t){var e=0;n.A(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=Ot(e,n.maxRank))}),t.graph().maxRank=e}(t)),e(" removeEdgeLabelProxies",()=>function(t){n.A(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}(t)),e(" normalize.run",()=>ce(t)),e(" parentDummyChains",()=>kr(t)),e(" addBorderSegments",()=>function(t){n.A(t.children(),function e(r){var i=t.children(r),a=t.node(r);if(i.length&&n.A(i,e),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)ne(t,"borderLeft","_bl",r,a,o),ne(t,"borderRight","_br",r,a,o)}})}(t)),e(" order",()=>br(t)),e(" insertSelfEdges",()=>function(t){var e=Qt(t);n.A(e,function(e){var r=0;n.A(e,function(e,i){var a=t.node(e);a.order=i+r,n.A(a.selfEdges,function(e){Ht(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++r,e:e.e,label:e.label},"_se")}),delete a.selfEdges})})}(t)),e(" adjustCoordinateSystem",()=>function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||ae(t)}(t)),e(" position",()=>Dr(t)),e(" positionSelfEdges",()=>function(t){n.A(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}(t)),e(" removeBorderNodes",()=>function(t){n.A(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node($t(r.borderLeft)),o=t.node($t(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),n.A(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}(t)),e(" normalize.undo",()=>function(t){n.A(t.graph().dummyChains,function(e){var r,n=t.node(e),i=n.edgeLabel;for(t.setEdge(n.edgeObj,i);n.dummy;)r=t.successors(e)[0],t.removeNode(e),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),e=r,n=t.node(e)})}(t)),e(" fixupEdgeLabelCoords",()=>function(t){n.A(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(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}})}(t)),e(" undoCoordinateSystem",()=>ie(t)),e(" translateGraph",()=>function(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,l=o.marginy||0;function c(t){var n=t.x,o=t.y,s=t.width,l=t.height;e=Math.min(e,n-s/2),r=Math.max(r,n+s/2),i=Math.min(i,o-l/2),a=Math.max(a,o+l/2)}n.A(t.nodes(),function(e){c(t.node(e))}),n.A(t.edges(),function(e){var r=t.edge(e);Object.prototype.hasOwnProperty.call(r,"x")&&c(r)}),e-=s,i-=l,n.A(t.nodes(),function(r){var n=t.node(r);n.x-=e,n.y-=i}),n.A(t.edges(),function(r){var a=t.edge(r);n.A(a.points,function(t){t.x-=e,t.y-=i}),Object.prototype.hasOwnProperty.call(a,"x")&&(a.x-=e),Object.prototype.hasOwnProperty.call(a,"y")&&(a.y-=i)}),o.width=r-e+s,o.height=a-i+l}(t)),e(" assignNodeIntersects",()=>function(t){n.A(t.edges(),function(e){var r,n,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=o,n=a),i.points.unshift(Zt(a,r)),i.points.push(Zt(o,n))})}(t)),e(" reversePoints",()=>function(t){n.A(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}(t)),e(" acyclic.undo",()=>function(t){n.A(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)}})}(t))}(e,r)),r(" updateInputGraph",()=>function(t,e){n.A(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))}),n.A(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e))})}var Mr=["nodesep","edgesep","ranksep","marginx","marginy"],Or={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},$r=["acyclicer","ranker","rankdir","align"],Pr=["width","height"],Br={width:0,height:0},Fr=["minlen","weight","width","height","labeloffset"],zr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Kr=["labelpos"];function jr(t,e){return Ft(At(t,e),Number)}function qr(t){var e={};return n.A(t,function(t,r){e[r.toLowerCase()]=t}),e}},2857(t,e,r){"use strict";r.d(e,{T:()=>z});var n=r(9142),i=r(9610),a=r(7422),o=r(6070),s=r(4453),l=r(9137),c=r(5175),h=r(2049),u=r(8446),d=r(1200),p=r(7271),f=r(4749),g=Object.prototype.hasOwnProperty;const m=function(t){if(null==t)return!0;if((0,u.A)(t)&&((0,h.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,d.A)(t)||(0,f.A)(t)||(0,c.A)(t)))return!t.length;var e=(0,l.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,p.A)(t))return!(0,s.A)(t).length;for(var r in t)if(g.call(t,r))return!1;return!0};var y=r(8058),v=r(9592),b=r(7671),x=r(4326),T=r(8300),w=r(5707);const k=function(t){return t!=t};const C=function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1};const E=function(t,e,r){return e==e?C(t,e,r):(0,w.A)(t,k,r)};const S=function(t,e){return!!(null==t?0:t.length)&&E(t,e,0)>-1};const _=function(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1};var A=r(4099),R=r(9857);const L=function(){};var I=r(9959),D=R.A&&1/(0,I.A)(new R.A([,-0]))[1]==1/0?function(t){return new R.A(t)}:L;const N=D;const M=function(t,e,r){var n=-1,i=S,a=t.length,o=!0,s=[],l=s;if(r)o=!1,i=_;else if(a>=200){var c=e?null:N(t);if(c)return(0,I.A)(c);o=!1,i=A.A,l=new T.A}else l=e?[]:s;t:for(;++n<a;){var h=t[n],u=e?e(h):h;if(h=r||0!==h?h:0,o&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),s.push(h)}else i(l,u,r)||(l!==s&&l.push(u),s.push(h))}return s};var O=r(3533);const $=(0,x.A)(function(t){return M((0,b.A)(t,1,O.A,!0))});var P=r(2866),B=r(3130),F="\0";class z{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=n.A(void 0),this._defaultEdgeLabelFn=n.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[F]={}),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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return i.A(t)||(t=n.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return a.A(this._nodes)}sources(){var t=this;return o.A(this.nodes(),function(e){return m(t._in[e])})}sinks(){var t=this;return o.A(this.nodes(),function(e){return m(t._out[e])})}setNodes(t,e){var r=arguments,n=this;return y.A(t,function(t){r.length>1?n.setNode(t,e):n.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=F,this._children[t]={},this._children[F][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],y.A(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),y.A(a.A(this._in[t]),e),delete this._in[t],delete this._preds[t],y.A(a.A(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(v.A(e))e=F;else{for(var r=e+="";!v.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==F)return e}}children(t){if(v.A(t)&&(t=F),this._isCompound){var e=this._children[t];if(e)return a.A(e)}else{if(t===F)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return a.A(e)}successors(t){var e=this._sucs[t];if(e)return a.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return $(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;y.A(this._nodes,function(r,n){t(n)&&e.setNode(n,r)}),y.A(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var n={};function i(t){var a=r.parent(t);return void 0===a||e.hasNode(a)?(n[t]=a,a):a in n?n[a]:i(a)}return this._isCompound&&y.A(e.nodes(),function(t){e.setParent(t,i(t))}),e}setDefaultEdgeLabel(t){return i.A(t)||(t=n.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return P.A(this._edgeObjs)}setPath(t,e){var r=this,n=arguments;return B.A(t,function(t,i){return n.length>1?r.setEdge(t,i,e):r.setEdge(t,i),i}),this}setEdge(){var t,e,r,n,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,r=a.name,2===arguments.length&&(n=arguments[1],i=!0)):(t=a,e=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),t=""+t,e=""+e,v.A(r)||(r=""+r);var o=q(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=n),this;if(!v.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=i?n:this._defaultEdgeLabelFn(t,e,r);var s=function(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};n&&(s.name=n);return s}(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[o]=s,K(this._preds[e],t),K(this._sucs[t],e),this._in[e][o]=s,this._out[t][o]=s,this._edgeCount++,this}edge(t,e,r){var n=1===arguments.length?W(this._isDirected,arguments[0]):q(this._isDirected,t,e,r);return this._edgeLabels[n]}hasEdge(t,e,r){var n=1===arguments.length?W(this._isDirected,arguments[0]):q(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(t,e,r){var n=1===arguments.length?W(this._isDirected,arguments[0]):q(this._isDirected,t,e,r),i=this._edgeObjs[n];return i&&(t=i.v,e=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],j(this._preds[e],t),j(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var n=P.A(r);return e?o.A(n,function(t){return t.v===e}):n}}outEdges(t,e){var r=this._out[t];if(r){var n=P.A(r);return e?o.A(n,function(t){return t.w===e}):n}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function K(t,e){t[e]?t[e]++:t[e]=1}function j(t,e){--t[e]||delete t[e]}function q(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}return i+""+a+""+(v.A(n)?"\0":n)}function W(t,e){return q(t,e.v,e.w,e.name)}z.prototype._nodeCount=0,z.prototype._edgeCount=0},697(t,e,r){"use strict";r.d(e,{T:()=>n.T});var n=r(2857)},9125(t,e,r){"use strict";function n(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}r.d(e,{b:()=>n})},9826(t,e,r){"use strict";r.d(e,{$V:()=>o,Av:()=>n,GX:()=>f,ML:()=>C,NA:()=>u,OG:()=>i,Qb:()=>m,R_:()=>s,Uw:()=>d,VP:()=>l,XZ:()=>x,ZR:()=>b,_u:()=>w,cT:()=>p,i1:()=>T,iq:()=>g,kj:()=>a,pj:()=>h,q:()=>y,ri:()=>k,vC:()=>c,x6:()=>v});const n="[object RegExp]",i="[object String]",a="[object Number]",o="[object Boolean]",s="[object Arguments]",l="[object Symbol]",c="[object Date]",h="[object Map]",u="[object Set]",d="[object Array]",p="[object ArrayBuffer]",f="[object Object]",g="[object DataView]",m="[object Uint8Array]",y="[object Uint8ClampedArray]",v="[object Uint16Array]",b="[object Uint32Array]",x="[object Int8Array]",T="[object Int16Array]",w="[object Int32Array]",k="[object Float32Array]",C="[object Float64Array]"},4608(t,e,r){"use strict";r.d(e,{N:()=>i});var n=r(9125);function i(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,n.b)(t)}},622(t,e,r){"use strict";function n(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}r.d(e,{X:()=>n})},9663(t,e,r){"use strict";r.d(e,{i:()=>i});var n=r(2796);function i(t){return(0,n.i)(t)}},2178(t,e,r){"use strict";r.d(e,{P:()=>i});const n="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r.g&&r.g||function(){return this}()||Function("return this")();function i(t){return void 0!==n.Buffer&&n.Buffer.isBuffer(t)}},7110(t,e,r){"use strict";function n(t){return null==t||"object"!=typeof t&&"function"!=typeof t}r.d(e,{s:()=>n})},2796(t,e,r){"use strict";function n(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r.d(e,{i:()=>n})},2130(t,e,r){"use strict";r.d(e,{default:()=>Li});class n extends Error{constructor(t,e){var r,i,a="KaTeX parse error: "+t,o=e&&e.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,i=o.end,r===s.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ";var l=s.slice(r,i).replace(/[^]/g,"$&̲");a+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+l+(i+15<s.length?s.slice(i,i+15)+"…":s.slice(i))}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,n.prototype),this.position=r,null!=r&&null!=i&&(this.length=i-r),this.rawMessage=t}}var i=/([A-Z])/g,a=t=>t.replace(i,"-$1").toLowerCase(),o={"&":"&",">":">","<":"<",'"':""","'":"'"},s=/[&><"']/g,l=t=>String(t).replace(s,t=>o[t]),c=t=>"ordgroup"===t.type||"color"===t.type?1===t.body.length?c(t.body[0]):t:"font"===t.type?c(t.body):t,h=new Set(["mathord","textord","atom"]),u=t=>h.has(c(t).type),d={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>"Infinity"===t?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function p(t){return void 0!==t.default?t.default:function(t){if("string"!=typeof t)return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(t.type)?t.type[0]:t.type)}function f(t,e,r,n){var i=r[e];t[e]=void 0!==i?n.processor?n.processor(i):i:p(n)}class g{constructor(t){for(var e of(void 0===t&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{},Object.keys(d))){var r=d[e];r&&f(this,e,t,r)}}reportNonstrict(t,e,r){var i=this.strict;if("function"==typeof i&&(i=i(t,e,r)),i&&"ignore"!==i){if(!0===i||"error"===i)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch(i){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),!1)))}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var e=(t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?":"!==e[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"})(t.url);if(null==e)return!1;t.protocol=e}var r="function"==typeof this.trust?this.trust(t):this.trust;return Boolean(r)}}class m{constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return y[v[this.id]]}sub(){return y[b[this.id]]}fracNum(){return y[x[this.id]]}fracDen(){return y[T[this.id]]}cramp(){return y[w[this.id]]}text(){return y[k[this.id]]}isTight(){return this.size>=2}}var y=[new m(0,0,!1),new m(1,0,!0),new m(2,1,!1),new m(3,1,!0),new m(4,2,!1),new m(5,2,!0),new m(6,3,!1),new m(7,3,!0)],v=[4,5,4,5,6,7,6,7],b=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],T=[3,3,5,5,7,7,7,7],w=[1,1,3,3,5,5,7,7],k=[0,1,2,3,2,3,2,3],C={DISPLAY:y[0],TEXT:y[2],SCRIPT:y[4],SCRIPTSCRIPT:y[6]},E=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var S=[];function _(t){for(var e=0;e<S.length;e+=2)if(t>=S[e]&&t<=S[e+1])return!0;return!1}E.forEach(t=>t.blocks.forEach(t=>S.push(...t)));var A=t=>t+" "+t,R=80,L={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:A("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:A("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:A("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:A("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:A("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:A("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:A("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:A("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class I{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){for(var t="",e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map(t=>{if("toText"in t)return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var D={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},N={ex:!0,em:!0,mu:!0},M=function(t){return"string"!=typeof t&&(t=t.unit),t in D||t in N||"ex"===t},O=function(t,e){var r;if(t.unit in D)r=D[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var i;if(i=e.style.isTight()?e.havingStyle(e.style.text()):e,"ex"===t.unit)r=i.fontMetrics().xHeight;else{if("em"!==t.unit)throw new n("Invalid unit: '"+t.unit+"'");r=i.fontMetrics().quad}i!==e&&(r*=i.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},$=function(t){return+t.toFixed(4)+"em"},P=function(t){return t.filter(t=>t).join(" ")},B=function(t){var e="";for(var r of Object.keys(t)){var n=t[r];void 0!==n&&(e+=a(r)+":"+n+";")}return e},F=function(t,e,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e){e.style.isTight()&&this.classes.push("mtight");var n=e.getColor();n&&(this.style.color=n)}},z=function(t){var e=document.createElement(t);for(var r of(e.className=P(this.classes),Object.assign(e.style,this.style),Object.keys(this.attributes)))e.setAttribute(r,this.attributes[r]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e},K=/[\s"'>/=\x00-\x1f]/,j=function(t){var e="<"+t;this.classes.length&&(e+=' class="'+l(P(this.classes))+'"');var r=B(this.style);for(var i of(r&&(e+=' style="'+l(r)+'"'),Object.keys(this.attributes))){if(K.test(i))throw new n("Invalid attribute name '"+i+"'");e+=" "+i+'="'+l(this.attributes[i])+'"'}e+=">";for(var a=0;a<this.children.length;a++)e+=this.children[a].toMarkup();return e+="</"+t+">"};class q{constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,F.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return this.classes.includes(t)}toNode(){return z.call(this,"span")}toMarkup(){return j.call(this,"span")}}class W{constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,F.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return this.classes.includes(t)}toNode(){return z.call(this,"a")}toMarkup(){return j.call(this,"a")}}class U{constructor(t,e,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=e,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+l(this.src)+'" alt="'+l(this.alt)+'"',e=B(this.style);return e&&(t+=' style="'+l(e)+'"'),t+="'/>"}}var G={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Y{constructor(t,e,r,n,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=e||0,this.depth=r||0,this.italic=n||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(t){for(var e=0;e<E.length;e++)for(var r=E[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=G[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),e=null;return this.italic>0&&((e=document.createElement("span")).style.marginRight=$(this.italic)),this.classes.length>0&&((e=e||document.createElement("span")).className=P(this.classes)),Object.keys(this.style).length>0&&(e=e||document.createElement("span"),Object.assign(e.style,this.style)),e?(e.appendChild(t),e):t}toMarkup(){var t=!1,e="<span";this.classes.length&&(t=!0,e+=' class="',e+=l(P(this.classes)),e+='"');var r="";this.italic>0&&(r+="margin-right:"+$(this.italic)+";"),(r+=B(this.style))&&(t=!0,e+=' style="'+l(r)+'"');var n=l(this.text);return t?(e+=">",e+=n,e+="</span>"):n}}class V{constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var e of Object.keys(this.attributes))t.setAttribute(e,this.attributes[e]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var e of Object.keys(this.attributes))t+=" "+e+'="'+l(this.attributes[e])+'"';t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</svg>"}}class H{constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",L[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+l(this.alternate)+'"/>':'<path d="'+l(L[this.pathName])+'"/>'}}class X{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","line");for(var e of Object.keys(this.attributes))t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var t="<line";for(var e of Object.keys(this.attributes))t+=" "+e+'="'+l(this.attributes[e])+'"';return t+="/>"}}var Z={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Q={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},J={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function tt(t,e,r){if(!Z[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=Z[e][n];if(!i&&t[0]in J&&(n=J[t[0]].charCodeAt(0),i=Z[e][n]),i||"text"!==r||_(n)&&(i=Z[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var et={};var rt={math:{},text:{}};function nt(t,e,r,n,i,a){rt[t][i]={font:e,group:r,replace:n},a&&n&&(rt[t][n]=rt[t][i])}var it="math",at="text",ot="main",st="ams",lt="accent-token",ct="bin",ht="close",ut="inner",dt="mathord",pt="op-token",ft="open",gt="punct",mt="rel",yt="spacing",vt="textord";nt(it,ot,mt,"≡","\\equiv",!0),nt(it,ot,mt,"≺","\\prec",!0),nt(it,ot,mt,"≻","\\succ",!0),nt(it,ot,mt,"∼","\\sim",!0),nt(it,ot,mt,"⊥","\\perp"),nt(it,ot,mt,"⪯","\\preceq",!0),nt(it,ot,mt,"⪰","\\succeq",!0),nt(it,ot,mt,"≃","\\simeq",!0),nt(it,ot,mt,"∣","\\mid",!0),nt(it,ot,mt,"≪","\\ll",!0),nt(it,ot,mt,"≫","\\gg",!0),nt(it,ot,mt,"≍","\\asymp",!0),nt(it,ot,mt,"∥","\\parallel"),nt(it,ot,mt,"⋈","\\bowtie",!0),nt(it,ot,mt,"⌣","\\smile",!0),nt(it,ot,mt,"⊑","\\sqsubseteq",!0),nt(it,ot,mt,"⊒","\\sqsupseteq",!0),nt(it,ot,mt,"≐","\\doteq",!0),nt(it,ot,mt,"⌢","\\frown",!0),nt(it,ot,mt,"∋","\\ni",!0),nt(it,ot,mt,"∝","\\propto",!0),nt(it,ot,mt,"⊢","\\vdash",!0),nt(it,ot,mt,"⊣","\\dashv",!0),nt(it,ot,mt,"∋","\\owns"),nt(it,ot,gt,".","\\ldotp"),nt(it,ot,gt,"⋅","\\cdotp"),nt(it,ot,gt,"⋅","·"),nt(at,ot,vt,"⋅","·"),nt(it,ot,vt,"#","\\#"),nt(at,ot,vt,"#","\\#"),nt(it,ot,vt,"&","\\&"),nt(at,ot,vt,"&","\\&"),nt(it,ot,vt,"ℵ","\\aleph",!0),nt(it,ot,vt,"∀","\\forall",!0),nt(it,ot,vt,"ℏ","\\hbar",!0),nt(it,ot,vt,"∃","\\exists",!0),nt(it,ot,vt,"∇","\\nabla",!0),nt(it,ot,vt,"♭","\\flat",!0),nt(it,ot,vt,"ℓ","\\ell",!0),nt(it,ot,vt,"♮","\\natural",!0),nt(it,ot,vt,"♣","\\clubsuit",!0),nt(it,ot,vt,"℘","\\wp",!0),nt(it,ot,vt,"♯","\\sharp",!0),nt(it,ot,vt,"♢","\\diamondsuit",!0),nt(it,ot,vt,"ℜ","\\Re",!0),nt(it,ot,vt,"♡","\\heartsuit",!0),nt(it,ot,vt,"ℑ","\\Im",!0),nt(it,ot,vt,"♠","\\spadesuit",!0),nt(it,ot,vt,"§","\\S",!0),nt(at,ot,vt,"§","\\S"),nt(it,ot,vt,"¶","\\P",!0),nt(at,ot,vt,"¶","\\P"),nt(it,ot,vt,"†","\\dag"),nt(at,ot,vt,"†","\\dag"),nt(at,ot,vt,"†","\\textdagger"),nt(it,ot,vt,"‡","\\ddag"),nt(at,ot,vt,"‡","\\ddag"),nt(at,ot,vt,"‡","\\textdaggerdbl"),nt(it,ot,ht,"⎱","\\rmoustache",!0),nt(it,ot,ft,"⎰","\\lmoustache",!0),nt(it,ot,ht,"⟯","\\rgroup",!0),nt(it,ot,ft,"⟮","\\lgroup",!0),nt(it,ot,ct,"∓","\\mp",!0),nt(it,ot,ct,"⊖","\\ominus",!0),nt(it,ot,ct,"⊎","\\uplus",!0),nt(it,ot,ct,"⊓","\\sqcap",!0),nt(it,ot,ct,"∗","\\ast"),nt(it,ot,ct,"⊔","\\sqcup",!0),nt(it,ot,ct,"◯","\\bigcirc",!0),nt(it,ot,ct,"∙","\\bullet",!0),nt(it,ot,ct,"‡","\\ddagger"),nt(it,ot,ct,"≀","\\wr",!0),nt(it,ot,ct,"⨿","\\amalg"),nt(it,ot,ct,"&","\\And"),nt(it,ot,mt,"⟵","\\longleftarrow",!0),nt(it,ot,mt,"⇐","\\Leftarrow",!0),nt(it,ot,mt,"⟸","\\Longleftarrow",!0),nt(it,ot,mt,"⟶","\\longrightarrow",!0),nt(it,ot,mt,"⇒","\\Rightarrow",!0),nt(it,ot,mt,"⟹","\\Longrightarrow",!0),nt(it,ot,mt,"↔","\\leftrightarrow",!0),nt(it,ot,mt,"⟷","\\longleftrightarrow",!0),nt(it,ot,mt,"⇔","\\Leftrightarrow",!0),nt(it,ot,mt,"⟺","\\Longleftrightarrow",!0),nt(it,ot,mt,"↦","\\mapsto",!0),nt(it,ot,mt,"⟼","\\longmapsto",!0),nt(it,ot,mt,"↗","\\nearrow",!0),nt(it,ot,mt,"↩","\\hookleftarrow",!0),nt(it,ot,mt,"↪","\\hookrightarrow",!0),nt(it,ot,mt,"↘","\\searrow",!0),nt(it,ot,mt,"↼","\\leftharpoonup",!0),nt(it,ot,mt,"⇀","\\rightharpoonup",!0),nt(it,ot,mt,"↙","\\swarrow",!0),nt(it,ot,mt,"↽","\\leftharpoondown",!0),nt(it,ot,mt,"⇁","\\rightharpoondown",!0),nt(it,ot,mt,"↖","\\nwarrow",!0),nt(it,ot,mt,"⇌","\\rightleftharpoons",!0),nt(it,st,mt,"≮","\\nless",!0),nt(it,st,mt,"","\\@nleqslant"),nt(it,st,mt,"","\\@nleqq"),nt(it,st,mt,"⪇","\\lneq",!0),nt(it,st,mt,"≨","\\lneqq",!0),nt(it,st,mt,"","\\@lvertneqq"),nt(it,st,mt,"⋦","\\lnsim",!0),nt(it,st,mt,"⪉","\\lnapprox",!0),nt(it,st,mt,"⊀","\\nprec",!0),nt(it,st,mt,"⋠","\\npreceq",!0),nt(it,st,mt,"⋨","\\precnsim",!0),nt(it,st,mt,"⪹","\\precnapprox",!0),nt(it,st,mt,"≁","\\nsim",!0),nt(it,st,mt,"","\\@nshortmid"),nt(it,st,mt,"∤","\\nmid",!0),nt(it,st,mt,"⊬","\\nvdash",!0),nt(it,st,mt,"⊭","\\nvDash",!0),nt(it,st,mt,"⋪","\\ntriangleleft"),nt(it,st,mt,"⋬","\\ntrianglelefteq",!0),nt(it,st,mt,"⊊","\\subsetneq",!0),nt(it,st,mt,"","\\@varsubsetneq"),nt(it,st,mt,"⫋","\\subsetneqq",!0),nt(it,st,mt,"","\\@varsubsetneqq"),nt(it,st,mt,"≯","\\ngtr",!0),nt(it,st,mt,"","\\@ngeqslant"),nt(it,st,mt,"","\\@ngeqq"),nt(it,st,mt,"⪈","\\gneq",!0),nt(it,st,mt,"≩","\\gneqq",!0),nt(it,st,mt,"","\\@gvertneqq"),nt(it,st,mt,"⋧","\\gnsim",!0),nt(it,st,mt,"⪊","\\gnapprox",!0),nt(it,st,mt,"⊁","\\nsucc",!0),nt(it,st,mt,"⋡","\\nsucceq",!0),nt(it,st,mt,"⋩","\\succnsim",!0),nt(it,st,mt,"⪺","\\succnapprox",!0),nt(it,st,mt,"≆","\\ncong",!0),nt(it,st,mt,"","\\@nshortparallel"),nt(it,st,mt,"∦","\\nparallel",!0),nt(it,st,mt,"⊯","\\nVDash",!0),nt(it,st,mt,"⋫","\\ntriangleright"),nt(it,st,mt,"⋭","\\ntrianglerighteq",!0),nt(it,st,mt,"","\\@nsupseteqq"),nt(it,st,mt,"⊋","\\supsetneq",!0),nt(it,st,mt,"","\\@varsupsetneq"),nt(it,st,mt,"⫌","\\supsetneqq",!0),nt(it,st,mt,"","\\@varsupsetneqq"),nt(it,st,mt,"⊮","\\nVdash",!0),nt(it,st,mt,"⪵","\\precneqq",!0),nt(it,st,mt,"⪶","\\succneqq",!0),nt(it,st,mt,"","\\@nsubseteqq"),nt(it,st,ct,"⊴","\\unlhd"),nt(it,st,ct,"⊵","\\unrhd"),nt(it,st,mt,"↚","\\nleftarrow",!0),nt(it,st,mt,"↛","\\nrightarrow",!0),nt(it,st,mt,"⇍","\\nLeftarrow",!0),nt(it,st,mt,"⇏","\\nRightarrow",!0),nt(it,st,mt,"↮","\\nleftrightarrow",!0),nt(it,st,mt,"⇎","\\nLeftrightarrow",!0),nt(it,st,mt,"△","\\vartriangle"),nt(it,st,vt,"ℏ","\\hslash"),nt(it,st,vt,"▽","\\triangledown"),nt(it,st,vt,"◊","\\lozenge"),nt(it,st,vt,"Ⓢ","\\circledS"),nt(it,st,vt,"®","\\circledR"),nt(at,st,vt,"®","\\circledR"),nt(it,st,vt,"∡","\\measuredangle",!0),nt(it,st,vt,"∄","\\nexists"),nt(it,st,vt,"℧","\\mho"),nt(it,st,vt,"Ⅎ","\\Finv",!0),nt(it,st,vt,"⅁","\\Game",!0),nt(it,st,vt,"‵","\\backprime"),nt(it,st,vt,"▲","\\blacktriangle"),nt(it,st,vt,"▼","\\blacktriangledown"),nt(it,st,vt,"■","\\blacksquare"),nt(it,st,vt,"⧫","\\blacklozenge"),nt(it,st,vt,"★","\\bigstar"),nt(it,st,vt,"∢","\\sphericalangle",!0),nt(it,st,vt,"∁","\\complement",!0),nt(it,st,vt,"ð","\\eth",!0),nt(at,ot,vt,"ð","ð"),nt(it,st,vt,"╱","\\diagup"),nt(it,st,vt,"╲","\\diagdown"),nt(it,st,vt,"□","\\square"),nt(it,st,vt,"□","\\Box"),nt(it,st,vt,"◊","\\Diamond"),nt(it,st,vt,"¥","\\yen",!0),nt(at,st,vt,"¥","\\yen",!0),nt(it,st,vt,"✓","\\checkmark",!0),nt(at,st,vt,"✓","\\checkmark"),nt(it,st,vt,"ℶ","\\beth",!0),nt(it,st,vt,"ℸ","\\daleth",!0),nt(it,st,vt,"ℷ","\\gimel",!0),nt(it,st,vt,"ϝ","\\digamma",!0),nt(it,st,vt,"ϰ","\\varkappa"),nt(it,st,ft,"┌","\\@ulcorner",!0),nt(it,st,ht,"┐","\\@urcorner",!0),nt(it,st,ft,"└","\\@llcorner",!0),nt(it,st,ht,"┘","\\@lrcorner",!0),nt(it,st,mt,"≦","\\leqq",!0),nt(it,st,mt,"⩽","\\leqslant",!0),nt(it,st,mt,"⪕","\\eqslantless",!0),nt(it,st,mt,"≲","\\lesssim",!0),nt(it,st,mt,"⪅","\\lessapprox",!0),nt(it,st,mt,"≊","\\approxeq",!0),nt(it,st,ct,"⋖","\\lessdot"),nt(it,st,mt,"⋘","\\lll",!0),nt(it,st,mt,"≶","\\lessgtr",!0),nt(it,st,mt,"⋚","\\lesseqgtr",!0),nt(it,st,mt,"⪋","\\lesseqqgtr",!0),nt(it,st,mt,"≑","\\doteqdot"),nt(it,st,mt,"≓","\\risingdotseq",!0),nt(it,st,mt,"≒","\\fallingdotseq",!0),nt(it,st,mt,"∽","\\backsim",!0),nt(it,st,mt,"⋍","\\backsimeq",!0),nt(it,st,mt,"⫅","\\subseteqq",!0),nt(it,st,mt,"⋐","\\Subset",!0),nt(it,st,mt,"⊏","\\sqsubset",!0),nt(it,st,mt,"≼","\\preccurlyeq",!0),nt(it,st,mt,"⋞","\\curlyeqprec",!0),nt(it,st,mt,"≾","\\precsim",!0),nt(it,st,mt,"⪷","\\precapprox",!0),nt(it,st,mt,"⊲","\\vartriangleleft"),nt(it,st,mt,"⊴","\\trianglelefteq"),nt(it,st,mt,"⊨","\\vDash",!0),nt(it,st,mt,"⊪","\\Vvdash",!0),nt(it,st,mt,"⌣","\\smallsmile"),nt(it,st,mt,"⌢","\\smallfrown"),nt(it,st,mt,"≏","\\bumpeq",!0),nt(it,st,mt,"≎","\\Bumpeq",!0),nt(it,st,mt,"≧","\\geqq",!0),nt(it,st,mt,"⩾","\\geqslant",!0),nt(it,st,mt,"⪖","\\eqslantgtr",!0),nt(it,st,mt,"≳","\\gtrsim",!0),nt(it,st,mt,"⪆","\\gtrapprox",!0),nt(it,st,ct,"⋗","\\gtrdot"),nt(it,st,mt,"⋙","\\ggg",!0),nt(it,st,mt,"≷","\\gtrless",!0),nt(it,st,mt,"⋛","\\gtreqless",!0),nt(it,st,mt,"⪌","\\gtreqqless",!0),nt(it,st,mt,"≖","\\eqcirc",!0),nt(it,st,mt,"≗","\\circeq",!0),nt(it,st,mt,"≜","\\triangleq",!0),nt(it,st,mt,"∼","\\thicksim"),nt(it,st,mt,"≈","\\thickapprox"),nt(it,st,mt,"⫆","\\supseteqq",!0),nt(it,st,mt,"⋑","\\Supset",!0),nt(it,st,mt,"⊐","\\sqsupset",!0),nt(it,st,mt,"≽","\\succcurlyeq",!0),nt(it,st,mt,"⋟","\\curlyeqsucc",!0),nt(it,st,mt,"≿","\\succsim",!0),nt(it,st,mt,"⪸","\\succapprox",!0),nt(it,st,mt,"⊳","\\vartriangleright"),nt(it,st,mt,"⊵","\\trianglerighteq"),nt(it,st,mt,"⊩","\\Vdash",!0),nt(it,st,mt,"∣","\\shortmid"),nt(it,st,mt,"∥","\\shortparallel"),nt(it,st,mt,"≬","\\between",!0),nt(it,st,mt,"⋔","\\pitchfork",!0),nt(it,st,mt,"∝","\\varpropto"),nt(it,st,mt,"◀","\\blacktriangleleft"),nt(it,st,mt,"∴","\\therefore",!0),nt(it,st,mt,"∍","\\backepsilon"),nt(it,st,mt,"▶","\\blacktriangleright"),nt(it,st,mt,"∵","\\because",!0),nt(it,st,mt,"⋘","\\llless"),nt(it,st,mt,"⋙","\\gggtr"),nt(it,st,ct,"⊲","\\lhd"),nt(it,st,ct,"⊳","\\rhd"),nt(it,st,mt,"≂","\\eqsim",!0),nt(it,ot,mt,"⋈","\\Join"),nt(it,st,mt,"≑","\\Doteq",!0),nt(it,st,ct,"∔","\\dotplus",!0),nt(it,st,ct,"∖","\\smallsetminus"),nt(it,st,ct,"⋒","\\Cap",!0),nt(it,st,ct,"⋓","\\Cup",!0),nt(it,st,ct,"⩞","\\doublebarwedge",!0),nt(it,st,ct,"⊟","\\boxminus",!0),nt(it,st,ct,"⊞","\\boxplus",!0),nt(it,st,ct,"⋇","\\divideontimes",!0),nt(it,st,ct,"⋉","\\ltimes",!0),nt(it,st,ct,"⋊","\\rtimes",!0),nt(it,st,ct,"⋋","\\leftthreetimes",!0),nt(it,st,ct,"⋌","\\rightthreetimes",!0),nt(it,st,ct,"⋏","\\curlywedge",!0),nt(it,st,ct,"⋎","\\curlyvee",!0),nt(it,st,ct,"⊝","\\circleddash",!0),nt(it,st,ct,"⊛","\\circledast",!0),nt(it,st,ct,"⋅","\\centerdot"),nt(it,st,ct,"⊺","\\intercal",!0),nt(it,st,ct,"⋒","\\doublecap"),nt(it,st,ct,"⋓","\\doublecup"),nt(it,st,ct,"⊠","\\boxtimes",!0),nt(it,st,mt,"⇢","\\dashrightarrow",!0),nt(it,st,mt,"⇠","\\dashleftarrow",!0),nt(it,st,mt,"⇇","\\leftleftarrows",!0),nt(it,st,mt,"⇆","\\leftrightarrows",!0),nt(it,st,mt,"⇚","\\Lleftarrow",!0),nt(it,st,mt,"↞","\\twoheadleftarrow",!0),nt(it,st,mt,"↢","\\leftarrowtail",!0),nt(it,st,mt,"↫","\\looparrowleft",!0),nt(it,st,mt,"⇋","\\leftrightharpoons",!0),nt(it,st,mt,"↶","\\curvearrowleft",!0),nt(it,st,mt,"↺","\\circlearrowleft",!0),nt(it,st,mt,"↰","\\Lsh",!0),nt(it,st,mt,"⇈","\\upuparrows",!0),nt(it,st,mt,"↿","\\upharpoonleft",!0),nt(it,st,mt,"⇃","\\downharpoonleft",!0),nt(it,ot,mt,"⊶","\\origof",!0),nt(it,ot,mt,"⊷","\\imageof",!0),nt(it,st,mt,"⊸","\\multimap",!0),nt(it,st,mt,"↭","\\leftrightsquigarrow",!0),nt(it,st,mt,"⇉","\\rightrightarrows",!0),nt(it,st,mt,"⇄","\\rightleftarrows",!0),nt(it,st,mt,"↠","\\twoheadrightarrow",!0),nt(it,st,mt,"↣","\\rightarrowtail",!0),nt(it,st,mt,"↬","\\looparrowright",!0),nt(it,st,mt,"↷","\\curvearrowright",!0),nt(it,st,mt,"↻","\\circlearrowright",!0),nt(it,st,mt,"↱","\\Rsh",!0),nt(it,st,mt,"⇊","\\downdownarrows",!0),nt(it,st,mt,"↾","\\upharpoonright",!0),nt(it,st,mt,"⇂","\\downharpoonright",!0),nt(it,st,mt,"⇝","\\rightsquigarrow",!0),nt(it,st,mt,"⇝","\\leadsto"),nt(it,st,mt,"⇛","\\Rrightarrow",!0),nt(it,st,mt,"↾","\\restriction"),nt(it,ot,vt,"‘","`"),nt(it,ot,vt,"$","\\$"),nt(at,ot,vt,"$","\\$"),nt(at,ot,vt,"$","\\textdollar"),nt(it,ot,vt,"%","\\%"),nt(at,ot,vt,"%","\\%"),nt(it,ot,vt,"_","\\_"),nt(at,ot,vt,"_","\\_"),nt(at,ot,vt,"_","\\textunderscore"),nt(it,ot,vt,"∠","\\angle",!0),nt(it,ot,vt,"∞","\\infty",!0),nt(it,ot,vt,"′","\\prime"),nt(it,ot,vt,"△","\\triangle"),nt(it,ot,vt,"Γ","\\Gamma",!0),nt(it,ot,vt,"Δ","\\Delta",!0),nt(it,ot,vt,"Θ","\\Theta",!0),nt(it,ot,vt,"Λ","\\Lambda",!0),nt(it,ot,vt,"Ξ","\\Xi",!0),nt(it,ot,vt,"Π","\\Pi",!0),nt(it,ot,vt,"Σ","\\Sigma",!0),nt(it,ot,vt,"Υ","\\Upsilon",!0),nt(it,ot,vt,"Φ","\\Phi",!0),nt(it,ot,vt,"Ψ","\\Psi",!0),nt(it,ot,vt,"Ω","\\Omega",!0),nt(it,ot,vt,"A","Α"),nt(it,ot,vt,"B","Β"),nt(it,ot,vt,"E","Ε"),nt(it,ot,vt,"Z","Ζ"),nt(it,ot,vt,"H","Η"),nt(it,ot,vt,"I","Ι"),nt(it,ot,vt,"K","Κ"),nt(it,ot,vt,"M","Μ"),nt(it,ot,vt,"N","Ν"),nt(it,ot,vt,"O","Ο"),nt(it,ot,vt,"P","Ρ"),nt(it,ot,vt,"T","Τ"),nt(it,ot,vt,"X","Χ"),nt(it,ot,vt,"¬","\\neg",!0),nt(it,ot,vt,"¬","\\lnot"),nt(it,ot,vt,"⊤","\\top"),nt(it,ot,vt,"⊥","\\bot"),nt(it,ot,vt,"∅","\\emptyset"),nt(it,st,vt,"∅","\\varnothing"),nt(it,ot,dt,"α","\\alpha",!0),nt(it,ot,dt,"β","\\beta",!0),nt(it,ot,dt,"γ","\\gamma",!0),nt(it,ot,dt,"δ","\\delta",!0),nt(it,ot,dt,"ϵ","\\epsilon",!0),nt(it,ot,dt,"ζ","\\zeta",!0),nt(it,ot,dt,"η","\\eta",!0),nt(it,ot,dt,"θ","\\theta",!0),nt(it,ot,dt,"ι","\\iota",!0),nt(it,ot,dt,"κ","\\kappa",!0),nt(it,ot,dt,"λ","\\lambda",!0),nt(it,ot,dt,"μ","\\mu",!0),nt(it,ot,dt,"ν","\\nu",!0),nt(it,ot,dt,"ξ","\\xi",!0),nt(it,ot,dt,"ο","\\omicron",!0),nt(it,ot,dt,"π","\\pi",!0),nt(it,ot,dt,"ρ","\\rho",!0),nt(it,ot,dt,"σ","\\sigma",!0),nt(it,ot,dt,"τ","\\tau",!0),nt(it,ot,dt,"υ","\\upsilon",!0),nt(it,ot,dt,"ϕ","\\phi",!0),nt(it,ot,dt,"χ","\\chi",!0),nt(it,ot,dt,"ψ","\\psi",!0),nt(it,ot,dt,"ω","\\omega",!0),nt(it,ot,dt,"ε","\\varepsilon",!0),nt(it,ot,dt,"ϑ","\\vartheta",!0),nt(it,ot,dt,"ϖ","\\varpi",!0),nt(it,ot,dt,"ϱ","\\varrho",!0),nt(it,ot,dt,"ς","\\varsigma",!0),nt(it,ot,dt,"φ","\\varphi",!0),nt(it,ot,ct,"∗","*",!0),nt(it,ot,ct,"+","+"),nt(it,ot,ct,"−","-",!0),nt(it,ot,ct,"⋅","\\cdot",!0),nt(it,ot,ct,"∘","\\circ",!0),nt(it,ot,ct,"÷","\\div",!0),nt(it,ot,ct,"±","\\pm",!0),nt(it,ot,ct,"×","\\times",!0),nt(it,ot,ct,"∩","\\cap",!0),nt(it,ot,ct,"∪","\\cup",!0),nt(it,ot,ct,"∖","\\setminus",!0),nt(it,ot,ct,"∧","\\land"),nt(it,ot,ct,"∨","\\lor"),nt(it,ot,ct,"∧","\\wedge",!0),nt(it,ot,ct,"∨","\\vee",!0),nt(it,ot,vt,"√","\\surd"),nt(it,ot,ft,"⟨","\\langle",!0),nt(it,ot,ft,"∣","\\lvert"),nt(it,ot,ft,"∥","\\lVert"),nt(it,ot,ht,"?","?"),nt(it,ot,ht,"!","!"),nt(it,ot,ht,"⟩","\\rangle",!0),nt(it,ot,ht,"∣","\\rvert"),nt(it,ot,ht,"∥","\\rVert"),nt(it,ot,mt,"=","="),nt(it,ot,mt,":",":"),nt(it,ot,mt,"≈","\\approx",!0),nt(it,ot,mt,"≅","\\cong",!0),nt(it,ot,mt,"≥","\\ge"),nt(it,ot,mt,"≥","\\geq",!0),nt(it,ot,mt,"←","\\gets"),nt(it,ot,mt,">","\\gt",!0),nt(it,ot,mt,"∈","\\in",!0),nt(it,ot,mt,"","\\@not"),nt(it,ot,mt,"⊂","\\subset",!0),nt(it,ot,mt,"⊃","\\supset",!0),nt(it,ot,mt,"⊆","\\subseteq",!0),nt(it,ot,mt,"⊇","\\supseteq",!0),nt(it,st,mt,"⊈","\\nsubseteq",!0),nt(it,st,mt,"⊉","\\nsupseteq",!0),nt(it,ot,mt,"⊨","\\models"),nt(it,ot,mt,"←","\\leftarrow",!0),nt(it,ot,mt,"≤","\\le"),nt(it,ot,mt,"≤","\\leq",!0),nt(it,ot,mt,"<","\\lt",!0),nt(it,ot,mt,"→","\\rightarrow",!0),nt(it,ot,mt,"→","\\to"),nt(it,st,mt,"≱","\\ngeq",!0),nt(it,st,mt,"≰","\\nleq",!0),nt(it,ot,yt," ","\\ "),nt(it,ot,yt," ","\\space"),nt(it,ot,yt," ","\\nobreakspace"),nt(at,ot,yt," ","\\ "),nt(at,ot,yt," "," "),nt(at,ot,yt," ","\\space"),nt(at,ot,yt," ","\\nobreakspace"),nt(it,ot,yt,"","\\nobreak"),nt(it,ot,yt,"","\\allowbreak"),nt(it,ot,gt,",",","),nt(it,ot,gt,";",";"),nt(it,st,ct,"⊼","\\barwedge",!0),nt(it,st,ct,"⊻","\\veebar",!0),nt(it,ot,ct,"⊙","\\odot",!0),nt(it,ot,ct,"⊕","\\oplus",!0),nt(it,ot,ct,"⊗","\\otimes",!0),nt(it,ot,vt,"∂","\\partial",!0),nt(it,ot,ct,"⊘","\\oslash",!0),nt(it,st,ct,"⊚","\\circledcirc",!0),nt(it,st,ct,"⊡","\\boxdot",!0),nt(it,ot,ct,"△","\\bigtriangleup"),nt(it,ot,ct,"▽","\\bigtriangledown"),nt(it,ot,ct,"†","\\dagger"),nt(it,ot,ct,"⋄","\\diamond"),nt(it,ot,ct,"⋆","\\star"),nt(it,ot,ct,"◃","\\triangleleft"),nt(it,ot,ct,"▹","\\triangleright"),nt(it,ot,ft,"{","\\{"),nt(at,ot,vt,"{","\\{"),nt(at,ot,vt,"{","\\textbraceleft"),nt(it,ot,ht,"}","\\}"),nt(at,ot,vt,"}","\\}"),nt(at,ot,vt,"}","\\textbraceright"),nt(it,ot,ft,"{","\\lbrace"),nt(it,ot,ht,"}","\\rbrace"),nt(it,ot,ft,"[","\\lbrack",!0),nt(at,ot,vt,"[","\\lbrack",!0),nt(it,ot,ht,"]","\\rbrack",!0),nt(at,ot,vt,"]","\\rbrack",!0),nt(it,ot,ft,"(","\\lparen",!0),nt(it,ot,ht,")","\\rparen",!0),nt(at,ot,vt,"<","\\textless",!0),nt(at,ot,vt,">","\\textgreater",!0),nt(it,ot,ft,"⌊","\\lfloor",!0),nt(it,ot,ht,"⌋","\\rfloor",!0),nt(it,ot,ft,"⌈","\\lceil",!0),nt(it,ot,ht,"⌉","\\rceil",!0),nt(it,ot,vt,"\\","\\backslash"),nt(it,ot,vt,"∣","|"),nt(it,ot,vt,"∣","\\vert"),nt(at,ot,vt,"|","\\textbar",!0),nt(it,ot,vt,"∥","\\|"),nt(it,ot,vt,"∥","\\Vert"),nt(at,ot,vt,"∥","\\textbardbl"),nt(at,ot,vt,"~","\\textasciitilde"),nt(at,ot,vt,"\\","\\textbackslash"),nt(at,ot,vt,"^","\\textasciicircum"),nt(it,ot,mt,"↑","\\uparrow",!0),nt(it,ot,mt,"⇑","\\Uparrow",!0),nt(it,ot,mt,"↓","\\downarrow",!0),nt(it,ot,mt,"⇓","\\Downarrow",!0),nt(it,ot,mt,"↕","\\updownarrow",!0),nt(it,ot,mt,"⇕","\\Updownarrow",!0),nt(it,ot,pt,"∐","\\coprod"),nt(it,ot,pt,"⋁","\\bigvee"),nt(it,ot,pt,"⋀","\\bigwedge"),nt(it,ot,pt,"⨄","\\biguplus"),nt(it,ot,pt,"⋂","\\bigcap"),nt(it,ot,pt,"⋃","\\bigcup"),nt(it,ot,pt,"∫","\\int"),nt(it,ot,pt,"∫","\\intop"),nt(it,ot,pt,"∬","\\iint"),nt(it,ot,pt,"∭","\\iiint"),nt(it,ot,pt,"∏","\\prod"),nt(it,ot,pt,"∑","\\sum"),nt(it,ot,pt,"⨂","\\bigotimes"),nt(it,ot,pt,"⨁","\\bigoplus"),nt(it,ot,pt,"⨀","\\bigodot"),nt(it,ot,pt,"∮","\\oint"),nt(it,ot,pt,"∯","\\oiint"),nt(it,ot,pt,"∰","\\oiiint"),nt(it,ot,pt,"⨆","\\bigsqcup"),nt(it,ot,pt,"∫","\\smallint"),nt(at,ot,ut,"…","\\textellipsis"),nt(it,ot,ut,"…","\\mathellipsis"),nt(at,ot,ut,"…","\\ldots",!0),nt(it,ot,ut,"…","\\ldots",!0),nt(it,ot,ut,"⋯","\\@cdots",!0),nt(it,ot,ut,"⋱","\\ddots",!0),nt(it,ot,vt,"⋮","\\varvdots"),nt(at,ot,vt,"⋮","\\varvdots"),nt(it,ot,lt,"ˊ","\\acute"),nt(it,ot,lt,"ˋ","\\grave"),nt(it,ot,lt,"¨","\\ddot"),nt(it,ot,lt,"~","\\tilde"),nt(it,ot,lt,"ˉ","\\bar"),nt(it,ot,lt,"˘","\\breve"),nt(it,ot,lt,"ˇ","\\check"),nt(it,ot,lt,"^","\\hat"),nt(it,ot,lt,"⃗","\\vec"),nt(it,ot,lt,"˙","\\dot"),nt(it,ot,lt,"˚","\\mathring"),nt(it,ot,dt,"","\\@imath"),nt(it,ot,dt,"","\\@jmath"),nt(it,ot,vt,"ı","ı"),nt(it,ot,vt,"ȷ","ȷ"),nt(at,ot,vt,"ı","\\i",!0),nt(at,ot,vt,"ȷ","\\j",!0),nt(at,ot,vt,"ß","\\ss",!0),nt(at,ot,vt,"æ","\\ae",!0),nt(at,ot,vt,"œ","\\oe",!0),nt(at,ot,vt,"ø","\\o",!0),nt(at,ot,vt,"Æ","\\AE",!0),nt(at,ot,vt,"Œ","\\OE",!0),nt(at,ot,vt,"Ø","\\O",!0),nt(at,ot,lt,"ˊ","\\'"),nt(at,ot,lt,"ˋ","\\`"),nt(at,ot,lt,"ˆ","\\^"),nt(at,ot,lt,"˜","\\~"),nt(at,ot,lt,"ˉ","\\="),nt(at,ot,lt,"˘","\\u"),nt(at,ot,lt,"˙","\\."),nt(at,ot,lt,"¸","\\c"),nt(at,ot,lt,"˚","\\r"),nt(at,ot,lt,"ˇ","\\v"),nt(at,ot,lt,"¨",'\\"'),nt(at,ot,lt,"˝","\\H"),nt(at,ot,lt,"◯","\\textcircled");var bt={"--":!0,"---":!0,"``":!0,"''":!0};nt(at,ot,vt,"–","--",!0),nt(at,ot,vt,"–","\\textendash"),nt(at,ot,vt,"—","---",!0),nt(at,ot,vt,"—","\\textemdash"),nt(at,ot,vt,"‘","`",!0),nt(at,ot,vt,"‘","\\textquoteleft"),nt(at,ot,vt,"’","'",!0),nt(at,ot,vt,"’","\\textquoteright"),nt(at,ot,vt,"“","``",!0),nt(at,ot,vt,"“","\\textquotedblleft"),nt(at,ot,vt,"”","''",!0),nt(at,ot,vt,"”","\\textquotedblright"),nt(it,ot,vt,"°","\\degree",!0),nt(at,ot,vt,"°","\\degree"),nt(at,ot,vt,"°","\\textdegree",!0),nt(it,ot,vt,"£","\\pounds"),nt(it,ot,vt,"£","\\mathsterling",!0),nt(at,ot,vt,"£","\\pounds"),nt(at,ot,vt,"£","\\textsterling",!0),nt(it,st,vt,"✠","\\maltese"),nt(at,st,vt,"✠","\\maltese");for(var xt='0123456789/@."',Tt=0;Tt<14;Tt++){var wt=xt.charAt(Tt);nt(it,ot,vt,wt,wt)}for(var kt='0123456789!@*()-=+";:?/.,',Ct=0;Ct<25;Ct++){var Et=kt.charAt(Ct);nt(at,ot,vt,Et,Et)}for(var St,_t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",At=0;At<52;At++){var Rt=_t.charAt(At);nt(it,ot,dt,Rt,Rt),nt(at,ot,vt,Rt,Rt)}nt(it,st,vt,"C","ℂ"),nt(at,st,vt,"C","ℂ"),nt(it,st,vt,"H","ℍ"),nt(at,st,vt,"H","ℍ"),nt(it,st,vt,"N","ℕ"),nt(at,st,vt,"N","ℕ"),nt(it,st,vt,"P","ℙ"),nt(at,st,vt,"P","ℙ"),nt(it,st,vt,"Q","ℚ"),nt(at,st,vt,"Q","ℚ"),nt(it,st,vt,"R","ℝ"),nt(at,st,vt,"R","ℝ"),nt(it,st,vt,"Z","ℤ"),nt(at,st,vt,"Z","ℤ"),nt(it,ot,dt,"h","ℎ"),nt(at,ot,dt,"h","ℎ");for(var Lt=0;Lt<52;Lt++){var It=_t.charAt(Lt);nt(it,ot,dt,It,St=String.fromCharCode(55349,56320+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56372+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56424+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56580+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56684+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56736+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56788+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56840+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56944+Lt)),nt(at,ot,vt,It,St),Lt<26&&(nt(it,ot,dt,It,St=String.fromCharCode(55349,56632+Lt)),nt(at,ot,vt,It,St),nt(it,ot,dt,It,St=String.fromCharCode(55349,56476+Lt)),nt(at,ot,vt,It,St))}nt(it,ot,dt,"k",St=String.fromCharCode(55349,56668)),nt(at,ot,vt,"k",St);for(var Dt=0;Dt<10;Dt++){var Nt=Dt.toString();nt(it,ot,dt,Nt,St=String.fromCharCode(55349,57294+Dt)),nt(at,ot,vt,Nt,St),nt(it,ot,dt,Nt,St=String.fromCharCode(55349,57314+Dt)),nt(at,ot,vt,Nt,St),nt(it,ot,dt,Nt,St=String.fromCharCode(55349,57324+Dt)),nt(at,ot,vt,Nt,St),nt(it,ot,dt,Nt,St=String.fromCharCode(55349,57334+Dt)),nt(at,ot,vt,Nt,St)}for(var Mt="ÐÞþ",Ot=0;Ot<3;Ot++){var $t=Mt.charAt(Ot);nt(it,ot,dt,$t,$t),nt(at,ot,vt,$t,$t)}var Pt={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Bt={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Ft={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},zt={mathClass:"",textClass:"",font:""},Kt={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},jt={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},qt={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Wt={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},Ut={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Gt={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Yt={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},Vt=[Pt,Pt,Bt,Bt,Ft,Ft,{mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},zt,zt,zt,Kt,Kt,jt,jt,qt,qt,Wt,Wt,Ut,Ut,Gt,Gt,zt,zt,Yt,Yt],Ht=[Pt,zt,Wt,Ut,Yt],Xt=function(t,e,r){if(rt[r][t]){var n=rt[r][t].replace;n&&(t=n)}return{value:t,metrics:tt(t,e,r)}},Zt=function(t,e,r,n,i){var a,o=Xt(t,e,r),s=o.metrics;if(t=o.value,s){var l=s.italic;("text"===r||n&&"mathit"===n.font)&&(l=0),a=new Y(t,s.height,s.depth,l,s.skew,s.width,i)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),a=new Y(t,0,0,0,0,0,i);if(n){a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight");var c=n.getColor();c&&(a.style.color=c)}return a},Qt=function(t,e,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Xt(t,"Main-Bold",e).metrics?Zt(t,"Main-Bold",e,r,n.concat(["mathbf"])):"\\"===t||"main"===rt[e][t].font?Zt(t,"Main-Regular",e,r,n):Zt(t,"AMS-Regular",e,r,n.concat(["amsrm"]))},Jt=function(t,e,r){var i=t.mode,a=t.text,o=["mord"],{font:s,fontFamily:l,fontWeight:c,fontShape:h}=e,u="math"===i||"text"===i&&!!s,d=u?s:l,p="",f="";if(55349===a.charCodeAt(0)){var g=(t=>{var e=1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536;if(119808<=e&&e<120484){var r=Math.floor((e-119808)/26);return Vt[r]}if(120782<=e&&e<=120831){var i=Math.floor((e-120782)/10);return Ht[i]}if(120485===e||120486===e)return Vt[0];if(120486<e&&e<120782)return zt;throw new n("Unsupported character: "+t)})(a);p=g.font,f=g[i+"Class"]}if(p)return Zt(a,p,i,e,o.concat(f));if(d){var m,y;if("boldsymbol"===d){var v=function(t,e,r){return"textord"!==r&&Xt(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,i,r);m=v.fontName,y=[v.fontClass]}else u?(m=ue[s].fontName,y=[s]):(m=he(l,c,h),y=[l,c,h]);if(Xt(a,m,i).metrics)return Zt(a,m,i,e,o.concat(y));if(bt.hasOwnProperty(a)&&"Typewriter"===m.slice(0,10)){for(var b=[],x=0;x<a.length;x++)b.push(Zt(a[x],m,i,e,o.concat(y)));return oe(b)}}if("mathord"===r)return Zt(a,"Math-Italic",i,e,o.concat(["mathnormal"]));if("textord"===r){var T=rt[i][a]&&rt[i][a].font;if("ams"===T){var w=he("amsrm",c,h);return Zt(a,w,i,e,o.concat("amsrm",c,h))}if("main"!==T&&T){var k=he(T,c,h);return Zt(a,k,i,e,o.concat(k,c,h))}var C=he("textrm",c,h);return Zt(a,C,i,e,o.concat(c,h))}throw new Error("unexpected type: "+r+" in makeOrd")},te=(t,e)=>{if(P(t.classes)!==P(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize||0!==t.italic&&t.hasClass("mathnormal"))return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n of Object.keys(t.style))if(t.style[n]!==e.style[n])return!1;for(var i of Object.keys(e.style))if(t.style[i]!==e.style[i])return!1;return!0},ee=t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof Y&&n instanceof Y&&te(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},re=function(t){for(var e=0,r=0,n=0,i=0;i<t.children.length;i++){var a=t.children[i];a.height>e&&(e=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>n&&(n=a.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=n},ne=function(t,e,r,n){var i=new q(t,e,r,n);return re(i),i},ie=(t,e,r,n)=>new q(t,e,r,n),ae=function(t,e,r){var n=ne([t],[],e);return n.height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),n.style.borderBottomWidth=$(n.height),n.maxFontSize=1,n},oe=function(t){var e=new I(t);return re(e),e},se=function(t,e){return t instanceof I?ne([],[t],e):t},le=function(t,e){for(var{children:r,depth:n}=function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,a=1;a<e.length;a++){var o=-e[a].shift-i-e[a].elem.depth,s=o-(e[a-1].elem.height+e[a-1].elem.depth);i+=o,r.push({type:"kern",size:s}),r.push(e[a])}return{children:r,depth:n}}var l;if("top"===t.positionType){for(var c=t.positionData,h=0;h<t.children.length;h++){var u=t.children[h];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}l=c}else if("bottom"===t.positionType)l=-t.positionData;else{var d=t.children[0];if("elem"!==d.type)throw new Error('First child must have type "elem".');if("shift"===t.positionType)l=-d.elem.depth-t.positionData;else{if("firstBaseline"!==t.positionType)throw new Error("Invalid positionType "+t.positionType+".");l=-d.elem.depth}}return{children:t.children,depth:l}}(t),i=0,a=0;a<r.length;a++){var o=r[a];if("elem"===o.type){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var l=ne(["pstrut"],[]);l.style.height=$(i);for(var c=[],h=n,u=n,d=n,p=0;p<r.length;p++){var f=r[p];if("kern"===f.type)d+=f.size;else{var g=f.elem,m=f.wrapperClasses||[],y=f.wrapperStyle||{},v=ne(m,[l,g],void 0,y);v.style.top=$(-i-d-g.depth),f.marginLeft&&(v.style.marginLeft=f.marginLeft),f.marginRight&&(v.style.marginRight=f.marginRight),c.push(v),d+=g.height+g.depth}h=Math.min(h,d),u=Math.max(u,d)}var b,x=ne(["vlist"],c);if(x.style.height=$(u),h<0){var T=ne([],[]),w=ne(["vlist"],[T]);w.style.height=$(-h);var k=ne(["vlist-s"],[new Y("")]);b=[ne(["vlist-r"],[x,k]),ne(["vlist-r"],[w])]}else b=[ne(["vlist-r"],[x])];var C=ne(["vlist-t"],b);return 2===b.length&&C.classes.push("vlist-t2"),C.height=u,C.depth=-h,C},ce=(t,e)=>{var r=ne(["mspace"],[],e),n=O(t,e);return r.style.marginRight=$(n),r},he=(t,e,r)=>{var n;switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===r?"Italic":"Regular")},ue={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},de={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},pe=function(t,e){var[r,n,i]=de[t],a=new H(r),o=new V([a],{width:$(n),height:$(i),style:"width:"+$(n),viewBox:"0 0 "+1e3*n+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),s=ie(["overlay"],[o],e);return s.height=i,s.style.height=$(i),s.style.width=$(n),s},fe={number:3,unit:"mu"},ge={number:4,unit:"mu"},me={number:5,unit:"mu"},ye={mord:{mop:fe,mbin:ge,mrel:me,minner:fe},mop:{mord:fe,mop:fe,mrel:me,minner:fe},mbin:{mord:ge,mop:ge,mopen:ge,minner:ge},mrel:{mord:me,mop:me,mopen:me,minner:me},mopen:{},mclose:{mop:fe,mbin:ge,mrel:me,minner:fe},mpunct:{mord:fe,mop:fe,mrel:me,mopen:fe,mclose:fe,mpunct:fe,minner:fe},minner:{mord:fe,mop:fe,mbin:ge,mrel:me,mopen:fe,mpunct:fe,minner:fe}},ve={mord:{mop:fe},mop:{mord:fe,mop:fe},mbin:{},mrel:{},mopen:{},mclose:{mop:fe},mpunct:{},minner:{mop:fe}},be={},xe={},Te={};function we(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l<r.length;++l)be[r[l]]=s;e&&(a&&(xe[e]=a),o&&(Te[e]=o))}function ke(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;we({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var Ce=function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},Ee=function(t){return"ordgroup"===t.type?t.body:[t]},Se=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),_e=new Set(["rightmost","mrel","mclose","mpunct"]),Ae={display:C.DISPLAY,text:C.TEXT,script:C.SCRIPT,scriptscript:C.SCRIPTSCRIPT},Re={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Le=function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i=[],a=0;a<t.length;a++){var o=$e(t[a],e);if(o instanceof I){var s=o.children;i.push(...s)}else i.push(o)}if(ee(i),!r)return i;var l=e;if(1===t.length){var c=t[0];"sizing"===c.type?l=e.havingSize(c.size):"styling"===c.type&&(l=e.havingStyle(Ae[c.style]))}var h=ne([n[0]||"leftmost"],[],e),u=ne([n[1]||"rightmost"],[],e),d="root"===r;return Ie(i,(t,e)=>{var r=e.classes[0],n=t.classes[0];"mbin"===r&&_e.has(n)?e.classes[0]="mord":"mbin"===n&&Se.has(r)&&(t.classes[0]="mord")},{node:h},u,d),Ie(i,(t,e)=>{var r,n,i=Me(e),a=Me(t),o=i&&a?t.hasClass("mtight")?null==(r=ve[i])?void 0:r[a]:null==(n=ye[i])?void 0:n[a]:null;if(o)return ce(o,l)},{node:h},u,d),i},Ie=function(t,e,r,n,i){n&&t.push(n);for(var a=0;a<t.length;a++){var o=t[a],s=De(o);if(s)Ie(s.children,e,r,null,i);else{var l=!o.hasClass("mspace");if(l){var c=e(o,r.node);c&&(r.insertAfter?r.insertAfter(c):(t.unshift(c),a++))}l?r.node=o:i&&o.hasClass("newline")&&(r.node=ne(["leftmost"])),r.insertAfter=(e=>r=>{t.splice(e+1,0,r),a++})(a)}}n&&t.pop()},De=function(t){return t instanceof I||t instanceof W||t instanceof q&&t.hasClass("enclosing")?t:null},Ne=function(t,e){var r=De(t);if(r){var n=r.children;if(n.length){if("right"===e)return Ne(n[n.length-1],"right");if("left"===e)return Ne(n[0],"left")}}return t},Me=function(t,e){if(!t)return null;e&&(t=Ne(t,e));var r=t.classes[0];return Re[r]||null},Oe=function(t,e){var r=["nulldelimiter"].concat(t.baseSizingClasses());return ne(e.concat(r))},$e=function(t,e,r){if(!t)return ne();if(xe[t.type]){var i=xe[t.type](t,e);if(r&&e.size!==r.size){i=ne(e.sizingClasses(r),[i],e);var a=e.sizeMultiplier/r.sizeMultiplier;i.height*=a,i.depth*=a}return i}throw new n("Got group of unknown type: '"+t.type+"'")};function Pe(t,e){var r=ne(["base"],t,e),n=ne(["strut"]);return n.style.height=$(r.height+r.depth),r.depth&&(n.style.verticalAlign=$(-r.depth)),r.children.unshift(n),r}function Be(t,e){var r=null;1===t.length&&"tag"===t[0].type&&(r=t[0].tag,t=t[0].body);var n,i=Le(t,e,"root");2===i.length&&i[1].hasClass("tag")&&(n=i.pop());for(var a,o=[],s=[],l=0;l<i.length;l++)if(s.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,s.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(o.push(Pe(s,e)),s=[])}else i[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(Pe(s,e)),s=[]),o.push(i[l]));s.length>0&&o.push(Pe(s,e)),r?((a=Pe(Le(r,e,!0),e)).classes=["tag"],o.push(a)):n&&o.push(n);var h=ne(["katex-html"],o);if(h.setAttribute("aria-hidden","true"),a){var u=a.children[0];u.style.height=$(h.height+h.depth),h.depth&&(u.style.verticalAlign=$(-h.depth))}return h}function Fe(t){return new I(t)}class ze{constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);this.classes.length>0&&(t.className=P(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Ke&&this.children[r+1]instanceof Ke){for(var n=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Ke;)n+=this.children[++r].toText();t.appendChild(new Ke(n).toNode())}else t.appendChild(this.children[r].toNode());return t}toMarkup(){var t="<"+this.type;for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=l(this.attributes[e]),t+='"');this.classes.length>0&&(t+=' class ="'+l(P(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</"+this.type+">"}toText(){return this.children.map(t=>t.toText()).join("")}}class Ke{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return l(this.toText())}toText(){return this.text}}class je{constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=t>=.05555&&t<=.05556?" ":t>=.1666&&t<=.1667?" ":t>=.2222&&t<=.2223?" ":t>=.2777&&t<=.2778?" ":t>=-.05556&&t<=-.05555?" ":t>=-.1667&&t<=-.1666?" ":t>=-.2223&&t<=-.2222?" ":t>=-.2778&&t<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",$(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+$(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var qe=new Set(["\\imath","\\jmath"]),We=new Set(["mrow","mtable"]),Ue=function(t,e,r){return!rt[e][t]||!rt[e][t].replace||55349===t.charCodeAt(0)||bt.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=rt[e][t].replace),new Ke(t)},Ge=function(t){return 1===t.length?t[0]:new ze("mrow",t)},Ye={mathit:"italic",boldsymbol:t=>"textord"===t.type?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Ve=(t,e)=>{if("text"===t.mode){if("texttt"===e.fontFamily)return"monospace";if("textsf"===e.fontFamily)return"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===e.fontShape&&"textbf"===e.fontWeight)return"bold-italic";if("textit"===e.fontShape)return"italic";if("textbf"===e.fontWeight)return"bold"}var r=e.font;if(!r||"mathnormal"===r)return null;var n=t.mode,i=Ye[r];if(i)return"function"==typeof i?i(t):i;var a=t.text;if(qe.has(a))return null;if(rt[n][a]){var o=rt[n][a].replace;o&&(a=o)}return tt(a,ue[r].fontName,n)?ue[r].variant:null};function He(t){if(!t)return!1;if("mi"===t.type&&1===t.children.length){var e=t.children[0];return e instanceof Ke&&"."===e.text}if("mo"===t.type&&1===t.children.length&&"true"===t.getAttribute("separator")&&"0em"===t.getAttribute("lspace")&&"0em"===t.getAttribute("rspace")){var r=t.children[0];return r instanceof Ke&&","===r.text}return!1}var Xe=function(t,e,r){if(1===t.length){var n=Qe(t[0],e);return r&&n instanceof ze&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var i,a=[],o=0;o<t.length;o++){var s=Qe(t[o],e);if(s instanceof ze&&i instanceof ze){if("mtext"===s.type&&"mtext"===i.type&&s.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...s.children);continue}if("mn"===s.type&&"mn"===i.type){i.children.push(...s.children);continue}if(He(s)&&"mn"===i.type){i.children.push(...s.children);continue}if("mn"===s.type&&He(i))s.children=[...i.children,...s.children],a.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===i.type||He(i))){var l=s.children[0];l instanceof ze&&"mn"===l.type&&(l.children=[...i.children,...l.children],a.pop())}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof Ke&&"̸"===c.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var h=s.children[0];h instanceof Ke&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(s),i=s}return a},Ze=function(t,e,r){return Ge(Xe(t,e,r))},Qe=function(t,e){if(!t)return new ze("mrow");if(Te[t.type])return Te[t.type](t,e);throw new n("Got group of unknown type: '"+t.type+"'")};function Je(t,e,r,n,i){var a,o=Xe(t,r);a=1===o.length&&o[0]instanceof ze&&We.has(o[0].type)?o[0]:new ze("mrow",o);var s=new ze("annotation",[new Ke(e)]);s.setAttribute("encoding","application/x-tex");var l=new ze("semantics",[a,s]),c=new ze("math",[l]);return c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block"),ne([i?"katex":"katex-mathml"],[c])}var tr=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],er=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],rr=function(t,e){return e.size<2?t:tr[t-1][e.size-1]};class nr{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||nr.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=er[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(e,t),new nr(e)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:rr(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:er[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=rr(nr.BASESIZE,t);return this.size===e&&this.textSize===nr.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==nr.BASESIZE?["sizing","reset-size"+this.size,"size"+nr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(t){var e;if(!et[e=t>=5?0:t>=3?1:2]){var r=et[e]={cssEmPerMu:Q.quad[e]/18};for(var n in Q)Q.hasOwnProperty(n)&&(r[n]=Q[n][e])}return et[e]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}nr.BASESIZE=6;var ir=function(t){return new nr({style:t.displayMode?C.DISPLAY:C.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},ar=function(t,e){if(e.displayMode){var r=["katex-display"];e.leqno&&r.push("leqno"),e.fleqn&&r.push("fleqn"),t=ne(r,[t])}return t},or={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},sr=function(t){var e=new ze("mo",[new Ke(or[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},lr={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},cr=new Set(["widehat","widecheck","widetilde","utilde"]),hr=function(t,e){var{span:r,minWidth:n,height:i}=function(){var r=4e5,n=t.label.slice(1);if(cr.has(n)&&"base"in t){var i,a,o,s="ordgroup"===t.base.type?t.base.body.length:1;if(s>5)"widehat"===n||"widecheck"===n?(i=420,r=2364,o=.42,a=n+"4"):(i=312,r=2340,o=.34,a="tilde4");else{var l=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][l],i=[0,239,300,360,420][l],o=[0,.24,.3,.3,.36,.42][l],a=n+l):(r=[0,600,1033,2339,2340][l],i=[0,260,286,306,312][l],o=[0,.26,.286,.3,.306,.34][l],a="tilde"+l)}var c=new H(a),h=new V([c],{width:"100%",height:$(o),viewBox:"0 0 "+r+" "+i,preserveAspectRatio:"none"});return{span:ie([],[h],e),minWidth:0,height:o}}var u=[],d=lr[n];if(!d)throw new Error('No SVG data for "'+n+'".');var p,f,[g,m,y]=d,v=y/1e3,b=g.length;if(1===b){if(4!==d.length)throw new Error('Expected 4-tuple for single-path SVG data "'+n+'".');p=["hide-tail"],f=[d[3]]}else if(2===b)p=["halfarrow-left","halfarrow-right"],f=["xMinYMin","xMaxYMin"];else{if(3!==b)throw new Error("Correct katexImagesData or update code here to support\n "+b+" children.");p=["brace-left","brace-center","brace-right"],f=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<b;x++){var T=new H(g[x]),w=new V([T],{width:"400em",height:$(v),viewBox:"0 0 "+r+" "+y,preserveAspectRatio:f[x]+" slice"}),k=ie([p[x]],[w],e);if(1===b)return{span:k,minWidth:m,height:v};k.style.height=$(v),u.push(k)}return{span:ne(["stretchy"],u,e),minWidth:m,height:v}}();return r.height=i,r.style.height=$(i),n>0&&(r.style.minWidth=$(n)),r},ur={bin:1,close:1,inner:1,open:1,punct:1,rel:1},dr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function pr(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function fr(t){var e=gr(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function gr(t){return t&&("atom"===t.type||dr.hasOwnProperty(t.type))?t:null}var mr=t=>{return t instanceof Y?t:((e=t)instanceof q||e instanceof W||e instanceof I)&&1===t.children.length?mr(t.children[0]):void 0;var e},yr=(t,e)=>{var r,n,i;t&&"supsub"===t.type?(r=(n=pr(t.base,"accent")).base,t.base=r,i=function(t){if(t instanceof q)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}($e(t,e)),t.base=n):r=(n=pr(t,"accent")).base;var a,o,s=$e(r,e.havingCrampedStyle()),l=0;n.isShifty&&u(r)&&(l=null!=(a=null==(o=mr(s))?void 0:o.skew)?a:0);var c,h="\\c"===n.label,d=h?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight);if(n.isStretchy)c=hr(n,e),c=le({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+$(2*l)+")",marginLeft:$(2*l)}:void 0}]});else{var p,f;"\\vec"===n.label?(p=pe("vec",e),f=de.vec[1]):(p=function(t){if(t instanceof Y)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}(p=Jt({type:"textord",mode:n.mode,text:n.label},e,"textord")),p.italic=0,f=p.width,h&&(d+=p.depth)),c=ne(["accent-body"],[p]);var g="\\textcircled"===n.label;g&&(c.classes.push("accent-full"),d=s.height);var m=l;g||(m-=f/2),c.style.left=$(m),"\\textcircled"===n.label&&(c.style.top=".2em"),c=le({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:c}]})}var y=ne(["mord","accent"],[c],e);return i?(i.children[0]=y,i.height=Math.max(y.height,i.height),i.classes[0]="mord",i):y},vr=(t,e)=>{var r=t.isStretchy?sr(t.label):new ze("mo",[Ue(t.label,t.mode)]),n=new ze("mover",[Qe(t.base,e),r]);return n.setAttribute("accent","true"),n},br=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));we({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=Ce(e[0]),n=!br.test(t.funcName),i=!n||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:yr,mathmlBuilder:vr}),we({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return"math"===n&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:yr,mathmlBuilder:vr}),we({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=$e(t.base,e),n=hr(t,e),i="\\utilde"===t.label?.12:0,a=le({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return ne(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=sr(t.label),n=new ze("munder",[Qe(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var xr=t=>{var e=new ze("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};function Tr(t,e){var r=Le(t.body,e,!0);return ne([t.mclass],r,e)}function wr(t,e){var r,n=Xe(t.body,e);return"minner"===t.mclass?r=new ze("mpadded",n):"mord"===t.mclass?t.isCharacterBox?(r=n[0]).type="mi":r=new ze("mi",n):(t.isCharacterBox?(r=n[0]).type="mo":r=new ze("mo",n),"mbin"===t.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===t.mclass||"mclose"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===t.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}we({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),a=se($e(t.body,i,e),e),o="\\x"===t.label.slice(0,2)?"x":"cd";a.classes.push(o+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=se($e(t.below,i,e),e)).classes.push(o+"-arrow-pad"));var s,l=hr(t,e),c=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;if((a.depth>.25||"\\xleftequilibrium"===t.label)&&(h-=a.depth),r){var u=-e.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=le({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:r,shift:u}]})}else s=le({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]}]});return ne(["mrel","x-arrow"],[s],e)},mathmlBuilder(t,e){var r,n=sr(t.label);if(n.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body){var i=xr(Qe(t.body,e));if(t.below){var a=xr(Qe(t.below,e));r=new ze("munderover",[n,a,i])}else r=new ze("mover",[n,i])}else if(t.below){var o=xr(Qe(t.below,e));r=new ze("munder",[n,o])}else r=xr(),r=new ze("mover",[n,r]);return r}}),we({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ee(i),isCharacterBox:u(i)}},htmlBuilder:Tr,mathmlBuilder:wr});var kr=t=>{var e="ordgroup"===t.type&&t.body.length?t.body[0]:t;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family};we({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:kr(e[0]),body:Ee(e[1]),isCharacterBox:u(e[1])}}}),we({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var r,{parser:n,funcName:i}=t,a=e[1],o=e[0];r="\\stackrel"!==i?kr(a):"mrel";var s={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:Ee(a)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===i?null:o,sub:"\\underset"===i?o:null};return{type:"mclass",mode:n.mode,mclass:r,body:[l],isCharacterBox:u(l)}},htmlBuilder:Tr,mathmlBuilder:wr}),we({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:kr(e[0]),body:Ee(e[0])}},htmlBuilder(t,e){var r=Le(t.body,e,!0),n=ne([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=Xe(t.body,e),n=new ze("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Cr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Er=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Sr=t=>"textord"===t.type&&"@"===t.text,_r=(t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e;function Ar(t,e,r){var n=Cr[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:n,mode:"math",family:"rel"},a={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[e[0]],[]),r.callFunction("\\Big",[i],[]),r.callFunction("\\\\cdright",[e[1]],[])]};return r.callFunction("\\\\cdparent",[a],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}we({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=se($e(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=$(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new ze("mrow",[Qe(t.label,e)]);return(r=new ze("mpadded",[r])).setAttribute("width","0"),"left"===t.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new ze("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),we({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=se($e(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(t,e)=>new ze("mrow",[Qe(t.fragment,e)])}),we({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,i=pr(e[0],"ordgroup").body,a="",o=0;o<i.length;o++){a+=pr(i[o],"textord").text}var s,l=parseInt(a);if(isNaN(l))throw new n("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new n("\\@char with invalid code point "+a);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var Rr=(t,e)=>{var r=Le(t.body,e.withColor(t.color),!1);return oe(r)},Lr=(t,e)=>{var r=Xe(t.body,e.withColor(t.color)),n=new ze("mstyle",r);return n.setAttribute("mathcolor",t.color),n};we({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=pr(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:Ee(i)}},htmlBuilder:Rr,mathmlBuilder:Lr}),we({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=pr(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:Rr,mathmlBuilder:Lr}),we({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i="["===n.gullet.future().text?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&pr(i,"size").value}},htmlBuilder(t,e){var r=ne(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=$(O(t.size,e)))),r},mathmlBuilder(t,e){var r=new ze("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",$(O(t.size,e)))),r}});var Ir={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Dr=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new n("Expected a control sequence",t);return e},Nr=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};we({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var i=e.fetch();if(Ir[i.text])return"\\global"!==r&&"\\\\globallong"!==r||(i.text=Ir[i.text]),pr(e.parseFunction(),"internal");throw new n("Invalid token after macro prefix",i)}}),we({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,i=e.gullet.popToken(),a=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new n("Expected a control sequence",i);for(var o,s=0,l=[[]];"{"!==e.gullet.future().text;)if("#"===(i=e.gullet.popToken()).text){if("{"===e.gullet.future().text){o=e.gullet.future(),l[s].push("{");break}if(i=e.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new n('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==s+1)throw new n('Argument number "'+i.text+'" out of order');s++,l.push([])}else{if("EOF"===i.text)throw new n("Expected a macro definition");l[s].push(i.text)}var{tokens:c}=e.gullet.consumeArg();return o&&c.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(c=e.gullet.expandTokens(c)).reverse(),e.gullet.macros.set(a,{tokens:c,numArgs:s,delimiters:l},r===Ir[r]),{type:"internal",mode:e.mode}}}),we({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Dr(e.gullet.popToken());e.gullet.consumeSpaces();var i=(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text&&(e=t.gullet.popToken()),e})(e);return Nr(e,n,i,"\\\\globallet"===r),{type:"internal",mode:e.mode}}}),we({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Dr(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return Nr(e,n,a,"\\\\globalfuture"===r),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var Mr=function(t,e,r){var n=tt(rt.math[t]&&rt.math[t].replace||t,e,r);if(!n)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return n},Or=function(t,e,r,n){var i=r.havingBaseStyle(e),a=ne(n.concat(i.sizingClasses(r)),[t],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},$r=function(t,e,r){var n=e.havingBaseStyle(r),i=(1-e.sizeMultiplier/n.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=$(i),t.height-=i,t.depth+=i},Pr=function(t,e,r,n,i,a){var o=function(t,e,r,n){return Zt(t,"Size"+e+"-Regular",r,n)}(t,e,i,n),s=Or(ne(["delimsizing","size"+e],[o],n),C.TEXT,n,a);return r&&$r(s,n,C.TEXT),s},Br=function(t,e,r){return{type:"elem",elem:ne(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[ne([],[Zt(t,e,r)])])}},Fr=function(t,e,r){var n=Z["Size4-Regular"][t.charCodeAt(0)]?Z["Size4-Regular"][t.charCodeAt(0)][4]:Z["Size1-Regular"][t.charCodeAt(0)][4],i=new H("inner",function(t,e){switch(t){case"⎜":return A("M291 0 H417 V"+e+" H291z");case"∣":return A("M145 0 H188 V"+e+" H145z");case"∥":return A("M145 0 H188 V"+e+" H145z")+A("M367 0 H410 V"+e+" H367z");case"⎟":return A("M457 0 H583 V"+e+" H457z");case"⎢":return A("M319 0 H403 V"+e+" H319z");case"⎥":return A("M263 0 H347 V"+e+" H263z");case"⎪":return A("M384 0 H504 V"+e+" H384z");case"⏐":return A("M312 0 H355 V"+e+" H312z");case"‖":return A("M257 0 H300 V"+e+" H257z")+A("M478 0 H521 V"+e+" H478z");default:return""}}(t,Math.round(1e3*e))),a=new V([i],{width:$(n),height:$(e),style:"width:"+$(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),o=ie([],[a],r);return o.height=e,o.style.height=$(e),o.style.width=$(n),{type:"elem",elem:o}},zr={type:"kern",size:-.008},Kr=new Set(["|","\\lvert","\\rvert","\\vert"]),jr=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),qr=function(t,e,r,n,i,a){var o,s,l,c,h="",u=0;o=l=c=t,s=null;var d="Size1-Regular";"\\uparrow"===t?l=c="⏐":"\\Uparrow"===t?l=c="‖":"\\downarrow"===t?o=l="⏐":"\\Downarrow"===t?o=l="‖":"\\updownarrow"===t?(o="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===t?(o="\\Uparrow",l="‖",c="\\Downarrow"):Kr.has(t)?(l="∣",h="vert",u=333):jr.has(t)?(l="∥",h="doublevert",u=556):"["===t||"\\lbrack"===t?(o="⎡",l="⎢",c="⎣",d="Size4-Regular",h="lbrack",u=667):"]"===t||"\\rbrack"===t?(o="⎤",l="⎥",c="⎦",d="Size4-Regular",h="rbrack",u=667):"\\lfloor"===t||"⌊"===t?(l=o="⎢",c="⎣",d="Size4-Regular",h="lfloor",u=667):"\\lceil"===t||"⌈"===t?(o="⎡",l=c="⎢",d="Size4-Regular",h="lceil",u=667):"\\rfloor"===t||"⌋"===t?(l=o="⎥",c="⎦",d="Size4-Regular",h="rfloor",u=667):"\\rceil"===t||"⌉"===t?(o="⎤",l=c="⎥",d="Size4-Regular",h="rceil",u=667):"("===t||"\\lparen"===t?(o="⎛",l="⎜",c="⎝",d="Size4-Regular",h="lparen",u=875):")"===t||"\\rparen"===t?(o="⎞",l="⎟",c="⎠",d="Size4-Regular",h="rparen",u=875):"\\{"===t||"\\lbrace"===t?(o="⎧",s="⎨",c="⎩",l="⎪",d="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(o="⎫",s="⎬",c="⎭",l="⎪",d="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(o="⎧",c="⎩",l="⎪",d="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(o="⎫",c="⎭",l="⎪",d="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(o="⎧",c="⎭",l="⎪",d="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(o="⎫",c="⎩",l="⎪",d="Size4-Regular");var p=Mr(o,d,i),f=p.height+p.depth,g=Mr(l,d,i),m=g.height+g.depth,y=Mr(c,d,i),v=y.height+y.depth,b=0,x=1;if(null!==s){var T=Mr(s,d,i);b=T.height+T.depth,x=2}var w=f+v+b,k=w+Math.max(0,Math.ceil((e-w)/(x*m)))*x*m,E=n.fontMetrics().axisHeight;r&&(E*=n.sizeMultiplier);var S=k/2-E,_=[];if(h.length>0){var A=k-f-v,R=Math.round(1e3*k),L=function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v1759 v84 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+e+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z\nM367 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v602 h84z\nM403 1759 V0 H319 V1759 v"+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+e+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(e+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(e+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(e+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(e+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(h,Math.round(1e3*A)),I=new H(h,L),D=$(u/1e3),N=$(R/1e3),M=new V([I],{width:D,height:N,viewBox:"0 0 "+u+" "+R}),O=ie([],[M],n);O.height=R/1e3,O.style.width=D,O.style.height=N,_.push({type:"elem",elem:O})}else{if(_.push(Br(c,d,i)),_.push(zr),null===s){var P=k-f-v+.016;_.push(Fr(l,P,n))}else{var B=(k-f-v-b)/2+.016;_.push(Fr(l,B,n)),_.push(zr),_.push(Br(s,d,i)),_.push(zr),_.push(Fr(l,B,n))}_.push(zr),_.push(Br(o,d,i))}var F=n.havingBaseStyle(C.TEXT),z=le({positionType:"bottom",positionData:S,children:_});return Or(ne(["delimsizing","mult"],[z],F),C.TEXT,n,a)},Wr=.08,Ur=function(t,e,r,n,i){var a=function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=function(t,e){return"M95,"+(622+t+e)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+t/2.075+" -"+t+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+t)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize1":n=function(t,e){return"M263,"+(601+t+e)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+t/2.084+" -"+t+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+t)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize2":n=function(t,e){return"M983 "+(10+t+e)+"\nl"+t/3.13+" -"+t+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+t)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize3":n=function(t,e){return"M424,"+(2398+t+e)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+t/4.223+" -"+t+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+t)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+t)+" "+e+"\nh400000v"+(40+t)+"h-400000z"}(e,R);break;case"sqrtSize4":n=function(t,e){return"M473,"+(2713+t+e)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+t/5.298+" -"+t+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+t)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"}(e,R);break;case"sqrtTall":n=function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+"\nH742v"+(r-54-e-t)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+e+"H400000v"+(40+t)+"H742z"}(e,R,r)}return n}(t,n,r),o=new H(t,a),s=new V([o],{width:"400em",height:$(e),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return ie(["hide-tail"],[s],i)},Gr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Yr=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Vr=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Hr=[0,1.2,1.8,2.4,3],Xr=function(t,e,r,i,a){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),Gr.has(t)||Vr.has(t))return Pr(t,e,!1,r,i,a);if(Yr.has(t))return qr(t,Hr[e],!1,r,i,a);throw new n("Illegal delimiter: '"+t+"'")},Zr=[{type:"small",style:C.SCRIPTSCRIPT},{type:"small",style:C.SCRIPT},{type:"small",style:C.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Qr=[{type:"small",style:C.SCRIPTSCRIPT},{type:"small",style:C.SCRIPT},{type:"small",style:C.TEXT},{type:"stack"}],Jr=[{type:"small",style:C.SCRIPTSCRIPT},{type:"small",style:C.SCRIPT},{type:"small",style:C.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],tn=function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";var e=t.type;throw new Error("Add support for delim type '"+e+"' here.")},en=function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i<r.length;i++){var a=r[i];if("stack"===a.type)break;var o=Mr(t,tn(a),"math"),s=o.height+o.depth;if("small"===a.type)s*=n.havingBaseStyle(a.style).sizeMultiplier;if(s>e)return a}return r[r.length-1]},rn=function(t,e,r,n,i,a){var o;"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),o=Vr.has(t)?Zr:Gr.has(t)?Jr:Qr;var s=en(t,e,o,n);return"small"===s.type?function(t,e,r,n,i,a){var o=Zt(t,"Main-Regular",i,n),s=Or(o,e,n,a);return r&&$r(s,n,e),s}(t,s.style,r,n,i,a):"large"===s.type?Pr(t,s.size,r,n,i,a):qr(t,e,r,n,i,a)},nn=function(t,e,r,n,i,a){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,l=Math.max(e-o,r+o),c=Math.max(l/500*901,2*l-s);return rn(t,c,!0,n,i,a)},an={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},on=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function sn(t){return"isMiddle"in t}function ln(t,e){var r=gr(t);if(r&&on.has(r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function cn(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}we({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=ln(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:an[t.funcName].size,mclass:an[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>"."===t.delim?ne([t.mclass]):Xr(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];"."!==t.delim&&e.push(Ue(t.delim,t.mode));var r=new ze("mo",e);"mopen"===t.mclass||"mclose"===t.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=$(Hr[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),we({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:ln(e[0],t).text,color:r}}}),we({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ln(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=pr(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{cn(t);for(var r,n,i=Le(t.body,e,!0,["mopen","mclose"]),a=0,o=0,s=!1,l=0;l<i.length;l++){sn(i[l])?s=!0:(a=Math.max(i[l].height,a),o=Math.max(i[l].depth,o))}if(a*=e.sizeMultiplier,o*=e.sizeMultiplier,r="."===t.left?Oe(e,["mopen"]):nn(t.left,a,o,e,t.mode,["mopen"]),i.unshift(r),s)for(var c=1;c<i.length;c++){var h=i[c];if(sn(h)){var u=h.isMiddle;i[c]=nn(u.delim,a,o,u.options,t.mode,[])}}if("."===t.right)n=Oe(e,["mclose"]);else{var d=t.rightColor?e.withColor(t.rightColor):e;n=nn(t.right,a,o,d,t.mode,["mclose"])}return i.push(n),ne(["minner"],i,e)},mathmlBuilder:(t,e)=>{cn(t);var r=Xe(t.body,e);if("."!==t.left){var n=new ze("mo",[Ue(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==t.right){var i=new ze("mo",[Ue(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return Ge(r)}}),we({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=ln(e[0],t);if(!t.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;return"."===t.delim?r=Oe(e,[]):(r=Xr(t.delim,1,e,t.mode,[])).isMiddle={delim:t.delim,options:e},r},mathmlBuilder:(t,e)=>{var r="\\vert"===t.delim||"|"===t.delim?Ue("|","text"):Ue(t.delim,t.mode),n=new ze("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var hn=(t,e)=>{var r,n,i,a,o=se($e(t.body,e),e),s=t.label.slice(1),l=e.sizeMultiplier,c=u(t.body);if("sout"===s)(r=ne(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/l,n=-.5*e.fontMetrics().xHeight;else if("phase"===s){var h=O({number:.6,unit:"pt"},e),d=O({number:.35,unit:"ex"},e);l/=e.havingBaseSizing().sizeMultiplier;var p=o.height+o.depth+h+d;o.style.paddingLeft=$(p/2+h);var f=Math.floor(1e3*p*l),g="M400000 "+(i=f)+" H0 L"+i/2+" 0 l65 45 L145 "+(i-80)+" H400000z",m=new V([new H("phase",g)],{width:"400em",height:$(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});(r=ie(["hide-tail"],[m],e)).style.height=$(p),n=o.depth+h+d}else{var y,v;/cancel/.test(s)?c||o.classes.push("cancel-pad"):"angl"===s?o.classes.push("anglpad"):o.classes.push("boxpad");var b=0;/box/.test(s)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),v=y=e.fontMetrics().fboxsep+("colorbox"===s?0:b)):"angl"===s?(y=4*(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),v=Math.max(0,.25-o.depth)):v=y=c?.2:0,r=function(t,e,r,n,i){var a,o=t.height+t.depth+r+n;if(/fbox|color|angl/.test(e)){if(a=ne(["stretchy",e],[],i),"fbox"===e){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(e)&&l.push(new X({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&l.push(new X({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new V(l,{width:"100%",height:$(o)});a=ie([],[c],i)}return a.height=o,a.style.height=$(o),a}(o,s,y,v,e),/fbox|boxed|fcolorbox/.test(s)?(r.style.borderStyle="solid",r.style.borderWidth=$(b)):"angl"===s&&.049!==b&&(r.style.borderTopWidth=$(b),r.style.borderRightWidth=$(b)),n=o.depth+v,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor&&(r.style.borderColor=t.borderColor))}if(t.backgroundColor)a=le({positionType:"individualShift",children:[{type:"elem",elem:r,shift:n},{type:"elem",elem:o,shift:0}]});else{var x=/cancel|phase/.test(s)?["svg-align"]:[];a=le({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:n,wrapperClasses:x}]})}return/cancel/.test(s)&&(a.height=o.height,a.depth=o.depth),/cancel/.test(s)&&!c?ne(["mord","cancel-lap"],[a],e):ne(["mord"],[a],e)},un=(t,e)=>{var r,n=new ze(t.label.includes("colorbox")?"mpadded":"menclose",[Qe(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===t.label){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+$(i)+" solid "+t.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};we({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=pr(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:hn,mathmlBuilder:un}),we({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=pr(e[0],"color-token").color,o=pr(e[1],"color-token").color,s=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:hn,mathmlBuilder:un}),we({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}}),we({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:hn,mathmlBuilder:un}),we({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t;"math"===r.mode&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:hn,mathmlBuilder:un}),we({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var dn={};function pn(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,s={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<r.length;++l)dn[r[l]]=s;a&&(xe[e]=a),o&&(Te[e]=o)}var fn={};function gn(t,e){fn[t]=e}class mn{constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new mn(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}}class yn{constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new yn(e,mn.range(this,t))}}function vn(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for("\\relax"===r&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);"\\hline"===r||"\\hdashline"===r;)t.consume(),e.push("\\hdashline"===r),t.consumeSpaces(),r=t.fetch().text;return e}var bn=t=>{if(!t.parser.settings.displayMode)throw new n("{"+t.envName+"} can be used only in display mode.")},xn=new Set(["gather","gather*"]);function Tn(t){if(!t.includes("ed"))return!t.includes("*")}function wn(t,e,r){var{hskipBeforeAndAfter:i,addJot:a,cols:o,arraystretch:s,colSeparationType:l,autoTag:c,singleRow:h,emptySingleRow:u,maxNumCols:d,leqno:p}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!s){var f=t.gullet.expandMacroAsText("\\arraystretch");if(null==f)s=1;else if(!(s=parseFloat(f))||s<0)throw new n("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var g=[],m=[g],y=[],v=[],b=null!=c?[]:void 0;function x(){c&&t.gullet.macros.set("\\@eqnsw","1",!0)}function T(){b&&(t.gullet.macros.get("\\df@tag")?(b.push(t.subparse([new yn("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(c)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(x(),v.push(vn(t));;){var w=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup();var k={type:"ordgroup",mode:t.mode,body:w};r&&(k={type:"styling",mode:t.mode,style:r,resetFont:!0,body:[k]}),g.push(k);var C=t.fetch().text;if("&"===C){if(d&&g.length===d){if(h||l)throw new n("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===C){T(),1===g.length&&"styling"===k.type&&1===k.body.length&&"ordgroup"===k.body[0].type&&0===k.body[0].body.length&&(m.length>1||!u)&&m.pop(),v.length<m.length+1&&v.push([]);break}if("\\\\"!==C)throw new n("Expected & or \\\\ or \\cr or \\end",t.nextToken);t.consume();var E=void 0;" "!==t.gullet.future().text&&(E=t.parseSizeGroup(!0)),y.push(E?E.value:null),T(),v.push(vn(t)),g=[],m.push(g),x()}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:a,arraystretch:s,body:m,cols:o,rowGaps:y,hskipBeforeAndAfter:i,hLinesBeforeRow:v,colSeparationType:l,tags:b,leqno:p}}function kn(t){return"d"===t.slice(0,1)?"display":"text"}var Cn=function(t,e){var r,i,a=t.body.length,o=t.hLinesBeforeRow,s=0,l=new Array(a),c=[],h=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),u=1/e.fontMetrics().ptPerEm,d=5*u;t.colSeparationType&&"small"===t.colSeparationType&&(d=e.havingStyle(C.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778);var p="CD"===t.colSeparationType?O({number:3,unit:"ex"},e):12*u,f=3*u,g=t.arraystretch*p,m=.7*g,y=.3*g,v=0;function b(t){for(var e=0;e<t.length;++e)e>0&&(v+=.25),c.push({pos:v,isDashed:t[e]})}for(b(o[0]),r=0;r<t.body.length;++r){var x=t.body[r],T=m,w=y;s<x.length&&(s=x.length);var k={cells:new Array(x.length),height:0,depth:0,pos:0};for(i=0;i<x.length;++i){var E=$e(x[i],e);w<E.depth&&(w=E.depth),T<E.height&&(T=E.height),k.cells[i]=E}var S=t.rowGaps[r],_=0;S&&(_=O(S,e))>0&&(w<(_+=y)&&(w=_),_=0),t.addJot&&r<t.body.length-1&&(w+=f),k.height=T,k.depth=w,v+=T,k.pos=v,v+=w+_,l[r]=k,b(o[r+1])}var A,R,L=v/2+e.fontMetrics().axisHeight,I=t.cols||[],D=[],N=[];if(t.tags&&t.tags.some(t=>t))for(r=0;r<a;++r){var M=l[r],P=M.pos-L,B=t.tags[r],F=void 0;(F=!0===B?ne(["eqn-num"],[],e):ne([],!1===B?[]:Le(B,e,!0),e)).depth=M.depth,F.height=M.height,N.push({type:"elem",elem:F,shift:P})}for(i=0,R=0;i<s||R<I.length;++i,++R){for(var z,K=I[R],j=!0;"separator"===(null==(q=K)?void 0:q.type);){var q;if(j||((A=ne(["arraycolsep"],[])).style.width=$(e.fontMetrics().doubleRuleSep),D.push(A)),"|"!==K.separator&&":"!==K.separator)throw new n("Invalid separator type: "+K.separator);var W="|"===K.separator?"solid":"dashed",U=ne(["vertical-separator"],[],e);U.style.height=$(v),U.style.borderRightWidth=$(h),U.style.borderRightStyle=W,U.style.margin="0 "+$(-h/2);var G=v-L;G&&(U.style.verticalAlign=$(-G)),D.push(U),K=I[++R],j=!1}if(!(i>=s)){var Y,V,H=void 0;if(i>0||t.hskipBeforeAndAfter)0!==(H=null!=(Y=null==(V=K)?void 0:V.pregap)?Y:d)&&((A=ne(["arraycolsep"],[])).style.width=$(H),D.push(A));var X=[];for(r=0;r<a;++r){var Z=l[r],Q=Z.cells[i];if(Q){var J=Z.pos-L;Q.depth=Z.depth,Q.height=Z.height,X.push({type:"elem",elem:Q,shift:J})}}var tt,et,rt=le({positionType:"individualShift",children:X}),nt=ne(["col-align-"+((null==(z=K)?void 0:z.align)||"c")],[rt]);if(D.push(nt),i<s-1||t.hskipBeforeAndAfter)0!==(H=null!=(tt=null==(et=K)?void 0:et.postgap)?tt:d)&&((A=ne(["arraycolsep"],[])).style.width=$(H),D.push(A))}}var it=ne(["mtable"],D);if(c.length>0){for(var at=ae("hline",e,h),ot=ae("hdashline",e,h),st=[{type:"elem",elem:it,shift:0}];c.length>0;){var lt=c.pop(),ct=lt.pos-L;lt.isDashed?st.push({type:"elem",elem:ot,shift:ct}):st.push({type:"elem",elem:at,shift:ct})}it=le({positionType:"individualShift",children:st})}if(0===N.length)return ne(["mord"],[it],e);var ht=le({positionType:"individualShift",children:N}),ut=ne(["tag"],[ht],e);return oe([it,ut])},En={c:"center ",l:"left ",r:"right "},Sn=function(t,e){for(var r=[],n=new ze("mtd",[],["mtr-glue"]),i=new ze("mtd",[],["mml-eqn-num"]),a=0;a<t.body.length;a++){for(var o=t.body[a],s=[],l=0;l<o.length;l++)s.push(new ze("mtd",[Qe(o[l],e)]));t.tags&&t.tags[a]&&(s.unshift(n),s.push(n),t.leqno?s.unshift(i):s.push(i)),r.push(new ze("mtr",s))}var c=new ze("mtable",r),h=.5===t.arraystretch?.1:.16+t.arraystretch-1+(t.addJot?.09:0);c.setAttribute("rowspacing",$(h));var u="",d="";if(t.cols&&t.cols.length>0){var p=t.cols,f="",g=!1,m=0,y=p.length;"separator"===p[0].type&&(u+="top ",m=1),"separator"===p[p.length-1].type&&(u+="bottom ",y-=1);for(var v=m;v<y;v++){var b=p[v];"align"===b.type?(d+=En[b.align],g&&(f+="none "),g=!0):"separator"===b.type&&g&&(f+="|"===b.separator?"solid ":"dashed ",g=!1)}c.setAttribute("columnalign",d.trim()),/[sd]/.test(f)&&c.setAttribute("columnlines",f.trim())}if("align"===t.colSeparationType){for(var x=t.cols||[],T="",w=1;w<x.length;w++)T+=w%2?"0em ":"1em ";c.setAttribute("columnspacing",T.trim())}else"alignat"===t.colSeparationType||"gather"===t.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===t.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===t.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",C=t.hLinesBeforeRow;u+=C[0].length>0?"left ":"",u+=C[C.length-1].length>0?"right ":"";for(var E=1;E<C.length-1;E++)k+=0===C[E].length?"none ":C[E][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==u&&(c=new ze("menclose",[c])).setAttribute("notation",u.trim()),t.arraystretch&&t.arraystretch<1&&(c=new ze("mstyle",[c])).setAttribute("scriptlevel","1"),c},_n=function(t,e){t.envName.includes("ed")||bn(t);var r=[],i=t.envName.includes("at")?"alignat":"align",a="split"===t.envName,o=wn(t.parser,{cols:r,addJot:!0,autoTag:a?void 0:Tn(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),s=0,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&"ordgroup"===e[0].type){for(var h="",u=0;u<e[0].body.length;u++){h+=pr(e[0].body[u],"textord").text}s=Number(h),l=2*s}var d=!l;o.body.forEach(function(t){for(var e=1;e<t.length;e+=2){var r=pr(t[e],"styling");pr(r.body[0],"ordgroup").body.unshift(c)}if(d)l<t.length&&(l=t.length);else{var i=t.length/2;if(s<i)throw new n("Too many math in a row: expected "+s+", but got "+i,t[0])}});for(var p=0;p<l;++p){var f="r",g=0;p%2==1?f="l":p>0&&d&&(g=1),r[p]={type:"align",align:f,pregap:g,postgap:0}}return o.colSeparationType=d?"align":"alignat",o};pn({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=(gr(e[0])?[e[0]]:pr(e[0],"ordgroup").body).map(function(t){var e=fr(t).text;if("lcr".includes(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+e,t)}),i={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return wn(t.parser,i,kn(t.envName))},htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===t.envName.charAt(t.envName.length-1)){var a=t.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,!"lcr".includes(r))throw new n("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),i.cols=[{type:"align",align:r}]}}var o=wn(t.parser,i,kn(t.envName)),s=Math.max(0,...o.body.map(t=>t.length));return o.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[o],left:e[0],right:e[1],rightColor:void 0}:o},htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e=wn(t.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=(gr(e[0])?[e[0]]:pr(e[0],"ordgroup").body).map(function(t){var e=fr(t).text;if("lc".includes(e))return{type:"align",align:e};throw new n("Unknown column alignment: "+e,t)});if(r.length>1)throw new n("{subarray} can contain only one column");var i={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},a=wn(t.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new n("{subarray} can contain only one column");return a},htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=wn(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},kn(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:_n,htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){xn.has(t.envName)&&bn(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Tn(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return wn(t.parser,e,"display")},htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:_n,htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){bn(t);var e={autoTag:Tn(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return wn(t.parser,e,"display")},htmlBuilder:Cn,mathmlBuilder:Sn}),pn({type:"array",names:["CD"],props:{numArgs:0},handler:t=>(bn(t),function(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===e[e.length-1].length&&e.pop();break}throw new n("Expected \\\\ or \\cr or \\end",t.nextToken)}t.consume()}for(var i=[],a=[i],o=0;o<e.length;o++){for(var s=e[o],l=Er(),c=0;c<s.length;c++)if(Sr(s[c])){i.push(l);var h=fr(s[c+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(h));else{if(!"<>AV".includes(h))throw new n('Expected one of "<>AV=|." after @',s[c]);for(var d=0;d<2;d++){for(var p=!0,f=c+1;f<s.length;f++){if(_r(s[f],h)){p=!1,c=f;break}if(Sr(s[f]))throw new n("Missing a "+h+" character to complete a CD arrow.",s[f]);u[d].body.push(s[f])}if(p)throw new n("Missing a "+h+" character to complete a CD arrow.",s[c])}}var g={type:"styling",body:[Ar(h,u,t)],mode:"math",style:"display",resetFont:!0};i.push(g),l=Er()}else l.body.push(s[c]);o%2==0?i.push(l):i.shift(),i=[],a.push(i)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}(t.parser)),htmlBuilder:Cn,mathmlBuilder:Sn}),gn("\\nonumber","\\gdef\\@eqnsw{0}"),gn("\\notag","\\nonumber"),we({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new n(t.funcName+" valid only within array environment")}});var An=dn;we({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:i}=t,a=e[0];if("ordgroup"!==a.type)throw new n("Invalid environment name",a);for(var o="",s=0;s<a.body.length;++s)o+=pr(a.body[s],"textord").text;if("\\begin"===i){if(!An.hasOwnProperty(o))throw new n("No such environment: "+o,a);var l=An[o],{args:c,optArgs:h}=r.parseArguments("\\begin{"+o+"}",l),u={mode:r.mode,envName:o,parser:r},d=l.handler(u,c,h);r.expect("\\end",!1);var p=r.nextToken,f=pr(r.parseFunction(),"environment");if(f.name!==o)throw new n("Mismatch: \\begin{"+o+"} matched by \\end{"+f.name+"}",p);return d}return{type:"environment",mode:r.mode,name:o,nameGroup:a}}});var Rn=(t,e)=>{var r=t.font,n=e.withFont(r);return $e(t.body,n)},Ln=(t,e)=>{var r=t.font,n=e.withFont(r);return Qe(t.body,n)},In={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};we({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=Ce(e[0]),a=n;return a in In&&(a=In[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:Rn,mathmlBuilder:Ln}),we({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"mclass",mode:r.mode,mclass:kr(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:u(n)}}}),we({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,o=r.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Rn,mathmlBuilder:Ln});var Dn=(t,e)=>e?{type:"styling",mode:t.mode,style:e,body:[t]}:t;we({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var r,{parser:n,funcName:i}=t,a=e[0],o=e[1],s=null,l=null;switch(i){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var c="\\cfrac"===i,h=null;return c||i.startsWith("\\d")?h="display":i.startsWith("\\t")&&(h="text"),Dn({type:"genfrac",mode:n.mode,numer:a,denom:o,continued:c,hasBarLine:r,leftDelim:s,rightDelim:l,barSize:null},h)},htmlBuilder:(t,e)=>{var r,n=e.style,i=n.fracNum(),a=n.fracDen();r=e.havingStyle(i);var o=$e(t.numer,r,e);if(t.continued){var s=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}r=e.havingStyle(a);var c,h,u,d,p,f,g,m,y,v,b=$e(t.denom,r,e);if(t.hasBarLine?(t.barSize?(h=O(t.barSize,e),c=ae("frac-line",e,h)):c=ae("frac-line",e),h=c.height,u=c.height):(c=null,h=0,u=e.fontMetrics().defaultRuleThickness),n.size===C.DISPLAY.size?(d=e.fontMetrics().num1,p=h>0?3*u:7*u,f=e.fontMetrics().denom1):(h>0?(d=e.fontMetrics().num2,p=u):(d=e.fontMetrics().num3,p=3*u),f=e.fontMetrics().denom2),c){var x=e.fontMetrics().axisHeight;d-o.depth-(x+.5*h)<p&&(d+=p-(d-o.depth-(x+.5*h))),x-.5*h-(b.height-f)<p&&(f+=p-(x-.5*h-(b.height-f))),g=le({positionType:"individualShift",children:[{type:"elem",elem:b,shift:f},{type:"elem",elem:c,shift:-(x-.5*h)},{type:"elem",elem:o,shift:-d}]})}else{var T=d-o.depth-(b.height-f);T<p&&(d+=.5*(p-T),f+=.5*(p-T)),g=le({positionType:"individualShift",children:[{type:"elem",elem:b,shift:f},{type:"elem",elem:o,shift:-d}]})}return r=e.havingStyle(n),g.height*=r.sizeMultiplier/e.sizeMultiplier,g.depth*=r.sizeMultiplier/e.sizeMultiplier,m=n.size===C.DISPLAY.size?e.fontMetrics().delim1:n.size===C.SCRIPTSCRIPT.size?e.havingStyle(C.SCRIPT).fontMetrics().delim2:e.fontMetrics().delim2,y=null==t.leftDelim?Oe(e,["mopen"]):rn(t.leftDelim,m,!0,e.havingStyle(n),t.mode,["mopen"]),v=t.continued?ne([]):null==t.rightDelim?Oe(e,["mclose"]):rn(t.rightDelim,m,!0,e.havingStyle(n),t.mode,["mclose"]),ne(["mord"].concat(r.sizingClasses(e)),[y,ne(["mfrac"],[g]),v],e)},mathmlBuilder:(t,e)=>{var r=new ze("mfrac",[Qe(t.numer,e),Qe(t.denom,e)]);if(t.hasBarLine){if(t.barSize){var n=O(t.barSize,e);r.setAttribute("linethickness",$(n))}}else r.setAttribute("linethickness","0px");if(null!=t.leftDelim||null!=t.rightDelim){var i=[];if(null!=t.leftDelim){var a=new ze("mo",[new Ke(t.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(r),null!=t.rightDelim){var o=new ze("mo",[new Ke(t.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),i.push(o)}return Ge(i)}return r}}),we({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:r,funcName:n,token:i}=t;switch(n){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:e,token:i}}});var Nn=["display","text","script","scriptscript"],Mn=function(t){var e=null;return t.length>0&&(e="."===(e=t)?null:e),e};we({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var r,{parser:n}=t,i=e[4],a=e[5],o=Ce(e[0]),s="atom"===o.type&&"open"===o.family?Mn(o.text):null,l=Ce(e[1]),c="atom"===l.type&&"close"===l.family?Mn(l.text):null,h=pr(e[2],"size"),u=null;r=!!h.isBlank||(u=h.value).number>0;var d=null,p=e[3];if("ordgroup"===p.type){if(p.body.length>0){var f=pr(p.body[0],"textord");d=Nn[Number(f.text)]}}else p=pr(p,"textord"),d=Nn[Number(p.text)];return Dn({type:"genfrac",mode:n.mode,numer:i,denom:a,continued:!1,hasBarLine:r,barSize:u,leftDelim:s,rightDelim:c},d)}}),we({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:pr(e[0],"size").value,token:i}}}),we({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=pr(e[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var o=e[2],s=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var On=(t,e)=>{var r,n,i=e.style;"supsub"===t.type?(r=t.sup?$e(t.sup,e.havingStyle(i.sup()),e):$e(t.sub,e.havingStyle(i.sub()),e),n=pr(t.base,"horizBrace")):n=pr(t,"horizBrace");var a,o=$e(n.base,e.havingBaseStyle(C.DISPLAY)),s=hr(n,e);if(a=n.isOver?le({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):le({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),r){var l=ne(["minner",n.isOver?"mover":"munder"],[a],e);a=n.isOver?le({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):le({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return ne(["minner",n.isOver?"mover":"munder"],[a],e)};we({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:e[0]}},htmlBuilder:On,mathmlBuilder:(t,e)=>{var r=sr(t.label);return new ze(t.isOver?"mover":"munder",[Qe(t.base,e),r])}}),we({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=pr(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:Ee(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=Le(t.body,e,!1);return function(t,e,r,n){var i=new W(t,e,r,n);return re(i),i}(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Ze(t.body,e);return r instanceof ze||(r=new ze("mrow",[r])),r.setAttribute("href",t.href),r}}),we({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=pr(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var o=n[a];"~"===o&&(o="\\textasciitilde"),i.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:Ee(s)}}}),we({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:Ee(e[0])}},htmlBuilder(t,e){var r=Le(t.body,e.withFont(""),!1);return oe(r)},mathmlBuilder:(t,e)=>new ze("mrow",Xe(t.body,e.withFont("")))}),we({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var r,{parser:i,funcName:a,token:o}=t,s=pr(e[0],"raw").string,l=e[1];i.settings.strict&&i.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c={};switch(a){case"\\htmlClass":c.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var h=s.split(","),u=0;u<h.length;u++){var d=h[u],p=d.indexOf("=");if(p<0)throw new n("\\htmlData key/value '"+d+"' missing equals sign");var f=d.slice(0,p),g=d.slice(p+1);c["data-"+f.trim()]=g}r={command:"\\htmlData",attributes:c};break;default:throw new Error("Unrecognized html command")}return i.settings.isTrusted(r)?{type:"html",mode:i.mode,attributes:c,body:Ee(l)}:i.formatUnsupportedCmd(a)},htmlBuilder:(t,e)=>{var r=Le(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=ne(n,r,e);for(var a in t.attributes)"class"!==a&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>Ze(t.body,e)}),we({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:Ee(e[0]),mathml:Ee(e[1])}},htmlBuilder:(t,e)=>{var r=Le(t.html,e,!1);return oe(r)},mathmlBuilder:(t,e)=>Ze(t.mathml,e)});var $n=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new n("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(e[1]+e[2]),unit:e[3]};if(!M(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};we({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:i}=t,a={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var c=pr(r[0],"raw").string.split(","),h=0;h<c.length;h++){var u=c[h].split("=");if(2===u.length){var d=u[1].trim();switch(u[0].trim()){case"alt":l=d;break;case"width":a=$n(d);break;case"height":o=$n(d);break;case"totalheight":s=$n(d);break;default:throw new n("Invalid key: '"+u[0]+"' in \\includegraphics.")}}}var p=pr(e[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),i.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:i.mode,alt:l,width:a,height:o,totalheight:s,src:p}:i.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var r=O(t.height,e),n=0;t.totalheight.number>0&&(n=O(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=O(t.width,e));var a={height:$(r+n)};i>0&&(a.width=$(i)),n>0&&(a.verticalAlign=$(-n));var o=new U(t.src,t.alt,a);return o.height=r,o.depth=n,o},mathmlBuilder:(t,e)=>{var r=new ze("mglyph",[]);r.setAttribute("alt",t.alt);var n=O(t.height,e),i=0;if(t.totalheight.number>0&&(i=O(t.totalheight,e)-n,r.setAttribute("valign",$(-i))),r.setAttribute("height",$(n+i)),t.width.number>0){var a=O(t.width,e);r.setAttribute("width",$(a))}return r.setAttribute("src",t.src),r}}),we({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=pr(e[0],"size");if(r.settings.strict){var a="m"===n[1],o="mu"===i.value.unit;a?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+i.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder:(t,e)=>ce(t.dimension,e),mathmlBuilder(t,e){var r=O(t.dimension,e);return new je(r)}}),we({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;"clap"===t.alignment?(r=ne([],[$e(t.body,e)]),r=ne(["inner"],[r],e)):r=ne(["inner"],[$e(t.body,e)]);var n=ne(["fix"],[]),i=ne([t.alignment],[r,n],e),a=ne(["strut"]);return a.style.height=$(i.height+i.depth),i.depth&&(a.style.verticalAlign=$(-i.depth)),i.children.unshift(a),i=ne(["thinbox"],[i],e),ne(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new ze("mpadded",[Qe(t.body,e)]);if("rlap"!==t.alignment){var n="llap"===t.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),we({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a="\\("===r?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:o}}}),we({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new n("Mismatched "+t.funcName)}});var Pn=(t,e)=>{switch(e.style.size){case C.DISPLAY.size:return t.display;case C.TEXT.size:return t.text;case C.SCRIPT.size:return t.script;case C.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};we({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:Ee(e[0]),text:Ee(e[1]),script:Ee(e[2]),scriptscript:Ee(e[3])}},htmlBuilder:(t,e)=>{var r=Pn(t,e),n=Le(r,e,!1);return oe(n)},mathmlBuilder:(t,e)=>{var r=Pn(t,e);return Ze(r,e)}});var Bn=(t,e,r,n,i,a,o)=>{t=ne([],[t]);var s,l,c,h=r&&u(r);if(e){var d=$e(e,n.havingStyle(i.sup()),n);l={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var p=$e(r,n.havingStyle(i.sub()),n);s={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(l&&s){var f=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+t.depth+o;c=le({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:$(-a)},{type:"kern",size:s.kern},{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:$(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(s){var g=t.height-o;c=le({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:$(-a)},{type:"kern",size:s.kern},{type:"elem",elem:t}]})}else{if(!l)return t;var m=t.depth+o;c=le({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:$(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}var y=[c];if(s&&0!==a&&!h){var v=ne(["mspace"],[],n);v.style.marginRight=$(a),y.unshift(v)}return ne(["mop","op-limits"],y,n)},Fn=new Set(["\\smallint"]),zn=(t,e)=>{var r,n,i,a=!1;"supsub"===t.type?(r=t.sup,n=t.sub,i=pr(t.base,"op"),a=!0):i=pr(t,"op");var o,s,l=e.style,c=!1;if(l.size===C.DISPLAY.size&&i.symbol&&!Fn.has(i.name)&&(c=!0),i.symbol){var h=c?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(u=i.name.slice(1),i.name="oiint"===u?"\\iint":"\\iiint"),s=(o=Zt(i.name,h,"math",e,["mop","op-symbol",c?"large-op":"small-op"])).italic,u.length>0){var d=pe(u+"Size"+(c?"2":"1"),e);o=le({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:d,shift:c?.08:0}]}),i.name="\\"+u,o.classes.unshift("mop"),o.italic=s}}else if(i.body){var p=Le(i.body,e,!0);1===p.length&&p[0]instanceof Y?(o=p[0]).classes[0]="mop":o=ne(["mop"],p,e)}else{for(var f=[],g=1;g<i.name.length;g++)f.push(Qt(i.name[g],i.mode,e));o=ne(["mop"],f,e)}var m,y=0,v=0;(o instanceof Y||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(y=(o.height-o.depth)/2-e.fontMetrics().axisHeight,v=null!=(m=o.italic)?m:0);return a?Bn(o,r,n,e,l,v,y):(y&&(o.style.position="relative",o.style.top=$(y)),o)},Kn=(t,e)=>{var r;if(t.symbol)r=new ze("mo",[Ue(t.name,t.mode)]),Fn.has(t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new ze("mo",Xe(t.body,e));else{r=new ze("mi",[new Ke(t.name.slice(1))]);var n=new ze("mo",[Ue("","text")]);r=t.parentIsSupSub?new ze("mrow",[r,n]):Fe([r,n])}return r},jn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};we({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return 1===i.length&&(i=jn[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:zn,mathmlBuilder:Kn}),we({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ee(n)}},htmlBuilder:zn,mathmlBuilder:Kn});var qn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};we({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:zn,mathmlBuilder:Kn}),we({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:zn,mathmlBuilder:Kn}),we({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:r}=t,n=r;return 1===n.length&&(n=qn[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:zn,mathmlBuilder:Kn});var Wn=(t,e)=>{var r,n,i,a,o=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=pr(t.base,"operatorname"),o=!0):i=pr(t,"operatorname"),i.body.length>0){for(var s=(i.body.map(t=>{var e="text"in t?t.text:void 0;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t})),l=Le(s,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var h=l[c];h instanceof Y&&(h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=ne(["mop"],l,e)}else a=ne(["mop"],[],e);return o?Bn(a,r,n,e,e.style,0,0):a};function Un(t,e,r){for(var n=Le(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var o=n[a].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[o+1]==="reset-size"+e.size&&(n[a].classes[o+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return oe(n)}we({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:Ee(i),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:Wn,mathmlBuilder:(t,e)=>{for(var r=Xe(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(a instanceof je);else if(a instanceof ze)switch(a.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":var o=a.children[0];1===a.children.length&&o instanceof Ke?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var s=r.map(t=>t.toText()).join("");r=[new Ke(s)]}var l=new ze("mi",r);l.setAttribute("mathvariant","normal");var c=new ze("mo",[Ue("","text")]);return t.parentIsSupSub?new ze("mrow",[l,c]):Fe([l,c])}}),gn("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),ke({type:"ordgroup",htmlBuilder:(t,e)=>t.semisimple?oe(Le(t.body,e,!1)):ne(["mord"],Le(t.body,e,!0),e),mathmlBuilder:(t,e)=>Ze(t.body,e,!0)}),we({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=$e(t.body,e.havingCrampedStyle()),n=ae("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=le({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return ne(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new ze("mo",[new Ke("‾")]);r.setAttribute("stretchy","true");var n=new ze("mover",[Qe(t.body,e),r]);return n.setAttribute("accent","true"),n}}),we({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:Ee(n)}},htmlBuilder:(t,e)=>{var r=Le(t.body,e.withPhantom(),!1);return oe(r)},mathmlBuilder:(t,e)=>{var r=Xe(t.body,e);return new ze("mphantom",r)}}),gn("\\hphantom","\\smash{\\phantom{#1}}"),we({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=ne(["inner"],[$e(t.body,e.withPhantom())]),n=ne(["fix"],[]);return ne(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=Xe(Ee(t.body),e),n=new ze("mphantom",r),i=new ze("mpadded",[n]);return i.setAttribute("width","0px"),i}}),we({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=pr(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=$e(t.body,e),n=O(t.dy,e);return le({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new ze("mpadded",[Qe(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}}),we({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}}),we({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=pr(e[0],"size"),o=pr(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&pr(i,"size").value,width:a.value,height:o.value}},htmlBuilder(t,e){var r=ne(["mord","rule"],[],e),n=O(t.width,e),i=O(t.height,e),a=t.shift?O(t.shift,e):0;return r.style.borderRightWidth=$(n),r.style.borderTopWidth=$(i),r.style.bottom=$(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=O(t.width,e),n=O(t.height,e),i=t.shift?O(t.shift,e):0,a=e.color&&e.getColor()||"black",o=new ze("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",$(r)),o.setAttribute("height",$(n));var s=new ze("mpadded",[o]);return i>=0?s.setAttribute("height",$(i)):(s.setAttribute("height",$(i)),s.setAttribute("depth",$(-i))),s.setAttribute("voffset",$(i)),s}});var Gn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];we({type:"sizing",names:Gn,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:Gn.indexOf(n)+1,body:a}},htmlBuilder:(t,e)=>{var r=e.havingSize(t.size);return Un(t.body,r,e)},mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=Xe(t.body,r),i=new ze("mstyle",n);return i.setAttribute("mathsize",$(r.sizeMultiplier)),i}}),we({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,o=r[0]&&pr(r[0],"ordgroup");if(o)for(var s,l=0;l<o.body.length;++l){if("t"===(s=fr(o.body[l]).text))i=!0;else{if("b"!==s){i=!1,a=!1;break}a=!0}}else i=!0,a=!0;var c=e[0];return{type:"smash",mode:n.mode,body:c,smashHeight:i,smashDepth:a}},htmlBuilder:(t,e)=>{var r=ne([],[$e(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0),t.smashDepth&&(r.depth=0),t.smashHeight&&t.smashDepth)return ne(["mord","smash"],[r],e);if(r.children)for(var n=0;n<r.children.length;n++)t.smashHeight&&(r.children[n].height=0),t.smashDepth&&(r.children[n].depth=0);var i=le({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return ne(["mord"],[i],e)},mathmlBuilder:(t,e)=>{var r=new ze("mpadded",[Qe(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}}),we({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=$e(t.body,e.havingCrampedStyle());0===r.height&&(r.height=e.fontMetrics().xHeight),r=se(r,e);var n=e.fontMetrics().defaultRuleThickness,i=n;e.style.id<C.TEXT.id&&(i=e.fontMetrics().xHeight);var a=n+i/4,o=r.height+r.depth+a+n,{span:s,ruleWidth:l,advanceWidth:c}=function(t,e){var r,n,i,a,o,s=e.havingBaseSizing(),l=en("\\surd",t*s.sizeMultiplier,Jr,s),c=s.sizeMultiplier,h=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness);return"small"===l.type?(t<1?c=1:t<1.4&&(c=.7),i=(1+h)/c,(r=Ur("sqrtMain",n=(1+h+Wr)/c,a=1e3+1e3*h+80,h,e)).style.minWidth="0.853em",o=.833/c):"large"===l.type?(a=1080*Hr[l.size],i=(Hr[l.size]+h)/c,n=(Hr[l.size]+h+Wr)/c,(r=Ur("sqrtSize"+l.size,n,a,h,e)).style.minWidth="1.02em",o=1/c):(n=t+h+Wr,i=t+h,a=Math.floor(1e3*t+h)+80,(r=Ur("sqrtTall",n,a,h,e)).style.minWidth="0.742em",o=1.056),r.height=i,r.style.height=$(n),{span:r,advanceWidth:o,ruleWidth:(e.fontMetrics().sqrtRuleThickness+h)*c}}(o,e),h=s.height-l;h>r.height+r.depth+a&&(a=(a+h-r.height-r.depth)/2);var u=s.height-r.height-a-l;r.style.paddingLeft=$(c);var d=le({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:s},{type:"kern",size:l}]});if(t.index){var p=e.havingStyle(C.SCRIPTSCRIPT),f=$e(t.index,p,e),g=.6*(d.height-d.depth),m=le({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]}),y=ne(["root"],[m]);return ne(["mord","sqrt"],[y,d],e)}return ne(["mord","sqrt"],[d],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new ze("mroot",[Qe(r,e),Qe(n,e)]):new ze("msqrt",[Qe(r,e)])}});var Yn={display:C.DISPLAY,text:C.TEXT,script:C.SCRIPT,scriptscript:C.SCRIPTSCRIPT};we({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),o=n.slice(1,n.length-5);if(!(o in Yn))throw new Error("Unknown style: "+o);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(t,e){var r=Yn[t.style],n=e.havingStyle(r);return t.resetFont&&(n=n.withFont("")),Un(t.body,n,e)},mathmlBuilder(t,e){var r=Yn[t.style],n=e.havingStyle(r);t.resetFont&&(n=n.withFont(""));var i=Xe(t.body,n),a=new ze("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});ke({type:"supsub",htmlBuilder(t,e){var r=function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===C.DISPLAY.size||r.alwaysHandleSupSub)?zn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===C.DISPLAY.size||r.limits)?Wn:null:"accent"===r.type?u(r.base)?yr:null:"horizBrace"===r.type&&!t.sub===r.isOver?On:null:null}(t,e);if(r)return r(t,e);var n,i,a,{base:o,sup:s,sub:l}=t,c=$e(o,e),h=e.fontMetrics(),d=0,p=0,f=o&&u(o);if(s){var g=e.havingStyle(e.style.sup());n=$e(s,g,e),f||(d=c.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(l){var m=e.havingStyle(e.style.sub());i=$e(l,m,e),f||(p=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}a=e.style===C.DISPLAY?h.sup1:e.style.cramped?h.sup3:h.sup2;var y,v=e.sizeMultiplier,b=$(.5/h.ptPerEm/v),x=null;if(i){var T,w=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name);if(c instanceof Y||w)x=$(-(null!=(T=c.italic)?T:0))}if(n&&i){d=Math.max(d,a,n.depth+.25*h.xHeight),p=Math.max(p,h.sub2);var k=4*h.defaultRuleThickness;if(d-n.depth-(i.height-p)<k){p=k-(d-n.depth)+i.height;var E=.8*h.xHeight-(d-n.depth);E>0&&(d+=E,p-=E)}y=le({positionType:"individualShift",children:[{type:"elem",elem:i,shift:p,marginRight:b,marginLeft:x},{type:"elem",elem:n,shift:-d,marginRight:b}]})}else if(i){p=Math.max(p,h.sub1,i.height-.8*h.xHeight),y=le({positionType:"shift",positionData:p,children:[{type:"elem",elem:i,marginLeft:x,marginRight:b}]})}else{if(!n)throw new Error("supsub must have either sup or sub.");d=Math.max(d,a,n.depth+.25*h.xHeight),y=le({positionType:"shift",positionData:-d,children:[{type:"elem",elem:n,marginRight:b}]})}var S=Me(c,"right")||"mord";return ne([S],[c,ne(["msupsub"],[y])],e)},mathmlBuilder(t,e){var r,n=!1;t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(n=!0,r=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0);var i,a=[Qe(t.base,e)];if(t.sub&&a.push(Qe(t.sub,e)),t.sup&&a.push(Qe(t.sup,e)),n)i=r?"mover":"munder";else if(t.sub)if(t.sup){var o=t.base;i=o&&"op"===o.type&&o.limits&&e.style===C.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(e.style===C.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=t.base;i=s&&"op"===s.type&&s.limits&&(e.style===C.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||e.style===C.DISPLAY)?"munder":"msub"}else{var l=t.base;i=l&&"op"===l.type&&l.limits&&(e.style===C.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||e.style===C.DISPLAY)?"mover":"msup"}return new ze(i,a)}}),ke({type:"atom",htmlBuilder:(t,e)=>Qt(t.text,t.mode,e,["m"+t.family]),mathmlBuilder(t,e){var r=new ze("mo",[Ue(t.text,t.mode)]);if("bin"===t.family){var n=Ve(t,e);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===t.family?r.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||r.setAttribute("stretchy","false");return r}});var Vn={mi:"italic",mn:"normal",mtext:"normal"};ke({type:"mathord",htmlBuilder:(t,e)=>Jt(t,e,"mathord"),mathmlBuilder(t,e){var r=new ze("mi",[Ue(t.text,t.mode,e)]),n=Ve(t,e)||"italic";return n!==Vn[r.type]&&r.setAttribute("mathvariant",n),r}}),ke({type:"textord",htmlBuilder:(t,e)=>Jt(t,e,"textord"),mathmlBuilder(t,e){var r,n=Ue(t.text,t.mode,e),i=Ve(t,e)||"normal";return r="text"===t.mode?new ze("mtext",[n]):/[0-9]/.test(t.text)?new ze("mn",[n]):"\\prime"===t.text?new ze("mo",[n]):new ze("mi",[n]),i!==Vn[r.type]&&r.setAttribute("mathvariant",i),r}});var Hn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Xn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ke({type:"spacing",htmlBuilder(t,e){if(Xn.hasOwnProperty(t.text)){var r=Xn[t.text].className||"";if("text"===t.mode){var i=Jt(t,e,"textord");return i.classes.push(r),i}return ne(["mspace",r],[Qt(t.text,t.mode,e)],e)}if(Hn.hasOwnProperty(t.text))return ne(["mspace",Hn[t.text]],[],e);throw new n('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(!Xn.hasOwnProperty(t.text)){if(Hn.hasOwnProperty(t.text))return new ze("mspace");throw new n('Unknown type of space "'+t.text+'"')}return new ze("mtext",[new Ke(" ")])}});var Zn=()=>{var t=new ze("mtd",[]);return t.setAttribute("width","50%"),t};ke({type:"tag",mathmlBuilder(t,e){var r=new ze("mtable",[new ze("mtr",[Zn(),new ze("mtd",[Ze(t.body,e)]),Zn(),new ze("mtd",[Ze(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var Qn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Jn={"\\textbf":"textbf","\\textmd":"textmd"},ti={"\\textit":"textit","\\textup":"textup"},ei=(t,e)=>{var r=t.font;return r?Qn[r]?e.withTextFontFamily(Qn[r]):Jn[r]?e.withTextFontWeight(Jn[r]):"\\emph"===r?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(ti[r]):e};we({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:Ee(i),font:n}},htmlBuilder(t,e){var r=ei(t,e),n=Le(t.body,r,!0);return ne(["mord","text"],n,r)},mathmlBuilder(t,e){var r=ei(t,e);return Ze(t.body,r)}}),we({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=$e(t.body,e),n=ae("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=le({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return ne(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new ze("mo",[new Ke("‾")]);r.setAttribute("stretchy","true");var n=new ze("munder",[Qe(t.body,e),r]);return n.setAttribute("accentunder","true"),n}}),we({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=$e(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return le({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new ze("mpadded",[Qe(t.body,e)],["vcenter"]);return new ze("mrow",[r])}}),we({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=ri(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var o=r[a];"~"===o&&(o="\\textasciitilde"),n.push(Zt(o,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return ne(["mord","text"].concat(i.sizingClasses(e)),ee(n),i)},mathmlBuilder(t,e){var r=new Ke(ri(t)),n=new ze("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var ri=t=>t.body.replace(/ /g,t.star?"␣":" "),ni=be,ii="[ \r\n\t]",ai="(\\\\[a-zA-Z@]+)"+ii+"*",oi="[̀-ͯ]",si=new RegExp(oi+"+$"),li="("+ii+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+oi+"*|[\ud800-\udbff][\udc00-\udfff]"+oi+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+ai+"|\\\\[^\ud800-\udfff])";class ci{constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,this.tokenRegex=new RegExp(li,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new yn("EOF",new mn(this,e,e));var r=this.tokenRegex.exec(t);if(null===r||r.index!==e)throw new n("Unexpected character: '"+t[e]+"'",new yn(t[e],new mn(this,e,e+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[i]){var a=t.indexOf("\n",this.tokenRegex.lastIndex);return-1===a?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new yn(i,new mn(this,e,this.tokenRegex.lastIndex))}}class hi{constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,e,r){if(void 0===r&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=e)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}}var ui=fn;gn("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),gn("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),gn("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),gn("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),gn("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return 1===e[0].length&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),gn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),gn("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var di={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};gn("\\char",function(t){var e,r=t.popToken(),i=0;if("'"===r.text)e=8,r=t.popToken();else if('"'===r.text)e=16,r=t.popToken();else if("`"===r.text)if("\\"===(r=t.popToken()).text[0])i=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");i=r.text.charCodeAt(0)}else e=10;if(e){if(null==(i=di[r.text])||i>=e)throw new n("Invalid base-"+e+" digit "+r.text);for(var a;null!=(a=di[t.future().text])&&a<e;)i*=e,i+=a,t.popToken()}return"\\@char{"+i+"}"});var pi=(t,e,r,i)=>{var a=t.consumeArg().tokens;if(1!==a.length)throw new n("\\newcommand's first argument must be a macro name");var o=a[0].text,s=t.isDefined(o);if(s&&!e)throw new n("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new n("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(a=t.consumeArg().tokens).length&&"["===a[0].text){for(var c="",h=t.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)c+=h.text,h=t.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+c);l=parseInt(c),a=t.consumeArg().tokens}return s&&i||t.macros.set(o,{tokens:a,numArgs:l}),""};gn("\\newcommand",t=>pi(t,!1,!0,!1)),gn("\\renewcommand",t=>pi(t,!0,!1,!1)),gn("\\providecommand",t=>pi(t,!0,!0,!0)),gn("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""}),gn("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""}),gn("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),ni[r],rt.math[r],rt.text[r]),""}),gn("\\bgroup","{"),gn("\\egroup","}"),gn("~","\\nobreakspace"),gn("\\lq","`"),gn("\\rq","'"),gn("\\aa","\\r a"),gn("\\AA","\\r A"),gn("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),gn("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),gn("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),gn("ℬ","\\mathscr{B}"),gn("ℰ","\\mathscr{E}"),gn("ℱ","\\mathscr{F}"),gn("ℋ","\\mathscr{H}"),gn("ℐ","\\mathscr{I}"),gn("ℒ","\\mathscr{L}"),gn("ℳ","\\mathscr{M}"),gn("ℛ","\\mathscr{R}"),gn("ℭ","\\mathfrak{C}"),gn("ℌ","\\mathfrak{H}"),gn("ℨ","\\mathfrak{Z}"),gn("\\Bbbk","\\Bbb{k}"),gn("\\llap","\\mathllap{\\textrm{#1}}"),gn("\\rlap","\\mathrlap{\\textrm{#1}}"),gn("\\clap","\\mathclap{\\textrm{#1}}"),gn("\\mathstrut","\\vphantom{(}"),gn("\\underbar","\\underline{\\text{#1}}"),gn("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),gn("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),gn("\\ne","\\neq"),gn("≠","\\neq"),gn("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),gn("∉","\\notin"),gn("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),gn("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),gn("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),gn("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),gn("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),gn("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),gn("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),gn("⟂","\\perp"),gn("‼","\\mathclose{!\\mkern-0.8mu!}"),gn("∌","\\notni"),gn("⌜","\\ulcorner"),gn("⌝","\\urcorner"),gn("⌞","\\llcorner"),gn("⌟","\\lrcorner"),gn("©","\\copyright"),gn("®","\\textregistered"),gn("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),gn("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),gn("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),gn("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),gn("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),gn("⋮","\\vdots"),gn("\\varGamma","\\mathit{\\Gamma}"),gn("\\varDelta","\\mathit{\\Delta}"),gn("\\varTheta","\\mathit{\\Theta}"),gn("\\varLambda","\\mathit{\\Lambda}"),gn("\\varXi","\\mathit{\\Xi}"),gn("\\varPi","\\mathit{\\Pi}"),gn("\\varSigma","\\mathit{\\Sigma}"),gn("\\varUpsilon","\\mathit{\\Upsilon}"),gn("\\varPhi","\\mathit{\\Phi}"),gn("\\varPsi","\\mathit{\\Psi}"),gn("\\varOmega","\\mathit{\\Omega}"),gn("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),gn("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),gn("\\boxed","\\fbox{$\\displaystyle{#1}$}"),gn("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),gn("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),gn("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),gn("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),gn("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var fi={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},gi=new Set(["bin","rel"]);gn("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in fi?e=fi[r]:("\\not"===r.slice(0,4)||r in rt.math&&gi.has(rt.math[r].group))&&(e="\\dotsb"),e});var mi={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};gn("\\dotso",function(t){return t.future().text in mi?"\\ldots\\,":"\\ldots"}),gn("\\dotsc",function(t){var e=t.future().text;return e in mi&&","!==e?"\\ldots\\,":"\\ldots"}),gn("\\cdots",function(t){return t.future().text in mi?"\\@cdots\\,":"\\@cdots"}),gn("\\dotsb","\\cdots"),gn("\\dotsm","\\cdots"),gn("\\dotsi","\\!\\cdots"),gn("\\dotsx","\\ldots\\,"),gn("\\DOTSI","\\relax"),gn("\\DOTSB","\\relax"),gn("\\DOTSX","\\relax"),gn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),gn("\\,","\\tmspace+{3mu}{.1667em}"),gn("\\thinspace","\\,"),gn("\\>","\\mskip{4mu}"),gn("\\:","\\tmspace+{4mu}{.2222em}"),gn("\\medspace","\\:"),gn("\\;","\\tmspace+{5mu}{.2777em}"),gn("\\thickspace","\\;"),gn("\\!","\\tmspace-{3mu}{.1667em}"),gn("\\negthinspace","\\!"),gn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),gn("\\negthickspace","\\tmspace-{5mu}{.277em}"),gn("\\enspace","\\kern.5em "),gn("\\enskip","\\hskip.5em\\relax"),gn("\\quad","\\hskip1em\\relax"),gn("\\qquad","\\hskip2em\\relax"),gn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),gn("\\tag@paren","\\tag@literal{({#1})}"),gn("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),gn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),gn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),gn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),gn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),gn("\\newline","\\\\\\relax"),gn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var yi=$(Z["Main-Regular"]["T".charCodeAt(0)][1]-.7*Z["Main-Regular"]["A".charCodeAt(0)][1]);gn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+yi+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),gn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+yi+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),gn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),gn("\\@hspace","\\hskip #1\\relax"),gn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),gn("\\ordinarycolon",":"),gn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),gn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),gn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),gn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),gn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),gn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),gn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),gn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),gn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),gn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),gn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),gn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),gn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),gn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),gn("∷","\\dblcolon"),gn("∹","\\eqcolon"),gn("≔","\\coloneqq"),gn("≕","\\eqqcolon"),gn("⩴","\\Coloneqq"),gn("\\ratio","\\vcentcolon"),gn("\\coloncolon","\\dblcolon"),gn("\\colonequals","\\coloneqq"),gn("\\coloncolonequals","\\Coloneqq"),gn("\\equalscolon","\\eqqcolon"),gn("\\equalscoloncolon","\\Eqqcolon"),gn("\\colonminus","\\coloneq"),gn("\\coloncolonminus","\\Coloneq"),gn("\\minuscolon","\\eqcolon"),gn("\\minuscoloncolon","\\Eqcolon"),gn("\\coloncolonapprox","\\Colonapprox"),gn("\\coloncolonsim","\\Colonsim"),gn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),gn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),gn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),gn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),gn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),gn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),gn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),gn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),gn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),gn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),gn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),gn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),gn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),gn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),gn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),gn("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),gn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),gn("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),gn("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),gn("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),gn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),gn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),gn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),gn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),gn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),gn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),gn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),gn("\\imath","\\html@mathml{\\@imath}{ı}"),gn("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),gn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),gn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),gn("⟦","\\llbracket"),gn("⟧","\\rrbracket"),gn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),gn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),gn("⦃","\\lBrace"),gn("⦄","\\rBrace"),gn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),gn("⦵","\\minuso"),gn("\\darr","\\downarrow"),gn("\\dArr","\\Downarrow"),gn("\\Darr","\\Downarrow"),gn("\\lang","\\langle"),gn("\\rang","\\rangle"),gn("\\uarr","\\uparrow"),gn("\\uArr","\\Uparrow"),gn("\\Uarr","\\Uparrow"),gn("\\N","\\mathbb{N}"),gn("\\R","\\mathbb{R}"),gn("\\Z","\\mathbb{Z}"),gn("\\alef","\\aleph"),gn("\\alefsym","\\aleph"),gn("\\Alpha","\\mathrm{A}"),gn("\\Beta","\\mathrm{B}"),gn("\\bull","\\bullet"),gn("\\Chi","\\mathrm{X}"),gn("\\clubs","\\clubsuit"),gn("\\cnums","\\mathbb{C}"),gn("\\Complex","\\mathbb{C}"),gn("\\Dagger","\\ddagger"),gn("\\diamonds","\\diamondsuit"),gn("\\empty","\\emptyset"),gn("\\Epsilon","\\mathrm{E}"),gn("\\Eta","\\mathrm{H}"),gn("\\exist","\\exists"),gn("\\harr","\\leftrightarrow"),gn("\\hArr","\\Leftrightarrow"),gn("\\Harr","\\Leftrightarrow"),gn("\\hearts","\\heartsuit"),gn("\\image","\\Im"),gn("\\infin","\\infty"),gn("\\Iota","\\mathrm{I}"),gn("\\isin","\\in"),gn("\\Kappa","\\mathrm{K}"),gn("\\larr","\\leftarrow"),gn("\\lArr","\\Leftarrow"),gn("\\Larr","\\Leftarrow"),gn("\\lrarr","\\leftrightarrow"),gn("\\lrArr","\\Leftrightarrow"),gn("\\Lrarr","\\Leftrightarrow"),gn("\\Mu","\\mathrm{M}"),gn("\\natnums","\\mathbb{N}"),gn("\\Nu","\\mathrm{N}"),gn("\\Omicron","\\mathrm{O}"),gn("\\plusmn","\\pm"),gn("\\rarr","\\rightarrow"),gn("\\rArr","\\Rightarrow"),gn("\\Rarr","\\Rightarrow"),gn("\\real","\\Re"),gn("\\reals","\\mathbb{R}"),gn("\\Reals","\\mathbb{R}"),gn("\\Rho","\\mathrm{P}"),gn("\\sdot","\\cdot"),gn("\\sect","\\S"),gn("\\spades","\\spadesuit"),gn("\\sub","\\subset"),gn("\\sube","\\subseteq"),gn("\\supe","\\supseteq"),gn("\\Tau","\\mathrm{T}"),gn("\\thetasym","\\vartheta"),gn("\\weierp","\\wp"),gn("\\Zeta","\\mathrm{Z}"),gn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),gn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),gn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),gn("\\bra","\\mathinner{\\langle{#1}|}"),gn("\\ket","\\mathinner{|{#1}\\rangle}"),gn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),gn("\\Bra","\\left\\langle#1\\right|"),gn("\\Ket","\\left|#1\\right\\rangle");var vi=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,o=e.macros.get("|"),s=e.macros.get("\\|");e.macros.beginGroup();var l=e=>r=>{t&&(r.macros.set("|",o),i.length&&r.macros.set("\\|",s));var a=e;!e&&i.length&&("|"===r.future().text&&(r.popToken(),a=!0));return{tokens:a?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,h=e.expandTokens([...a,...c,...r]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};gn("\\bra@ket",vi(!1)),gn("\\bra@set",vi(!0)),gn("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),gn("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),gn("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),gn("\\angln","{\\angl n}"),gn("\\blue","\\textcolor{##6495ed}{#1}"),gn("\\orange","\\textcolor{##ffa500}{#1}"),gn("\\pink","\\textcolor{##ff00af}{#1}"),gn("\\red","\\textcolor{##df0030}{#1}"),gn("\\green","\\textcolor{##28ae7b}{#1}"),gn("\\gray","\\textcolor{gray}{#1}"),gn("\\purple","\\textcolor{##9d38bd}{#1}"),gn("\\blueA","\\textcolor{##ccfaff}{#1}"),gn("\\blueB","\\textcolor{##80f6ff}{#1}"),gn("\\blueC","\\textcolor{##63d9ea}{#1}"),gn("\\blueD","\\textcolor{##11accd}{#1}"),gn("\\blueE","\\textcolor{##0c7f99}{#1}"),gn("\\tealA","\\textcolor{##94fff5}{#1}"),gn("\\tealB","\\textcolor{##26edd5}{#1}"),gn("\\tealC","\\textcolor{##01d1c1}{#1}"),gn("\\tealD","\\textcolor{##01a995}{#1}"),gn("\\tealE","\\textcolor{##208170}{#1}"),gn("\\greenA","\\textcolor{##b6ffb0}{#1}"),gn("\\greenB","\\textcolor{##8af281}{#1}"),gn("\\greenC","\\textcolor{##74cf70}{#1}"),gn("\\greenD","\\textcolor{##1fab54}{#1}"),gn("\\greenE","\\textcolor{##0d923f}{#1}"),gn("\\goldA","\\textcolor{##ffd0a9}{#1}"),gn("\\goldB","\\textcolor{##ffbb71}{#1}"),gn("\\goldC","\\textcolor{##ff9c39}{#1}"),gn("\\goldD","\\textcolor{##e07d10}{#1}"),gn("\\goldE","\\textcolor{##a75a05}{#1}"),gn("\\redA","\\textcolor{##fca9a9}{#1}"),gn("\\redB","\\textcolor{##ff8482}{#1}"),gn("\\redC","\\textcolor{##f9685d}{#1}"),gn("\\redD","\\textcolor{##e84d39}{#1}"),gn("\\redE","\\textcolor{##bc2612}{#1}"),gn("\\maroonA","\\textcolor{##ffbde0}{#1}"),gn("\\maroonB","\\textcolor{##ff92c6}{#1}"),gn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),gn("\\maroonD","\\textcolor{##ca337c}{#1}"),gn("\\maroonE","\\textcolor{##9e034e}{#1}"),gn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),gn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),gn("\\purpleC","\\textcolor{##aa87ff}{#1}"),gn("\\purpleD","\\textcolor{##7854ab}{#1}"),gn("\\purpleE","\\textcolor{##543b78}{#1}"),gn("\\mintA","\\textcolor{##f5f9e8}{#1}"),gn("\\mintB","\\textcolor{##edf2df}{#1}"),gn("\\mintC","\\textcolor{##e0e5cc}{#1}"),gn("\\grayA","\\textcolor{##f6f7f7}{#1}"),gn("\\grayB","\\textcolor{##f0f1f2}{#1}"),gn("\\grayC","\\textcolor{##e3e5e6}{#1}"),gn("\\grayD","\\textcolor{##d6d8da}{#1}"),gn("\\grayE","\\textcolor{##babec2}{#1}"),gn("\\grayF","\\textcolor{##888d93}{#1}"),gn("\\grayG","\\textcolor{##626569}{#1}"),gn("\\grayH","\\textcolor{##3b3e40}{#1}"),gn("\\grayI","\\textcolor{##21242c}{#1}"),gn("\\kaBlue","\\textcolor{##314453}{#1}"),gn("\\kaGreen","\\textcolor{##71B307}{#1}");var bi={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class xi{constructor(t,e,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new hi(ui,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new ci(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,n;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:e,end:r}=this.consumeArg());return this.pushToken(new yn("EOF",r.loc)),this.pushTokens(n),new yn("",mn.range(e,r))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(t){var e=[],r=t&&t.length>0;r||this.consumeSpaces();var i,a=this.future(),o=0,s=0;do{if(i=this.popToken(),e.push(i),"{"===i.text)++o;else if("}"===i.text){if(-1===--o)throw new n("Extra }",i)}else if("EOF"===i.text)throw new n("Unexpected end of input in a macro argument, expected '"+(t&&r?t[s]:"}")+"'",i);if(t&&r)if((0===o||1===o&&"{"===t[s])&&i.text===t[s]){if(++s===t.length){e.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===a.text&&"}"===e[e.length-1].text&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:a,end:i}}consumeArgs(t,e){if(e){if(e.length!==t+1)throw new n("The length of delimiters doesn't match the number of args!");for(var r=e[0],i=0;i<r.length;i++){var a=this.popToken();if(r[i]!==a.text)throw new n("Use of the macro doesn't match its definition",a)}}for(var o=[],s=0;s<t;s++)o.push(this.consumeArg(e&&e[s+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,i=e.noexpand?null:this._getExpansion(r);if(null==i||t&&i.unexpandable){if(t&&null==i&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var s=(a=a.slice()).length-1;s>=0;--s){var l=a[s];if("#"===l.text){if(0===s)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=a[--s]).text)a.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);a.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new yn(t)]):void 0}expandTokens(t){var e=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(!1===this.expandOnce(!0)){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),e.push(n)}return this.countExpansion(e.length),e}expandMacroAsText(t){var e=this.expandMacro(t);return e?e.map(t=>t.text).join(""):e}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1===t.length){var r=this.lexer.catcodes[t];if(null!=r&&13!==r)return}var n="function"==typeof e?e(this):e;if("string"==typeof n){var i=0;if(n.includes("#"))for(var a=n.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var o=new ci(n,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return n}isDefined(t){return this.macros.has(t)||ni.hasOwnProperty(t)||rt.math.hasOwnProperty(t)||rt.text.hasOwnProperty(t)||bi.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:ni.hasOwnProperty(t)&&!ni[t].primitive}}var Ti=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,wi=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",ₐ:"a",ₑ:"e",ₕ:"h",ᵢ:"i",ⱼ:"j",ₖ:"k",ₗ:"l",ₘ:"m",ₙ:"n",ₒ:"o",ₚ:"p",ᵣ:"r",ₛ:"s",ₜ:"t",ᵤ:"u",ᵥ:"v",ₓ:"x",ᵦ:"β",ᵧ:"γ",ᵨ:"ρ",ᵩ:"ϕ",ᵪ:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",ᴬ:"A",ᴮ:"B",ᴰ:"D",ᴱ:"E",ᴳ:"G",ᴴ:"H",ᴵ:"I",ᴶ:"J",ᴷ:"K",ᴸ:"L",ᴹ:"M",ᴺ:"N",ᴼ:"O",ᴾ:"P",ᴿ:"R",ᵀ:"T",ᵁ:"U",ⱽ:"V",ᵂ:"W",ᵃ:"a",ᵇ:"b",ᶜ:"c",ᵈ:"d",ᵉ:"e",ᶠ:"f",ᵍ:"g",ʰ:"h",ⁱ:"i",ʲ:"j",ᵏ:"k",ˡ:"l",ᵐ:"m",ⁿ:"n",ᵒ:"o",ᵖ:"p",ʳ:"r",ˢ:"s",ᵗ:"t",ᵘ:"u",ᵛ:"v",ʷ:"w",ˣ:"x",ʸ:"y",ᶻ:"z",ᵝ:"β",ᵞ:"γ",ᵟ:"δ",ᵠ:"ϕ",ᵡ:"χ",ᶿ:"θ"}),ki={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Ci={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Ei{constructor(t,e){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new xi(t,e,this.mode),this.settings=e,this.leftrightDepth=0,this.nextToken=null}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new n("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken;this.consume(),this.gullet.pushToken(new yn("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,r}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(Ei.endOfExpression.has(n.text))break;if(e&&n.text===e)break;if(t&&ni[n.text]&&ni[n.text].infix)break;var i=this.parseAtom(e);if(!i)break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r=-1,i=0;i<t.length;i++){var a=t[i];if("infix"===a.type){if(-1!==r)throw new n("only one infix operator per group",a.token);r=i,e=a.replaceWith}}if(-1!==r&&e){var o,s,l=t.slice(0,r),c=t.slice(r+1);return o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},s=1===c.length&&"ordgroup"===c[0].type?c[0]:{type:"ordgroup",mode:this.mode,body:c},["\\\\abovefrac"===e?this.callFunction(e,[o,t[r],s],[]):this.callFunction(e,[o,s],[])]}return t}handleSupSubscript(t){var e,r=this.fetch(),i=r.text;this.consume(),this.consumeSpaces();do{var a;e=this.parseGroup(t)}while("internal"===(null==(a=e)?void 0:a.type));if(!e)throw new n("Expected group after '"+i+"'",r);return e}formatUnsupportedCmd(t){for(var e=[],r=0;r<t.length;r++)e.push({type:"textord",mode:"text",text:t[r]});var n={type:"text",mode:this.mode,body:e};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(t){var e,r,i=this.parseGroup("atom",t);if("internal"===(null==i?void 0:i.type))return i;if("text"===this.mode)return i;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(i&&"op"===i.type){var o="\\limits"===a.text;i.limits=o,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new n("Limit controls must follow a math operator",a);i.alwaysHandleSupSub&&(i.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(e)throw new n("Double superscript",a);e=this.handleSupSubscript("superscript")}else if("_"===a.text){if(r)throw new n("Double subscript",a);r=this.handleSupSubscript("subscript")}else if("'"===a.text){if(e)throw new n("Double superscript",a);var s={type:"textord",mode:this.mode,text:"\\prime"},l=[s];for(this.consume();"'"===this.fetch().text;)l.push(s),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),e={type:"ordgroup",mode:this.mode,body:l}}else{if(!wi[a.text])break;var c=Ti.test(a.text),h=[];for(h.push(new yn(wi[a.text])),this.consume();;){var u=this.fetch().text;if(!wi[u])break;if(Ti.test(u)!==c)break;h.unshift(new yn(wi[u])),this.consume()}var d=this.subparse(h);c?r={type:"ordgroup",mode:"math",body:d}:e={type:"ordgroup",mode:"math",body:d}}}return e||r?{type:"supsub",mode:this.mode,base:i,sup:e,sub:r}:i}parseFunction(t,e){var r=this.fetch(),i=r.text,a=ni[i];if(!a)return null;if(this.consume(),e&&"atom"!==e&&!a.allowedInArgument)throw new n("Got function '"+i+"' with no arguments"+(e?" as "+e:""),r);if("text"===this.mode&&!a.allowedInText)throw new n("Can't use function '"+i+"' in text mode",r);if("math"===this.mode&&!1===a.allowedInMath)throw new n("Can't use function '"+i+"' in math mode",r);var{args:o,optArgs:s}=this.parseArguments(i,a);return this.callFunction(i,o,s,r,t)}callFunction(t,e,r,i,a){var o={funcName:t,parser:this,token:i,breakOnTokenText:a},s=ni[t];if(s&&s.handler)return s.handler(o,e,r);throw new n("No function handler for "+t)}parseArguments(t,e){var r=e.numArgs+e.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var i=[],a=[],o=0;o<r;o++){var s=e.argTypes&&e.argTypes[o],l=o<e.numOptionalArgs;("primitive"in e&&e.primitive&&null==s||"sqrt"===e.type&&1===o&&null==a[0])&&(s="primitive");var c=this.parseGroupOfType("argument to '"+t+"'",s,l);if(l)a.push(c);else{if(null==c)throw new n("Null argument, please report this as a bug");i.push(c)}}return{args:i,optArgs:a}}parseGroupOfType(t,e,r){switch(e){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,e);case"hbox":var i=this.parseArgumentGroup(r,"text");return null!=i?{type:"styling",mode:i.mode,body:[i],style:"text",resetFont:!0}:null;case"raw":var a=this.parseStringGroup("raw",r);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(r)throw new n("A primitive argument cannot be optional");var o=this.parseGroup(t);if(null==o)throw new n("Expected group as "+t,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new n("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(t,e){var r=this.gullet.scanArgument(e);if(null==r)return null;for(var n,i="";"EOF"!==(n=this.fetch()).text;)i+=n.text,this.consume();return this.consume(),r.text=i,r}parseRegexGroup(t,e){for(var r,i=this.fetch(),a=i,o="";"EOF"!==(r=this.fetch()).text&&t.test(o+r.text);)o+=(a=r).text,this.consume();if(""===o)throw new n("Invalid "+e+": '"+i.text+"'",i);return i.range(a,o)}parseColorGroup(t){var e=this.parseStringGroup("color",t);if(null==e)return null;var r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!r)throw new n("Invalid color: '"+e.text+"'",e);var i=r[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(t){var e,r=!1;if(this.gullet.consumeSpaces(),!(e=t||"{"===this.gullet.future().text?this.parseStringGroup("size",t):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;t||0!==e.text.length||(e.text="0pt",r=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e.text);if(!i)throw new n("Invalid size: '"+e.text+"'",e);var a={number:+(i[1]+i[2]),unit:i[3]};if(!M(a))throw new n("Invalid unit: '"+a.unit+"'",e);return{type:"size",mode:this.mode,value:a,isBlank:r}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var e=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e)return null;var r=e.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(t,e){var r=this.gullet.scanArgument(t);if(null==r)return null;var n=this.mode;e&&this.switchMode(e),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var a={type:"ordgroup",mode:this.mode,loc:r.loc,body:i};return e&&this.switchMode(n),a}parseGroup(t,e){var r,i=this.fetch(),a=i.text;if("{"===a||"\\begingroup"===a){this.consume();var o="{"===a?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:mn.range(i,l),body:s,semisimple:"\\begingroup"===a||void 0}}else if(null==(r=this.parseFunction(e,t)||this.parseSymbol())&&"\\"===a[0]&&!bi.hasOwnProperty(a)){if(this.settings.throwOnError)throw new n("Undefined control sequence: "+a,i);r=this.formatUnsupportedCmd(a),this.consume()}return r}formLigatures(t){for(var e=t.length-1,r=0;r<e;++r){var n=t[r];if("textord"===n.type){var i=n.text,a=t[r+1];if(a&&"textord"===a.type){if("-"===i&&"-"===a.text){var o=t[r+2];r+1<e&&o&&"textord"===o.type&&"-"===o.text?(t.splice(r,3,{type:"textord",mode:"text",loc:mn.range(n,o),text:"---"}),e-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:mn.range(n,a),text:"--"}),e-=1)}"'"!==i&&"`"!==i||a.text!==i||(t.splice(r,2,{type:"textord",mode:"text",loc:mn.range(n,a),text:i+i}),e-=1)}}}}parseSymbol(){var t=this.fetch(),e=t.text;if(/^\\verb[^a-zA-Z]/.test(e)){this.consume();var r=e.slice(5),i="*"===r.charAt(0);if(i&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new n("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:i}}Ci.hasOwnProperty(e[0])&&!rt[this.mode][e[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+e[0]+'" used in math mode',t),e=Ci[e[0]]+e.slice(1));var a,o=si.exec(e);if(o&&("i"===(e=e.substring(0,o.index))?e="ı":"j"===e&&(e="ȷ")),rt[this.mode][e]){this.settings.strict&&"math"===this.mode&&Mt.includes(e)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var s=rt[this.mode][e].group,l=mn.range(t);a=s in ur?{type:"atom",mode:this.mode,family:s,loc:l,text:e}:{type:s,mode:this.mode,loc:l,text:e}}else{if(!(e.charCodeAt(0)>=128))return null;this.settings.strict&&(_(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:mn.range(t),text:e}}if(this.consume(),o)for(var c=0;c<o[0].length;c++){var h=o[0][c];if(!ki[h])throw new n("Unknown accent ' "+h+"'",t);var u=ki[h][this.mode]||ki[h].text;if(!u)throw new n("Accent "+h+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:mn.range(t),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}}Ei.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var Si=function(t,e){if(!("string"==typeof t||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new Ei(t,e);delete r.gullet.macros.current["\\df@tag"];var i=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new n("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:r.subparse([new yn("\\df@tag")])}]}return i},_i=function(t,e,r){e.textContent="";var n=Ri(t,r).toNode();e.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),_i=function(){throw new n("KaTeX doesn't work in quirks mode.")});var Ai=function(t,e,r){if(r.throwOnError||!(t instanceof n))throw t;var i=ne(["katex-error"],[new Y(e)]);return i.setAttribute("title",t.toString()),i.setAttribute("style","color:"+r.errorColor),i},Ri=function(t,e){var r=new g(e);try{return function(t,e,r){var n,i=ir(r);if("mathml"===r.output)return Je(t,e,i,r.displayMode,!0);if("html"===r.output){var a=Be(t,i);n=ne(["katex"],[a])}else{var o=Je(t,e,i,r.displayMode,!1),s=Be(t,i);n=ne(["katex"],[o,s])}return ar(n,r)}(Si(t,r),t,r)}catch(n){return Ai(n,t,r)}},Li={version:"0.16.47",render:_i,renderToString:function(t,e){return Ri(t,e).toMarkup()},ParseError:n,SETTINGS_SCHEMA:d,__parse:function(t,e){var r=new g(e);return Si(t,r)},__renderToDomTree:Ri,__renderToHTMLTree:function(t,e){var r=new g(e);try{return function(t,e,r){var n=Be(t,ir(r)),i=ne(["katex"],[n]);return ar(i,r)}(Si(t,r),0,r)}catch(n){return Ai(n,t,r)}},__setFontMetrics:function(t,e){Z[t]=e},__defineSymbol:nt,__defineFunction:we,__defineMacro:gn,__domTree:{Span:q,Anchor:W,SymbolNode:Y,SvgNode:V,PathNode:H,LineNode:X}}},7266(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(6309),i=r(3122);const a=class{constructor(){this.type=i.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=i.Z.ALL}is(t){return this.type===t}};const o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=n.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=n.A.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=n.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=n.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=n.A.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=n.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(i.Z.HSL)||void 0===e?(this._ensureHSL(),n.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(i.Z.RGB)||void 0===e?(this._ensureRGB(),n.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(i.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(i.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1931(t,e,r){"use strict";r.d(e,{A:()=>g});var n=r(7266),i=r(3122);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,s=o%4==0,l=o>4,c=l?1:17,h=l?8:4,u=s?0:-1,d=l?255:15;return n.A.set({r:(i>>h*(u+3)&d)*c,g:(i>>h*(u+2)&d)*c,b:(i>>h*(u+1)&d)*c,a:s?(i&d)*c/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a}=t;return a<1?`#${i.Y[Math.round(e)]}${i.Y[Math.round(r)]}${i.Y[Math.round(n)]}${i.Y[Math.round(255*a)]}`:`#${i.Y[Math.round(e)]}${i.Y[Math.round(r)]}${i.Y[Math.round(n)]}`}},o=a;var s=r(6309);const l={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(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,i,a,o,c,h]=r;return n.A.set({h:l._hue2deg(i),s:s.A.channel.clamp.s(parseFloat(a)),l:s.A.channel.clamp.l(parseFloat(o)),a:c?s.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(n)}%, ${i})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(n)}%)`}},c=l,h={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=h.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const r in h.colors)if(h.colors[r]===e)return r}},u=h,d={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(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,i,a,o,l,c,h,u,p]=r;return n.A.set({r:s.A.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:s.A.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)}, ${s.A.lang.round(i)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(n)})`}},p=d,f={format:{keyword:h,hex:o,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||p.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(i.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):o.stringify(t)},g=f},3122(t,e,r){"use strict";r.d(e,{Y:()=>i,Z:()=>a});var n=r(6309);const i={};for(let o=0;o<=255;o++)i[o]=n.A.unit.dec2hex(o);const a={ALL:0,RGB:1,HSL:2}},5635(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(6309),i=r(1931);const a=(t,e,r)=>{const a=i.A.parse(t),o=a[e],s=n.A.channel.clamp[e](o+r);return o!==s&&(a[e]=s),i.A.stringify(a)}},8232(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(6309),i=r(1931);const a=(t,e)=>{const r=i.A.parse(t);for(const i in e)r[i]=n.A.channel.clamp[i](e[i]);return i.A.stringify(r)}},5937(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(6309),i=r(1931);const a=(t,e)=>n.A.lang.round(i.A.parse(t)[e])},5263(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(5635);const i=(t,e)=>(0,n.A)(t,"l",-e)},5097(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(6309),i=r(1931);const a=t=>{const{r:e,g:r,b:a}=i.A.parse(t),o=.2126*n.A.channel.toLinear(e)+.7152*n.A.channel.toLinear(r)+.0722*n.A.channel.toLinear(a);return n.A.lang.round(o)},o=t=>a(t)>=.5,s=t=>!o(t)},8041(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(5635);const i=(t,e)=>(0,n.A)(t,"l",e)},5582(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(6309),i=r(7266),a=r(1931),o=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,o.A)(t,{a:e});const l=i.A.set({r:n.A.channel.clamp.r(t),g:n.A.channel.clamp.g(e),b:n.A.channel.clamp.b(r),a:n.A.channel.clamp.a(s)});return a.A.stringify(l)}},6309(t,e,r){"use strict";r.d(e,{A:()=>i});const n={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+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(i){case"r":return 255*n.hue2rgb(o,a,t+1/3);case"g":return 255*n.hue2rgb(o,a,t);case"b":return 255*n.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),o=(i+a)/2;if("l"===n)return 100*o;if(i===a)return 0;const s=i-a;if("s"===n)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},i={channel:n,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(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},9469(t,e,r){"use strict";r.d(e,{A:()=>d});const n=function(){this.__data__=[],this.size=0};var i=r(6984);const a=function(t,e){for(var r=t.length;r--;)if((0,i.A)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;const s=function(t){var e=this.__data__,r=a(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=a(e,t);return r<0?void 0:e[r][1]};const c=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var r=this.__data__,n=a(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=s,u.prototype.get=l,u.prototype.has=c,u.prototype.set=h;const d=u},8335(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"Map")},2050(t,e,r){"use strict";r.d(e,{A:()=>k});const n=(0,r(8562).A)(Object,"create");const i=function(){this.__data__=n?n(null):{},this.size=0};const a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var o=Object.prototype.hasOwnProperty;const s=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return n?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=s,u.prototype.has=c,u.prototype.set=h;const d=u;var p=r(9469),f=r(8335);const g=function(){this.size=0,this.__data__={hash:new d,map:new(f.A||p.A),string:new d}};const m=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const y=function(t,e){var r=t.__data__;return m(e)?r["string"==typeof e?"string":"hash"]:r.map};const v=function(t){var e=y(this,t).delete(t);return this.size-=e?1:0,e};const b=function(t){return y(this,t).get(t)};const x=function(t){return y(this,t).has(t)};const T=function(t,e){var r=y(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function w(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}w.prototype.clear=g,w.prototype.delete=v,w.prototype.get=b,w.prototype.has=x,w.prototype.set=T;const k=w},9857(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"Set")},8300(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(2050);const i=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const a=function(t){return this.__data__.has(t)};function o(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n.A;++e<r;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a;const s=o},2080(t,e,r){"use strict";r.d(e,{A:()=>d});var n=r(9469);const i=function(){this.__data__=new n.A,this.size=0};const a=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const o=function(t){return this.__data__.get(t)};const s=function(t){return this.__data__.has(t)};var l=r(8335),c=r(2050);const h=function(t,e){var r=this.__data__;if(r instanceof n.A){var i=r.__data__;if(!l.A||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new c.A(i)}return r.set(t,e),this.size=r.size,this};function u(t){var e=this.__data__=new n.A(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=h;const d=u},241(t,e,r){"use strict";r.d(e,{A:()=>n});const n=r(1917).A.Symbol},3988(t,e,r){"use strict";r.d(e,{A:()=>n});const n=r(1917).A.Uint8Array},2641(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},2634(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}},2505(t,e,r){"use strict";r.d(e,{A:()=>h});const n=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var i=r(5175),a=r(2049),o=r(1200),s=r(5353),l=r(4749),c=Object.prototype.hasOwnProperty;const h=function(t,e){var r=(0,a.A)(t),h=!r&&(0,i.A)(t),u=!r&&!h&&(0,o.A)(t),d=!r&&!h&&!u&&(0,l.A)(t),p=r||h||u||d,f=p?n(t.length,String):[],g=f.length;for(var m in t)!e&&!c.call(t,m)||p&&("length"==m||u&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,s.A)(m,g))||f.push(m);return f}},5572(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},6912(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},2851(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2528),i=r(6984),a=Object.prototype.hasOwnProperty;const o=function(t,e,r){var o=t[e];a.call(t,e)&&(0,i.A)(o,r)&&(void 0!==r||e in t)||(0,n.A)(t,e,r)}},2528(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(4171);const i=function(t,e,r){"__proto__"==e&&n.A?(0,n.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},970(t,e,r){"use strict";r.d(e,{A:()=>J});var n=r(2080),i=r(2641),a=r(2851),o=r(2031),s=r(7422);const l=function(t,e){return t&&(0,o.A)(e,(0,s.A)(e),t)};var c=r(9999);const h=function(t,e){return t&&(0,o.A)(e,(0,c.A)(e),t)};var u=r(154),d=r(9759),p=r(4792);const f=function(t,e){return(0,o.A)(t,(0,p.A)(t),e)};var g=r(6912),m=r(5647),y=r(3153);const v=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,g.A)(e,(0,p.A)(t)),t=(0,m.A)(t);return e}:y.A;const b=function(t,e){return(0,o.A)(t,v(t),e)};var x=r(9042),T=r(3831);const w=function(t){return(0,T.A)(t,c.A,v)};var k=r(9137),C=Object.prototype.hasOwnProperty;const E=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&C.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var S=r(565);const _=function(t,e){var r=e?(0,S.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var A=/\w*$/;const R=function(t){var e=new t.constructor(t.source,A.exec(t));return e.lastIndex=t.lastIndex,e};var L=r(241),I=L.A?L.A.prototype:void 0,D=I?I.valueOf:void 0;const N=function(t){return D?Object(D.call(t)):{}};var M=r(1801);const O=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,S.A)(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return _(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,M.A)(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return R(t);case"[object Symbol]":return N(t)}};var $=r(407),P=r(2049),B=r(1200),F=r(3098);const z=function(t){return(0,F.A)(t)&&"[object Map]"==(0,k.A)(t)};var K=r(2789),j=r(4841),q=j.A&&j.A.isMap;const W=q?(0,K.A)(q):z;var U=r(3149);const G=function(t){return(0,F.A)(t)&&"[object Set]"==(0,k.A)(t)};var Y=j.A&&j.A.isSet;const V=Y?(0,K.A)(Y):G;var H="[object Arguments]",X="[object Function]",Z="[object Object]",Q={};Q[H]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object DataView]"]=Q["[object Boolean]"]=Q["[object Date]"]=Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Map]"]=Q["[object Number]"]=Q[Z]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object Symbol]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q["[object Error]"]=Q[X]=Q["[object WeakMap]"]=!1;const J=function t(e,r,o,p,g,m){var y,v=1&r,T=2&r,C=4&r;if(o&&(y=g?o(e,p,g,m):o(e)),void 0!==y)return y;if(!(0,U.A)(e))return e;var S=(0,P.A)(e);if(S){if(y=E(e),!v)return(0,d.A)(e,y)}else{var _=(0,k.A)(e),A=_==X||"[object GeneratorFunction]"==_;if((0,B.A)(e))return(0,u.A)(e,v);if(_==Z||_==H||A&&!g){if(y=T||A?{}:(0,$.A)(e),!v)return T?b(e,h(y,e)):f(e,l(y,e))}else{if(!Q[_])return g?e:{};y=O(e,_,v)}}m||(m=new n.A);var R=m.get(e);if(R)return R;m.set(e,y),V(e)?e.forEach(function(n){y.add(t(n,r,o,n,e,m))}):W(e)&&e.forEach(function(n,i){y.set(i,t(n,r,o,i,e,m))});var L=C?T?w:x.A:T?c.A:s.A,I=S?void 0:L(e);return(0,i.A)(I||e,function(n,i){I&&(n=e[i=n]),(0,a.A)(y,i,t(n,r,o,i,e,m))}),y}},4288(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9841),i=r(8446);const a=function(t,e){return function(r,n){if(null==r)return r;if(!(0,i.A)(r))return t(r,n);for(var a=r.length,o=e?a:-1,s=Object(r);(e?o--:++o<a)&&!1!==n(s[o],o,s););return r}}(n.A)},5707(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},7671(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(6912),i=r(241),a=r(5175),o=r(2049),s=i.A?i.A.isConcatSpreadable:void 0;const l=function(t){return(0,o.A)(t)||(0,a.A)(t)||!!(s&&t&&t[s])};const c=function t(e,r,i,a,o){var s=-1,c=e.length;for(i||(i=l),o||(o=[]);++s<c;){var h=e[s];r>0&&i(h)?r>1?t(h,r-1,i,a,o):(0,n.A)(o,h):a||(o[o.length]=h)}return o}},7132(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var l=o[t?s:++i];if(!1===r(a[l],l,a))break}return e}}()},9841(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(7132),i=r(7422);const a=function(t,e){return t&&(0,n.A)(t,e,i.A)}},6318(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(4878),i=r(901);const a=function(t,e){for(var r=0,a=(e=(0,n.A)(e,t)).length;null!=t&&r<a;)t=t[(0,i.A)(e[r++])];return r&&r==a?t:void 0}},3831(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(6912),i=r(2049);const a=function(t,e,r){var a=e(t);return(0,i.A)(t)?a:(0,n.A)(a,r(t))}},9672(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(241),i=r(451),a=r(5606),o=n.A?n.A.toStringTag:void 0;const s=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?(0,i.A)(t):(0,a.A)(t)}},4425(t,e,r){"use strict";r.d(e,{A:()=>Y});var n=r(2080),i=r(8300);const a=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var o=r(4099);const s=function(t,e,r,n,s,l){var c=1&r,h=t.length,u=e.length;if(h!=u&&!(c&&u>h))return!1;var d=l.get(t),p=l.get(e);if(d&&p)return d==e&&p==t;var f=-1,g=!0,m=2&r?new i.A:void 0;for(l.set(t,e),l.set(e,t);++f<h;){var y=t[f],v=e[f];if(n)var b=c?n(v,y,f,e,t,l):n(y,v,f,t,e,l);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!a(e,function(t,e){if(!(0,o.A)(m,e)&&(y===t||s(y,t,r,n,l)))return m.push(e)})){g=!1;break}}else if(y!==v&&!s(y,v,r,n,l)){g=!1;break}}return l.delete(t),l.delete(e),g};var l=r(241),c=r(3988),h=r(6984);const u=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r};var d=r(9959),p=l.A?l.A.prototype:void 0,f=p?p.valueOf:void 0;const g=function(t,e,r,n,i,a,o){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new c.A(t),new c.A(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,h.A)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=u;case"[object Set]":var p=1&n;if(l||(l=d.A),t.size!=e.size&&!p)return!1;var g=o.get(t);if(g)return g==e;n|=2,o.set(t,e);var m=s(l(t),l(e),n,i,a,o);return o.delete(t),m;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1};var m=r(9042),y=Object.prototype.hasOwnProperty;const v=function(t,e,r,n,i,a){var o=1&r,s=(0,m.A)(t),l=s.length;if(l!=(0,m.A)(e).length&&!o)return!1;for(var c=l;c--;){var h=s[c];if(!(o?h in e:y.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var f=o;++c<l;){var g=t[h=s[c]],v=e[h];if(n)var b=o?n(v,g,h,e,t,a):n(g,v,h,t,e,a);if(!(void 0===b?g===v||i(g,v,r,n,a):b)){p=!1;break}f||(f="constructor"==h)}if(p&&!f){var x=t.constructor,T=e.constructor;x==T||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof T&&T instanceof T||(p=!1)}return a.delete(t),a.delete(e),p};var b=r(9137),x=r(2049),T=r(1200),w=r(4749),k="[object Arguments]",C="[object Array]",E="[object Object]",S=Object.prototype.hasOwnProperty;const _=function(t,e,r,i,a,o){var l=(0,x.A)(t),c=(0,x.A)(e),h=l?C:(0,b.A)(t),u=c?C:(0,b.A)(e),d=(h=h==k?E:h)==E,p=(u=u==k?E:u)==E,f=h==u;if(f&&(0,T.A)(t)){if(!(0,T.A)(e))return!1;l=!0,d=!1}if(f&&!d)return o||(o=new n.A),l||(0,w.A)(t)?s(t,e,r,i,a,o):g(t,e,h,r,i,a,o);if(!(1&r)){var m=d&&S.call(t,"__wrapped__"),y=p&&S.call(e,"__wrapped__");if(m||y){var _=m?t.value():t,A=y?e.value():e;return o||(o=new n.A),a(_,A,r,i,o)}}return!!f&&(o||(o=new n.A),v(t,e,r,i,a,o))};var A=r(3098);const R=function t(e,r,n,i,a){return e===r||(null==e||null==r||!(0,A.A)(e)&&!(0,A.A)(r)?e!=e&&r!=r:_(e,r,n,i,t,a))};const L=function(t,e,r,i){var a=r.length,o=a,s=!i;if(null==t)return!o;for(t=Object(t);a--;){var l=r[a];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++a<o;){var c=(l=r[a])[0],h=t[c],u=l[1];if(s&&l[2]){if(void 0===h&&!(c in t))return!1}else{var d=new n.A;if(i)var p=i(h,u,c,t,e,d);if(!(void 0===p?R(u,h,3,i,d):p))return!1}}return!0};var I=r(3149);const D=function(t){return t==t&&!(0,I.A)(t)};var N=r(7422);const M=function(t){for(var e=(0,N.A)(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,D(i)]}return e};const O=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};const $=function(t){var e=M(t);return 1==e.length&&e[0][2]?O(e[0][0],e[0][1]):function(r){return r===t||L(r,t,e)}};var P=r(6318);const B=function(t,e,r){var n=null==t?void 0:(0,P.A)(t,e);return void 0===n?r:n};var F=r(6964),z=r(6586),K=r(901);const j=function(t,e){return(0,z.A)(t)&&D(e)?O((0,K.A)(t),e):function(r){var n=B(r,t);return void 0===n&&n===e?(0,F.A)(r,t):R(e,n,3)}};var q=r(9008),W=r(805);const U=function(t){return function(e){return(0,P.A)(e,t)}};const G=function(t){return(0,z.A)(t)?(0,W.A)((0,K.A)(t)):U(t)};const Y=function(t){return"function"==typeof t?t:null==t?q.A:"object"==typeof t?(0,x.A)(t)?j(t[0],t[1]):$(t):G(t)}},4453(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(7271);const i=(0,r(367).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const o=function(t){if(!(0,n.A)(t))return i(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},2568(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(4288),i=r(8446);const a=function(t,e){var r=-1,a=(0,i.A)(t)?Array(t.length):[];return(0,n.A)(t,function(t,n,i){a[++r]=e(t,n,i)}),a}},805(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e){return null==e?void 0:e[t]}}},4326(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(9008),i=r(5255),a=r(7424);const o=function(t,e){return(0,a.A)((0,i.A)(t,e,n.A),t+"")}},2789(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return function(e){return t(e)}}},4099(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){return t.has(e)}},9922(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(9008);const i=function(t){return"function"==typeof t?t:n.A}},4878(t,e,r){"use strict";r.d(e,{A:()=>d});var n=r(2049),i=r(6586),a=r(2050);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(o.Cache||a.A),r}o.Cache=a.A;const s=o;var l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g;const h=function(t){var e=s(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(l,function(t,r,n,i){e.push(n?i.replace(c,"$1"):r||t)}),e});var u=r(3456);const d=function(t,e){return(0,n.A)(t)?t:(0,i.A)(t,e)?[t]:h((0,u.A)(t))}},565(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(3988);const i=function(t){var e=new t.constructor(t.byteLength);return new n.A(e).set(new n.A(t)),e}},154(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(1917),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i?n.A.Buffer:void 0,s=o?o.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,n=s?s(r):new t.constructor(r);return t.copy(n),n}},1801(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(565);const i=function(t,e){var r=e?(0,n.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},9759(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},2031(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(2851),i=r(2528);const a=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,l=e.length;++s<l;){var c=e[s],h=a?a(r[c],t[c],c,r,t):void 0;void 0===h&&(h=t[c]),o?(0,i.A)(r,c,h):(0,n.A)(r,c,h)}return r}},4171(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(8562);const i=function(){try{var t=(0,n.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},2136(t,e,r){"use strict";r.d(e,{A:()=>n});const n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},9042(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(3831),i=r(4792),a=r(7422);const o=function(t){return(0,n.A)(t,a.A,i.A)}},8562(t,e,r){"use strict";r.d(e,{A:()=>v});var n=r(9610);const i=r(1917).A["__core-js_shared__"];var a,o=(a=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const s=function(t){return!!o&&o in t};var l=r(3149),c=r(1121),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,f=d.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(t){return!(!(0,l.A)(t)||s(t))&&((0,n.A)(t)?g:h).test((0,c.A)(t))};const y=function(t,e){return null==t?void 0:t[e]};const v=function(t,e){var r=y(t,e);return m(r)?r:void 0}},5647(t,e,r){"use strict";r.d(e,{A:()=>n});const n=(0,r(367).A)(Object.getPrototypeOf,Object)},451(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(241),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=n.A?n.A.toStringTag:void 0;const l=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(l){}var i=o.call(t);return n&&(e?t[s]=r:delete t[s]),i}},4792(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(2634),i=r(3153),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols;const s=o?function(t){return null==t?[]:(t=Object(t),(0,n.A)(o(t),function(e){return a.call(t,e)}))}:i.A},9137(t,e,r){"use strict";r.d(e,{A:()=>k});var n=r(8562),i=r(1917);const a=(0,n.A)(i.A,"DataView");var o=r(8335);const s=(0,n.A)(i.A,"Promise");var l=r(9857);const c=(0,n.A)(i.A,"WeakMap");var h=r(9672),u=r(1121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.A)(a),v=(0,u.A)(o.A),b=(0,u.A)(s),x=(0,u.A)(l.A),T=(0,u.A)(c),w=h.A;(a&&w(new a(new ArrayBuffer(1)))!=m||o.A&&w(new o.A)!=d||s&&w(s.resolve())!=p||l.A&&w(new l.A)!=f||c&&w(new c)!=g)&&(w=function(t){var e=(0,h.A)(t),r="[object Object]"==e?t.constructor:void 0,n=r?(0,u.A)(r):"";if(n)switch(n){case y:return m;case v:return d;case b:return p;case x:return f;case T:return g}return e});const k=w},5054(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(4878),i=r(5175),a=r(2049),o=r(5353),s=r(5254),l=r(901);const c=function(t,e,r){for(var c=-1,h=(e=(0,n.A)(e,t)).length,u=!1;++c<h;){var d=(0,l.A)(e[c]);if(!(u=null!=t&&r(t,d)))break;t=t[d]}return u||++c!=h?u:!!(h=null==t?0:t.length)&&(0,s.A)(h)&&(0,o.A)(d,h)&&((0,a.A)(t)||(0,i.A)(t))}},407(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(3149),i=Object.create;const a=function(){function t(){}return function(e){if(!(0,n.A)(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var o=r(5647),s=r(7271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:a((0,o.A)(t))}},5353(t,e,r){"use strict";r.d(e,{A:()=>i});var n=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},6586(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(2049),i=r(1882),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;const s=function(t,e){if((0,n.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,i.A)(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},7271(t,e,r){"use strict";r.d(e,{A:()=>i});var n=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},4841(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(2136),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===i&&n.A.process;const s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(e){}}()},5606(t,e,r){"use strict";r.d(e,{A:()=>i});var n=Object.prototype.toString;const i=function(t){return n.call(t)}},367(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){return function(r){return t(e(r))}}},5255(t,e,r){"use strict";r.d(e,{A:()=>a});const n=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var i=Math.max;const a=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),l=Array(s);++o<s;)l[o]=a[e+o];o=-1;for(var c=Array(e+1);++o<e;)c[o]=a[o];return c[e]=r(l),n(t,this,c)}}},1917(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(2136),i="object"==typeof self&&self&&self.Object===Object&&self;const a=n.A||i||Function("return this")()},9959(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},7424(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(9142),i=r(4171),a=r(9008);const o=i.A?function(t,e){return(0,i.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,n.A)(e),writable:!0})}:a.A;var s=Date.now;const l=function(t){var e=0,r=0;return function(){var n=s(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const c=l(o)},901(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(1882);const i=function(t){if("string"==typeof t||(0,n.A)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},1121(t,e,r){"use strict";r.d(e,{A:()=>i});var n=Function.prototype.toString;const i=function(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},9142(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return function(){return t}}},6984(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t,e){return t===e||t!=t&&e!=e}},6070(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(2634),i=r(4288);const a=function(t,e){var r=[];return(0,i.A)(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r};var o=r(4425),s=r(2049);const l=function(t,e){return((0,s.A)(t)?n.A:a)(t,(0,o.A)(e,3))}},8058(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(2641),i=r(4288),a=r(9922),o=r(2049);const s=function(t,e){return((0,o.A)(t)?n.A:i.A)(t,(0,a.A)(e))}},6964(t,e,r){"use strict";r.d(e,{A:()=>a});const n=function(t,e){return null!=t&&e in Object(t)};var i=r(5054);const a=function(t,e){return null!=t&&(0,i.A)(t,e,n)}},9008(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return t}},5175(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(9672),i=r(3098);const a=function(t){return(0,i.A)(t)&&"[object Arguments]"==(0,n.A)(t)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(t){return(0,i.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")};const h=c},2049(t,e,r){"use strict";r.d(e,{A:()=>n});const n=Array.isArray},8446(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9610),i=r(5254);const a=function(t){return null!=t&&(0,i.A)(t.length)&&!(0,n.A)(t)}},3533(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(8446),i=r(3098);const a=function(t){return(0,i.A)(t)&&(0,n.A)(t)}},1200(t,e,r){"use strict";r.d(e,{A:()=>l});var n=r(1917);const i=function(){return!1};var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=a&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===a?n.A.Buffer:void 0;const l=(s?s.isBuffer:void 0)||i},9610(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9672),i=r(3149);const a=function(t){if(!(0,i.A)(t))return!1;var e=(0,n.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return null!=t&&"object"==typeof t}},1882(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(9672),i=r(3098);const a=function(t){return"symbol"==typeof t||(0,i.A)(t)&&"[object Symbol]"==(0,n.A)(t)}},4749(t,e,r){"use strict";r.d(e,{A:()=>u});var n=r(9672),i=r(5254),a=r(3098),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;const s=function(t){return(0,a.A)(t)&&(0,i.A)(t.length)&&!!o[(0,n.A)(t)]};var l=r(2789),c=r(4841),h=c.A&&c.A.isTypedArray;const u=h?(0,l.A)(h):s},9592(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){return void 0===t}},7422(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(2505),i=r(4453),a=r(8446);const o=function(t){return(0,a.A)(t)?(0,n.A)(t):(0,i.A)(t)}},9999(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(2505),i=r(3149),a=r(7271);const o=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var s=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,i.A)(t))return o(t);var e=(0,a.A)(t),r=[];for(var n in t)("constructor"!=n||!e&&s.call(t,n))&&r.push(n);return r};var c=r(8446);const h=function(t){return(0,c.A)(t)?(0,n.A)(t,!0):l(t)}},4722(t,e,r){"use strict";r.d(e,{A:()=>s});var n=r(5572),i=r(4425),a=r(2568),o=r(2049);const s=function(t,e){return((0,o.A)(t)?n.A:a.A)(t,(0,i.A)(e,3))}},3130(t,e,r){"use strict";r.d(e,{A:()=>l});const n=function(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r};var i=r(4288),a=r(4425);const o=function(t,e,r,n,i){return i(t,function(t,i,a){r=n?(n=!1,t):e(r,t,i,a)}),r};var s=r(2049);const l=function(t,e,r){var l=(0,s.A)(t)?n:o,c=arguments.length<3;return l(t,(0,a.A)(e,4),r,c,i.A)}},3153(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(){return[]}},3456(t,e,r){"use strict";r.d(e,{A:()=>h});var n=r(241),i=r(5572),a=r(2049),o=r(1882),s=n.A?n.A.prototype:void 0,l=s?s.toString:void 0;const c=function t(e){if("string"==typeof e)return e;if((0,a.A)(e))return(0,i.A)(e,t)+"";if((0,o.A)(e))return l?l.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};const h=function(t){return null==t?"":c(t)}},2866(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(5572);const i=function(t,e){return(0,n.A)(e,function(e){return t[e]})};var a=r(7422);const o=function(t){return null==t?[]:i(t,(0,a.A)(t))}},9557(t,e,r){"use strict";r.d(e,{diagram:()=>Z});var n=r(594),i=r(1240),a=r(5871),o=r(8221),s=r(1123),l=r(797),c=r(8731),h=r(165),u=r(6527),d=r(1444),p={L:"left",R:"right",T:"top",B:"bottom"},f={L:(0,l.K2)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,l.K2)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,l.K2)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,l.K2)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},g={L:(0,l.K2)((t,e)=>t-e+2,"L"),R:(0,l.K2)((t,e)=>t-2,"R"),T:(0,l.K2)((t,e)=>t-e+2,"T"),B:(0,l.K2)((t,e)=>t-2,"B")},m=(0,l.K2)(function(t){return v(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),y=(0,l.K2)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),v=(0,l.K2)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),b=(0,l.K2)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),x=(0,l.K2)(function(t,e){const r=v(t)&&b(e),n=b(t)&&v(e);return r||n},"isArchitectureDirectionXY"),T=(0,l.K2)(function(t){const e=t[0],r=t[1],n=v(e)&&b(r),i=b(e)&&v(r);return n||i},"isArchitecturePairXY"),w=(0,l.K2)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),k=(0,l.K2)(function(t,e){const r=`${t}${e}`;return w(r)?r:void 0},"getArchitectureDirectionPair"),C=(0,l.K2)(function([t,e],r){const n=r[0],i=r[1];return v(n)?b(i)?[t+("L"===n?-1:1),e+("T"===i?1:-1)]:[t+("L"===n?-1:1),e]:v(i)?[t+("L"===i?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),E=(0,l.K2)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),S=(0,l.K2)(function(t,e){return x(t,e)?"bend":v(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),_=(0,l.K2)(function(t){return"service"===t.type},"isArchitectureService"),A=(0,l.K2)(function(t){return"junction"===t.type},"isArchitectureJunction"),R=(0,l.K2)(t=>t.data(),"edgeData"),L=(0,l.K2)(t=>t.data(),"nodeData"),I=s.UI.architecture,D=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=s.SV,this.getAccTitle=s.iN,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.getAccDescription=s.m7,this.setAccDescription=s.EI,this.clear()}static{(0,l.K2)(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,s.IU)()}addService({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==this.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[r])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(_)}addJunction({id:t,in:e}){if(void 0!==this.registeredIds[t])throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==e){if(t===e)throw new Error(`The junction [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(A)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:r,title:n}){if(void 0!==this.registeredIds?.[t])throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===this.registeredIds?.[r])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[r])throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:l}){if(!y(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(r)}`);if(!y(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const c=this.nodes[t].in,h=this.nodes[e].in;if(o&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const u={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:o,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:s,title:l};this.edges.push(u),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){const t={},e=Object.entries(this.nodes).reduce((e,[r,n])=>(e[r]=n.edges.reduce((e,n)=>{const i=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(i&&a&&i!==a){const e=S(n.lhsDir,n.rhsDir);"bend"!==e&&(t[i]??={},t[i][a]=e,t[a]??={},t[a][i]=e)}if(n.lhsId===r){const t=k(n.lhsDir,n.rhsDir);t&&(e[t]=n.rhsId)}else{const t=k(n.rhsDir,n.lhsDir);t&&(e[t]=n.lhsId)}return e},{}),e),{}),r=Object.keys(e)[0],n={[r]:1},i=Object.keys(e).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),a=(0,l.K2)(t=>{const r={[t]:[0,0]},a=[t];for(;a.length>0;){const t=a.shift();if(t){n[t]=1,delete i[t];const o=e[t],[s,l]=r[t];Object.entries(o).forEach(([t,e])=>{n[e]||(r[e]=C([s,l],t),a.push(e))})}}return r},"BFS"),o=[a(r)];for(;Object.keys(i).length>0;)o.push(a(Object.keys(i)[0]));this.dataStructures={adjList:e,spatialMaps:o,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return(0,o.$t)({...I,...(0,s.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},N=(0,l.K2)((t,e)=>{(0,a.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),M={parser:{yy:void 0},parse:(0,l.K2)(async t=>{const e=await(0,c.qg)("architecture",t);l.Rm.debug(e);const r=M.parser?.yy;if(!(r instanceof D))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");N(e,r)},"parse")},O=(0,l.K2)(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),$=(0,l.K2)(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),P={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:$('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:$('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:$('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:$('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:$('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:i.Gc,blank:{body:$("")}}},B=(0,l.K2)(async function(t,e,r,n){const a=r.getConfigField("padding"),l=r.getConfigField("iconSize"),c=l/2,h=l/6,u=h/2;await Promise.all(e.edges().map(async e=>{const{source:l,sourceDir:d,sourceArrow:p,sourceGroup:m,target:y,targetDir:w,targetArrow:C,targetGroup:S,label:_}=R(e);let{x:A,y:L}=e[0].sourceEndpoint();const{x:I,y:D}=e[0].midpoint();let{x:N,y:M}=e[0].targetEndpoint();const O=a+4;if(m&&(v(d)?A+="L"===d?-O:O:L+="T"===d?-O:O+18),S&&(v(w)?N+="L"===w?-O:O:M+="T"===w?-O:O+18),m||"junction"!==r.getNode(l)?.type||(v(d)?A+="L"===d?c:-c:L+="T"===d?c:-c),S||"junction"!==r.getNode(y)?.type||(v(w)?N+="L"===w?c:-c:M+="T"===w?c:-c),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${A},${L} L ${I},${D} L${N},${M} `).attr("class","edge").attr("id",`${n}-${(0,o.rY)(l,y,{prefix:"L"})}`),p){const t=v(d)?g[d](A,h):A-u,r=b(d)?g[d](L,h):L-u;e.insert("polygon").attr("points",f[d](h)).attr("transform",`translate(${t},${r})`).attr("class","arrow")}if(C){const t=v(w)?g[w](N,h):N-u,r=b(w)?g[w](M,h):M-u;e.insert("polygon").attr("points",f[w](h)).attr("transform",`translate(${t},${r})`).attr("class","arrow")}if(_){const t=x(d,w)?"XY":v(d)?"X":"Y";let r=0;r="X"===t?Math.abs(A-N):"Y"===t?Math.abs(L-M)/1.5:Math.abs(A-N)/2;const n=e.append("g");if(await(0,i.GZ)(n,_,{useHtmlLabels:!1,width:r,classes:"architecture-service-label"},(0,s.D7)()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)n.attr("transform","translate("+I+", "+D+")");else if("Y"===t)n.attr("transform","translate("+I+", "+D+") rotate(-90)");else if("XY"===t){const t=k(d,w);if(t&&T(t)){const e=n.node().getBoundingClientRect(),[r,i]=E(t);n.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*r*i*45})`);const a=n.node().getBoundingClientRect();n.attr("transform",`\n translate(${I}, ${D-e.height/2})\n translate(${r*a.width/2}, ${i*a.height/2})\n rotate(${-1*r*i*45}, 0, ${e.height/2})\n `)}}}}}))},"drawEdges"),F=(0,l.K2)(async function(t,e,r,n){const a=.75*r.getConfigField("padding"),o=r.getConfigField("fontSize"),l=r.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async e=>{const c=L(e);if("group"===c.type){const{h,w:u,x1:d,y1:p}=e.boundingBox(),f=t.append("rect");f.attr("id",`${n}-group-${c.id}`).attr("x",d+l).attr("y",p+l).attr("width",u).attr("height",h).attr("class","node-bkg");const g=t.append("g");let m=d,y=p;if(c.icon){const t=g.append("g");t.html(`<g>${await(0,i.WY)(c.icon,{height:a,width:a,fallbackPrefix:P.prefix})}</g>`),t.attr("transform","translate("+(m+l+1)+", "+(y+l+1)+")"),m+=a,y+=o/2-1-2}if(c.label){const t=g.append("g");await(0,i.GZ)(t,c.label,{useHtmlLabels:!1,width:u,classes:"architecture-service-label"},(0,s.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(m+l+4)+", "+(y+l+2)+")")}r.setElementForId(c.id,f)}}))},"drawGroups"),z=(0,l.K2)(async function(t,e,r,n){const a=(0,s.D7)();for(const o of r){const r=e.append("g"),l=t.getConfigField("iconSize");if(o.title){const t=r.append("g");await(0,i.GZ)(t,o.title,{useHtmlLabels:!1,width:1.5*l,classes:"architecture-service-label"},a),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+l/2+", "+l+")")}const c=r.append("g");if(o.icon)c.html(`<g>${await(0,i.WY)(o.icon,{height:l,width:l,fallbackPrefix:P.prefix})}</g>`);else if(o.iconText){c.html(`<g>${await(0,i.WY)("blank",{height:l,width:l,fallbackPrefix:P.prefix})}</g>`);const t=c.append("g").append("foreignObject").attr("width",l).attr("height",l).append("div").attr("class","node-icon-text").attr("style",`height: ${l}px;`).append("div").html((0,s.jZ)(o.iconText,a)),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((l-2)/e)};`)}else c.append("path").attr("class","node-bkg").attr("id",`${n}-node-${o.id}`).attr("d",`M0,${l} V5 Q0,0 5,0 H${l-5} Q${l},0 ${l},5 V${l} Z`);r.attr("id",`${n}-service-${o.id}`).attr("class","architecture-service");const{width:h,height:u}=r.node().getBBox();o.width=h,o.height=u,t.setElementForId(o.id,r)}return 0},"drawServices"),K=(0,l.K2)(function(t,e,r,n){r.forEach(r=>{const i=e.append("g"),a=t.getConfigField("iconSize");i.append("g").append("rect").attr("id",`${n}-node-${r.id}`).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");const{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,t.setElementForId(r.id,i)})},"drawJunctions");function j(t,e,r){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function q(t,e,r){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function W(t,e){e.nodes().map(e=>{const r=L(e);if("group"===r.type)return;r.x=e.position().x,r.y=e.position().y;t.getElementById(r.id).attr("transform","translate("+(r.x||0)+","+(r.y||0)+")")})}function U(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function G(t,e){t.forEach(t=>{const{lhsId:r,rhsId:n,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:l,rhsGroup:c,title:h}=t,u=x(t.lhsDir,t.rhsDir)?"segments":"straight",d={id:`${r}-${n}`,label:h,source:r,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:n,targetDir:l,targetArrow:o,targetGroup:c,targetEndpoint:"L"===l?"0 50%":"R"===l?"100% 50%":"T"===l?"50% 0":"50% 100%"};e.add({group:"edges",data:d,classes:u})})}function Y(t,e,r){const n=(0,l.K2)((t,e)=>Object.entries(t).reduce((t,[n,i])=>{let a=0;const o=Object.entries(i);if(1===o.length)return t[n]=o[0][1],t;for(let s=0;s<o.length-1;s++)for(let i=s+1;i<o.length;i++){const[l,c]=o[s],[h,u]=o[i],d=r[l]?.[h];if(d===e)t[n]??=[],t[n]=[...t[n],...c,...u];else if("default"===l||"default"===h)t[n]??=[],t[n]=[...t[n],...c,...u];else{t[`${n}-${a++}`]=c;t[`${n}-${a++}`]=u}}return t},{}),"flattenAlignments"),i=e.map(e=>{const r={},i={};return Object.entries(e).forEach(([e,[n,a]])=>{const o=t.getNode(e)?.in??"default";r[a]??={},r[a][o]??=[],r[a][o].push(e),i[n]??={},i[n][o]??=[],i[n][o].push(e)}),{horiz:Object.values(n(r,"horizontal")).filter(t=>t.length>1),vert:Object.values(n(i,"vertical")).filter(t=>t.length>1)}}),[a,o]=i.reduce(([t,e],{horiz:r,vert:n})=>[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:a,vertical:o}}function V(t,e){const r=[],n=(0,l.K2)(t=>`${t[0]},${t[1]}`,"posToStr"),i=(0,l.K2)(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{const a=Object.fromEntries(Object.entries(t).map(([t,e])=>[n(e),t])),o=[n([0,0])],s={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){const t=o.shift();if(t){s[t]=1;const c=a[t];if(c){const h=i(t);Object.entries(l).forEach(([t,i])=>{const l=n([h[0]+i[0],h[1]+i[1]]),u=a[l];u&&!s[l]&&(o.push(l),r.push({[p[t]]:u,[p[m(t)]]:c,gap:1.5*e.getConfigField("iconSize")}))})}}}}),r}function H(t,e,r,n,i,{spatialMaps:a,groupAlignments:o}){return new Promise(s=>{const c=(0,d.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),u=(0,h.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${i.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});c.remove(),U(r,u),j(t,u,i),q(e,u,i),G(n,u);const p=Y(i,a,o),f=V(a,i),g=i.getConfigField("iconSize"),m=i.getConfigField("idealEdgeLengthMultiplier")*g,y=.5*g,v=i.getConfigField("edgeElasticity"),x=u.layout({name:"fcose",quality:"proof",randomize:i.getConfigField("randomize"),nodeSeparation:i.getConfigField("nodeSeparation"),numIter:i.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,r]=t.connectedNodes(),{parent:n}=L(e),{parent:i}=L(r);return n===i?m:y},edgeElasticity(t){const[e,r]=t.connectedNodes(),{parent:n}=L(e),{parent:i}=L(r);return n===i?v:.001},alignmentConstraint:p,relativePlacementConstraint:f});x.one("layoutstop",()=>{function t(t,e,r,n){let i,a;const{x:o,y:s}=t,{x:l,y:c}=e;a=(n-s+(o-r)*(s-c)/(o-l))/Math.sqrt(1+Math.pow((s-c)/(o-l),2)),i=Math.sqrt(Math.pow(n-s,2)+Math.pow(r-o,2)-Math.pow(a,2));i/=Math.sqrt(Math.pow(l-o,2)+Math.pow(c-s,2));let h=(l-o)*(n-s)-(c-s)*(r-o);switch(!0){case h>=0:h=1;break;case h<0:h=-1}let u=(l-o)*(r-o)+(c-s)*(n-s);switch(!0){case u>=0:u=1;break;case u<0:u=-1}return a=Math.abs(a)*h,i*=u,{distances:a,weights:i}}(0,l.K2)(t,"getSegmentWeights"),u.startBatch();for(const e of Object.values(u.edges()))if(e.data?.()){const{x:r,y:n}=e.source().position(),{x:i,y:a}=e.target().position();if(r!==i&&n!==a){const r=e.sourceEndpoint(),n=e.targetEndpoint(),{sourceDir:i}=R(e),[a,o]=b(i)?[r.x,n.y]:[n.x,r.y],{weights:s,distances:l}=t(r,n,a,o);e.style("segment-distances",l),e.style("segment-weights",s)}}u.endBatch(),x.run()}),x.run(),u.ready(t=>{l.Rm.info("Ready",t),s(u)})})}(0,i.pC)([{name:P.prefix,icons:P}]),h.A.use(u),(0,l.K2)(j,"addServices"),(0,l.K2)(q,"addJunctions"),(0,l.K2)(W,"positionNodes"),(0,l.K2)(U,"addGroups"),(0,l.K2)(G,"addEdges"),(0,l.K2)(Y,"getAlignments"),(0,l.K2)(V,"getRelativeConstraints"),(0,l.K2)(H,"layoutArchitecture");var X={draw:(0,l.K2)(async(t,e,r,i)=>{const a=i.db;a.setDiagramId(e);const o=a.getServices(),l=a.getJunctions(),c=a.getGroups(),h=a.getEdges(),u=a.getDataStructures(),d=(0,n.D)(e),p=d.append("g");p.attr("class","architecture-edges");const f=d.append("g");f.attr("class","architecture-services");const g=d.append("g");g.attr("class","architecture-groups"),await z(a,f,o,e),K(a,f,l,e);const m=await H(o,l,c,h,a,u);await B(p,m,a,e),await F(g,m,a,e),W(a,m),(0,s.ot)(void 0,d,a.getConfigField("padding"),a.getConfigField("useMaxWidth"))},"draw")},Z={parser:M,get db(){return new D},renderer:X,styles:O}},8607(t,e,r){"use strict";r.d(e,{diagram:()=>Re});var n=r(2501),i=r(1334),a=r(5105),o=r(1240),s=r(8221),l=r(1123),c=r(797),h=r(7110),u=r(9125),d=r(9826);var p=r(9663);function f(t){if((0,h.s)(t))return t;const e=(0,u.b)(t);if(!function(t){switch((0,u.b)(t)){case d.R_:case d.Uw:case d.cT:case d.iq:case d.$V:case d.vC:case d.ri:case d.ML:case d.XZ:case d.i1:case d._u:case d.pj:case d.kj:case d.GX:case d.Av:case d.NA:case d.OG:case d.VP:case d.Qb:case d.q:case d.x6:case d.ZR:return!0;default:return!1}}(t))return{};if(r=t,Array.isArray(r)){const e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}var r;if((0,p.i)(t)){const e=t;return new(0,e.constructor)(e.buffer,e.byteOffset,e.length)}if(e===d.cT)return new ArrayBuffer(t.byteLength);if(e===d.iq){const e=t,r=e.buffer,n=e.byteOffset,i=e.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(r,n,i);return new Uint8Array(a).set(o),new DataView(a)}if(e===d.$V||e===d.kj||e===d.OG){const r=new(0,t.constructor)(t.valueOf());return e===d.OG?function(t,e){const r=e.valueOf().length;for(const n in e)Object.hasOwn(e,n)&&(Number.isNaN(Number(n))||Number(n)>=r)&&(t[n]=e[n])}(r,t):g(r,t),r}if(e===d.vC)return new Date(Number(t));if(e===d.Av){const e=t,r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,r}if(e===d.VP)return Object(Symbol.prototype.valueOf.call(t));if(e===d.pj){const e=t,r=new Map;return e.forEach((t,e)=>{r.set(e,t)}),r}if(e===d.NA){const e=t,r=new Set;return e.forEach(t=>{r.add(t)}),r}if(e===d.R_){const e=t,r={};return g(r,e),r.length=e.length,r[Symbol.iterator]=e[Symbol.iterator],r}const n={};return function(t,e){const r=Object.getPrototypeOf(e);if(null!==r){"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}}(n,t),g(n,t),function(t,e){const r=Object.getOwnPropertySymbols(e);for(let n=0;n<r.length;n++){const i=r[n];Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}}(n,t),n}function g(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}var m=r(5937),y=r(5582),v=r(1444),b=r(697),x=function(){var t=(0,c.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],o=[1,16],s=[1,17],l=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],f=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],y={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,c.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[s-1]),n.setHierarchy(a[s-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[s]),"number"==typeof a[s].length?this.$=a[s]:this.$=[a[s]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:n.getLogger().debug("Rule: link: ",a[s],t),this.$={edgeTypeStr:a[s],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:const e=parseInt(a[s]),r=n.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[s-2],a[s-1],a[s]," typestr: ",a[s-1].edgeTypeStr);const i=n.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=n.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),l=n.edgeStrToThickness(a[s-1].edgeTypeStr),c=n.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+"-"+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:"edge",thickness:l,pattern:c,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:n.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:n.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[s]),this.$={id:a[s].id,label:a[s].label,type:n.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this?this:"na"),n.getLogger().debug("COLUMNS: ",a[s]),this.$={type:"column-setting",columns:"auto"===a[s]?-1:parseInt(a[s])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[s-2],a[s-1]);n.generateId();this.$={...a[s-2],type:"composite",children:a[s-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[s-2],a[s-1],a[s]);const h=n.generateId();this.$={id:h,type:"composite",label:"",children:a[s-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[s]),this.$={id:a[s]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",a[s]),this.$=[a[s]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[s-3],a[s-2]," #3:",a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:"classDef",id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:"applyClass",id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:"applyStyles",id:a[s-1].trim(),stylesStr:a[s].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:s,46:l},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:n,29:i,31:a,39:o,43:s,46:l}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(f,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,31:a},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:s,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},t(f,[2,24]),{10:e,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:s,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(f,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(u,[2,27]),t(g,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",l=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,c.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,s=p.yytext,l=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,h,l,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(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,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,r,n){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function b(){this.yy={}}return y.lexer=v,(0,c.K2)(b,"Parser"),b.prototype=y,y.Parser=b,new b}();x.parser=x;var T=x,w=new Map,k=[],C=new Map,E="color",S="fill",_=(0,l.D7)(),A=new Map,R="",L=(0,c.K2)(t=>l.Y2.sanitizeText(t,_),"sanitizeText"),I=(0,c.K2)(function(t,e=""){let r=A.get(t);r||(r={id:t,styles:[],textStyles:[]},A.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(E).exec(t)){const t=e.replace(S,"bgFill").replace(E,S);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),D=(0,c.K2)(function(t,e=""){const r=w.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),N=(0,c.K2)(function(t,e){t.split(",").forEach(function(t){let r=w.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},w.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),M=(0,c.K2)((t,e)=>{const r=t.flat(),n=[],i=r.find(t=>"column-setting"===t?.type),a=i?.columns??-1;for(const o of r)if("number"==typeof a&&a>0&&"column-setting"!==o.type&&"number"==typeof o.widthInColumns&&o.widthInColumns>a&&c.Rm.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${a}`),o.label&&(o.label=L(o.label)),"classDef"!==o.type)if("applyClass"!==o.type)if("applyStyles"!==o.type)if("column-setting"===o.type)e.columns=o.columns??-1;else if("edge"===o.type){const t=(C.get(o.id)??0)+1;C.set(o.id,t),o.id=t+"-"+o.id,k.push(o)}else{o.label||("composite"===o.type?o.label="":o.label=o.id);const t=w.get(o.id);if(void 0===t?w.set(o.id,o):("na"!==o.type&&(t.type=o.type),o.label!==o.id&&(t.label=o.label)),o.children&&M(o.children,o),"space"===o.type){const t=o.width??1;for(let e=0;e<t;e++){const t=f(o);t.id=t.id+"-"+e,w.set(t.id,t),n.push(t)}}else void 0===t&&n.push(o)}else o?.stylesStr&&D(o.id,o?.stylesStr);else N(o.id,o?.styleClass??"");else I(o.id,o.css);e.children=n},"populateBlockDatabase"),O=[],$={id:"root",type:"composite",children:[],columns:-1},P=(0,c.K2)(()=>{c.Rm.debug("Clear called"),(0,l.IU)(),$={id:"root",type:"composite",children:[],columns:-1},w=new Map([["root",$]]),O=[],A=new Map,k=[],C=new Map,R=""},"clear");function B(t){switch(c.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function F(t){return c.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function z(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function K(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function j(t){return t.includes("==")?"thick":"normal"}function q(t){return t.includes(".-")?"dotted":"solid"}(0,c.K2)(B,"typeStr2Type"),(0,c.K2)(F,"edgeTypeStr2Type"),(0,c.K2)(z,"edgeStrToEdgeData"),(0,c.K2)(K,"edgeStrToEdgeStartData"),(0,c.K2)(j,"edgeStrToThickness"),(0,c.K2)(q,"edgeStrToPattern");var W=0,U=(0,c.K2)(()=>(W++,"id-"+Math.random().toString(36).substr(2,12)+"-"+W),"generateId"),G=(0,c.K2)(t=>{$.children=t,M(t,$),O=$.children},"setHierarchy"),Y=(0,c.K2)(t=>{const e=w.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),V=(0,c.K2)(()=>[...w.values()],"getBlocksFlat"),H=(0,c.K2)(()=>O||[],"getBlocks"),X=(0,c.K2)(()=>k,"getEdges"),Z=(0,c.K2)(t=>w.get(t),"getBlock"),Q=(0,c.K2)(t=>{w.set(t.id,t)},"setBlock"),J=(0,c.K2)(t=>{R=t},"setDiagramId"),tt=(0,c.K2)(()=>R,"getDiagramId"),et=(0,c.K2)(()=>c.Rm,"getLogger"),rt=(0,c.K2)(function(){return A},"getClasses"),nt={getConfig:(0,c.K2)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:B,edgeTypeStr2Type:F,edgeStrToEdgeData:z,edgeStrToEdgeStartData:K,edgeStrToThickness:j,edgeStrToPattern:q,getLogger:et,getBlocksFlat:V,getBlocks:H,getEdges:X,setHierarchy:G,getBlock:Z,setBlock:Q,getColumns:Y,getClasses:rt,clear:P,generateId:U,setDiagramId:J,getDiagramId:tt},it=(0,c.K2)((t,e)=>{const r=m.A,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return y.A(n,i,a,e)},"fade"),at=(0,c.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${it(t.mainBkg,.5)};\n fill: ${it(t.clusterBkg,.5)};\n stroke: ${it(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${(0,n.o)()}\n`,"getStyles"),ot=(0,c.K2)((t,e,r,n)=>{e.forEach(e=>{st[e](t,r,n)})},"insertMarkers"),st={extension:(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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")},"circle"),cross:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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")},"cross"),barb:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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")},"barb")},lt=ot,ct=(0,l.D7)()?.block?.padding??8;function ht(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,c.K2)(ht,"calculateBlockPosition");var ut=(0,c.K2)(t=>{let e=0,r=0;for(const n of t.children){const{width:t,height:i,x:a,y:o}=n.size??{width:0,height:0,x:0,y:0};if(c.Rm.debug("getMaxChildSize abc95 child:",n.id,"width:",t,"height:",i,"x:",a,"y:",o,n.type),"space"===n.type)continue;const s=t/(n.widthInColumns??1);s>e&&(e=s),i>r&&(r=i)}return{width:e,height:r}},"getMaxChildSize");function dt(t,e,r=0,n=0){c.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(const r of t.children)dt(r,e);const o=ut(t);i=o.width,a=o.height,c.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(const e of t.children)e.size&&(c.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${a} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+ct*((e.widthInColumns??1)-1),e.size.height=a,e.size.x=0,e.size.y=0,c.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${a}`));for(const r of t.children)dt(r,e,i,a);const s=t.columns??-1;let l=0;for(const e of t.children)l+=e.widthInColumns??1;let h=t.children.length;s>0&&s<l&&(h=s);const u=Math.ceil(l/h);let d=h*(i+ct)+ct,p=u*(a+ct)+ct;if(d<r){c.Rm.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${n} width ${d}`),d=r,p=n;const e=(r-h*ct-ct)/h,o=(n-u*ct-ct)/u;c.Rm.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",i),c.Rm.debug("Size indata abc88",t.id,"childHeight",o,"maxHeight",a),c.Rm.debug("Size indata abc88 xSize",h,"padding",ct);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=o,r.size.x=0,r.size.y=0)}if(c.Rm.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${u} columns ${s}${t.children.length} width=${Math.max(d,t.size?.width||0)}`),d<(t?.size?.width||0)){d=t?.size?.width||0;const e=s>0?Math.min(t.children.length,s):t.children.length;if(e>0){const r=(d-e*ct-ct)/e;c.Rm.debug("abc95 (growing to fit) width",t.id,d,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:d,height:p,x:0,y:0}}c.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function pt(t,e){c.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const r=t.columns??-1;if(c.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){const n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*ct;c.Rm.debug("widthOfChildren 88",i,"posX");const a=new Map;{let e=0;for(const n of t.children){if(!n.size)continue;const{py:t}=ht(r,e),i=a.get(t)??0;n.size.height>i&&a.set(t,n.size.height);let o=n?.widthInColumns??1;r>0&&(o=Math.min(o,r-e%r)),e+=o}}const o=new Map;{let t=0;const e=[...a.keys()].sort((t,e)=>t-e);for(const r of e)o.set(r,t),t+=(a.get(r)??0)+ct}let s=0;c.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-ct,h=0;for(const u of t.children){const n=t;if(!u.size)continue;const{width:i,height:d}=u.size,{px:p,py:f}=ht(r,s);if(f!=h&&(h=f,l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-ct,c.Rm.debug("New row in layout for block",t.id," and child ",u.id,h)),c.Rm.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${s} (px, py) ${p},${f} (${n?.size?.x},${n?.size?.y}) parent: ${n.id} width: ${i}${ct}`),n.size){const t=i/2;u.size.x=l+ct+t,c.Rm.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${l} new startingPosX${u.size.x} ${t} padding=${ct} width=${i} halfWidth=${t} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${i*(u?.widthInColumns??1)/2}`),l=u.size.x+t;const e=o.get(f)??0,r=a.get(f)??d;u.size.y=n.size.y-n.size.height/2+e+r/2+ct,c.Rm.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${l}${ct}${t}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${i*(u?.widthInColumns??1)/2}`)}u.children&&pt(u,e);let g=u?.widthInColumns??1;r>0&&(g=Math.min(g,r-s%r)),s+=g,c.Rm.debug("abc88 columnsPos",u,s)}}c.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function ft(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:a,y:o,width:s,height:l}=t.size;a-s/2<e&&(e=a-s/2),o-l/2<r&&(r=o-l/2),a+s/2>n&&(n=a+s/2),o+l/2>i&&(i=o+l/2)}if(t.children)for(const a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=ft(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function gt(t){const e=t.getBlock("root");if(!e)return;dt(e,t,0,0),pt(e,t),c.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=ft(e);return{x:r,y:n,width:i-r,height:a-n}}(0,c.K2)(dt,"setBlockSizes"),(0,c.K2)(pt,"layoutBlocks"),(0,c.K2)(ft,"findBounds"),(0,c.K2)(gt,"layout");var mt=(0,c.K2)(async(t,e,r,n=!1,i=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const s=(0,l.D7)(),c=(0,l.E)(s);return await(0,o.GZ)(t,a,{style:r,isTitle:n,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},s)},"createLabel"),yt=(0,c.K2)((t,e,r,n,i)=>{e.arrowTypeStart&&bt(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&bt(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),vt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},bt=(0,c.K2)((t,e,r,n,i,a)=>{const o=vt[r];if(!o)return void c.Rm.warn(`Unknown arrow type: ${r}`);const s="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${o}${s})`)},"addEdgeMarker"),xt={},Tt={},wt=(0,c.K2)(async(t,e)=>{const r=(0,l.D7)(),n=(0,l.E)(r),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label"),c="markdown"===e.labelType,h=await(0,o.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:c,isNode:!1,markdown:c,width:c?void 0:Number.POSITIVE_INFINITY},r);s.node().appendChild(h);let u,d=h.getBBox(),p=d;if(n){const t=h.children[0],e=(0,v.Ltv)(h);d=t.getBoundingClientRect(),p=d,e.attr("width",d.width),e.attr("height",d.height)}else{const t=(0,v.Ltv)(h).select("text").node();t&&"function"==typeof t.getBBox&&(p=t.getBBox())}if(s.attr("transform",(0,i.Wg)(p,n)),xt[e.id]=a,e.width=d.width,e.height=d.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),o=await mt(a,e.startLabelLeft,e.labelStyle);u=o;let s=o.getBBox();if(n){const t=o.children[0],e=(0,v.Ltv)(o);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}a.attr("transform",(0,i.Wg)(s,n)),Tt[e.id]||(Tt[e.id]={}),Tt[e.id].startLeft=r,kt(u,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),o=await mt(a,e.startLabelRight,e.labelStyle);u=o;let s=o.getBBox();if(n){const t=o.children[0],e=(0,v.Ltv)(o);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}a.attr("transform",(0,i.Wg)(s,n)),Tt[e.id]||(Tt[e.id]={}),Tt[e.id].startRight=r,kt(u,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),o=await mt(r,e.endLabelLeft,e.labelStyle);u=o;let s=o.getBBox();if(n){const t=o.children[0],e=(0,v.Ltv)(o);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}a.attr("transform",(0,i.Wg)(s,n)),Tt[e.id]||(Tt[e.id]={}),Tt[e.id].endLeft=r,kt(u,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),o=await mt(r,e.endLabelRight,e.labelStyle);u=o;let s=o.getBBox();if(n){const t=o.children[0],e=(0,v.Ltv)(o);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}a.attr("transform",(0,i.Wg)(s,n)),Tt[e.id]||(Tt[e.id]={}),Tt[e.id].endRight=r,kt(u,e.endLabelRight)}return h},"insertEdgeLabel");function kt(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(kt,"setTerminalWidth");var Ct=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,xt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(n);if(t.label){const n=xt[t.id];let a=t.x,o=t.y;if(r){const n=s._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",a,",",o,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(a=n.x,o=n.y)}n.attr("transform",`translate(${a}, ${o+i/2})`)}if(t.startLabelLeft){const e=Tt[t.id].startLeft;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=Tt[t.id].startRight;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=Tt[t.id].endLeft;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=Tt[t.id].endRight;let n=t.x,i=t.y;if(r){const e=s._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),Et=(0,c.K2)((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,s=t.height/2;return i>=o||a>=s},"outsideNode"),St=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),o=t.width/2;let s=r.x<e.x?o-a:o+a;const l=t.height/2,h=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*o>Math.abs(n-e.x)*l){let t=r.y<e.y?e.y-l-i:i-l-e.y;s=u*t/h;const n={x:r.x<e.x?r.x+s:r.x-u+s,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===s&&(n.x=e.x,n.y=e.y),0===u&&(n.x=e.x),0===h&&(n.y=e.y),c.Rm.debug(`abc89 topp/bott calc, Q ${h}, q ${t}, R ${u}, r ${s}`,n),n}{s=r.x<e.x?e.x-o-n:n-o-e.x;let t=h*s/u,i=r.x<e.x?r.x+u-s:r.x-u+s,a=r.y<e.y?r.y+t:r.y-t;return c.Rm.debug(`sides calc abc89, Q ${h}, q ${t}, R ${u}, r ${s}`,{_x:i,_y:a}),0===s&&(i=e.x,a=e.y),0===u&&(i=e.x),0===h&&(a=e.y),{x:i,y:a}}},"intersection"),_t=(0,c.K2)((t,e)=>{c.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(t=>{if(Et(e,t)||i)n=t,i||r.push(t);else{const a=St(e,n,t);let o=!1;r.forEach(t=>{o=o||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)||r.push(a),i=!0}}),r},"cutPathAtIntersect"),At=(0,c.K2)(function(t,e,r,n,a,o,s){let h=r.points;c.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let u=!1;const d=o.node(e.v);var p=o.node(e.w);p?.intersect&&d?.intersect&&(h=h.slice(1,r.points.length-1),h.unshift(d.intersect(h[0])),h.push(p.intersect(h[h.length-1]))),r.toCluster&&(c.Rm.debug("to cluster abc88",n[r.toCluster]),h=_t(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(c.Rm.debug("from cluster abc88",n[r.fromCluster]),h=_t(h.reverse(),n[r.fromCluster].node).reverse(),u=!0);const f=h.filter(t=>!Number.isNaN(t.y));let g=v.qrM;!r.curve||"graph"!==a&&"flowchart"!==a||(g=r.curve);const{x:m,y}=(0,i.RI)(r),b=(0,v.n8j)().x(m).y(y).curve(g);let x;switch(r.thickness){case"normal":x="edge-thickness-normal";break;case"thick":case"invisible":x="edge-thickness-thick";break;default:x=""}switch(r.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}const T=t.append("path").attr("d",b(f)).attr("id",r.id).attr("class"," "+x+(r.classes?" "+r.classes:"")).attr("style",r.style);let w="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(w=(0,l.ID)(!0)),yt(T,r,w,s,a);let k={};return u&&(k.updatedPath=h),k.originalPath=r.points,k},"insertEdge"),Rt=(0,c.K2)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Lt=(0,c.K2)((t,e,r,n)=>{const i=Rt(t),a=e.height+2*r.padding,o=a/2,s=n??e.width+2*o+r.padding,l=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:o,y:0},{x:s/2,y:2*l},{x:s-o,y:0},{x:s,y:0},{x:s,y:-a/3},{x:s+2*l,y:-a/2},{x:s,y:-2*a/3},{x:s,y:-a},{x:s-o,y:-a},{x:s/2,y:-a-2*l},{x:o,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*l,y:-a/2},{x:0,y:-a/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:o,y:-a},{x:s-o,y:-a},{x:s,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:s,y:0},{x:0,y:-o},{x:0,y:-a+o},{x:s,y:-a}]:i.has("right")&&i.has("left")?[{x:o,y:0},{x:o,y:-l},{x:s-o,y:-l},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+l},{x:o,y:-a+l},{x:o,y:-a},{x:0,y:-a/2}]:i.has("up")&&i.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:o,y:-l},{x:o,y:-a+l},{x:0,y:-a+l},{x:s/2,y:-a},{x:s,y:-a+l},{x:s-o,y:-a+l},{x:s-o,y:-l},{x:s,y:-l}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:s,y:-o},{x:0,y:-a}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-a}]:i.has("left")&&i.has("up")?[{x:s,y:0},{x:0,y:-o},{x:s,y:-a}]:i.has("left")&&i.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-a}]:i.has("right")?[{x:o,y:-l},{x:o,y:-l},{x:s-o,y:-l},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+l},{x:o,y:-a+l},{x:o,y:-a+l}]:i.has("left")?[{x:o,y:0},{x:o,y:-l},{x:s-o,y:-l},{x:s-o,y:-a+l},{x:o,y:-a+l},{x:o,y:-a},{x:0,y:-a/2}]:i.has("up")?[{x:o,y:-l},{x:o,y:-a+l},{x:0,y:-a+l},{x:s/2,y:-a},{x:s,y:-a+l},{x:s-o,y:-a+l},{x:s-o,y:-l}]:i.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:o,y:-l},{x:o,y:-a+l},{x:s-o,y:-a+l},{x:s-o,y:-l},{x:s,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function It(t,e){return t.intersect(e)}(0,c.K2)(It,"intersectNode");var Dt=It;function Nt(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,s=a-n.y,l=Math.sqrt(e*e*s*s+r*r*o*o),c=Math.abs(e*r*o/l);n.x<i&&(c=-c);var h=Math.abs(e*r*s/l);return n.y<a&&(h=-h),{x:i+c,y:a+h}}(0,c.K2)(Nt,"intersectEllipse");var Mt=Nt;function Ot(t,e,r){return Mt(t,e,e,r)}(0,c.K2)(Ot,"intersectCircle");var $t=Ot;function Pt(t,e,r,n){var i,a,o,s,l,c,h,u,d,p,f,g,m;if(i=e.y-t.y,o=t.x-e.x,l=e.x*t.y-t.x*e.y,d=i*r.x+o*r.y+l,p=i*n.x+o*n.y+l,!(0!==d&&0!==p&&Bt(d,p)||(a=n.y-r.y,s=r.x-n.x,c=n.x*r.y-r.x*n.y,h=a*t.x+s*t.y+c,u=a*e.x+s*e.y+c,0!==h&&0!==u&&Bt(h,u)||0===(f=i*s-a*o))))return g=Math.abs(f/2),{x:(m=o*c-s*l)<0?(m-g)/f:(m+g)/f,y:(m=a*l-i*c)<0?(m-g)/f:(m+g)/f}}function Bt(t,e){return t*e>0}(0,c.K2)(Pt,"intersectLine"),(0,c.K2)(Bt,"sameSign");var Ft=Pt,zt=Kt;function Kt(t,e,r){var n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var l=n-t.width/2-o,c=i-t.height/2-s,h=0;h<e.length;h++){var u=e[h],d=e[h<e.length-1?h+1:0],p=Ft(t,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(t,e){var n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return a<l?-1:a===l?0:1}),a[0]):t}(0,c.K2)(Kt,"intersectPolygon");var jt={node:Dt,circle:$t,ellipse:Mt,polygon:zt,rect:(0,c.K2)((t,e)=>{var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),r=0===s?0:c*o/s,n=c):(o<0&&(l=-l),r=l,n=0===o?0:l*s/o),{x:i+r,y:a+n}},"intersectRect")},qt=(0,c.K2)(async(t,e,r,n)=>{const i=(0,l.D7)();let c;const h=e.useHtmlLabels||(0,l.E)(i);c=r||"node default";const u=t.insert("g").attr("class",c).attr("id",e.domId||e.id),d=u.insert("g").attr("class","label").attr("style",e.labelStyle);let p,f;p=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],f="markdown"===e.labelType?(0,o.GZ)(d,(0,l.jZ)((0,s.Sm)(p),i),{useHtmlLabels:h,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await mt(d,(0,l.jZ)((0,s.Sm)(p),i),e.labelStyle,!1,n);let g=f.getBBox();const m=e.padding/2;if((0,l.E)(i)){const t=f.children[0],e=(0,v.Ltv)(f);await(0,a.X)(t,p),g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}return h?d.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):d.attr("transform","translate(0, "+-g.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:u,bbox:g,halfPadding:m,label:d}},"labelHelper"),Wt=(0,c.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Ut(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K2)(Ut,"insertPolygonShape");var Gt=(0,c.K2)(async(t,e)=>{e.useHtmlLabels||(0,l.E)((0,l.D7)())||(e.centerLabel=!0);const{shapeSvg:r,bbox:n,halfPadding:i}=await qt(t,e,"node "+e.classes,!0);c.Rm.info("Classes = ",e.classes);const a=r.insert("rect",":first-child");return a.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),Wt(e,a),e.intersect=function(t){return jt.rect(e,t)},r},"note"),Yt=(0,c.K2)(t=>t?" "+t:"","formatClass"),Vt=(0,c.K2)((t,e)=>`${e||"node default"}${Yt(t.classes)} ${Yt(t.class)}`,"getClassesFromNode"),Ht=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding+(n.height+e.padding),a=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.Rm.info("Question main (Circle)");const o=Ut(r,i,i,a);return o.attr("style",e.style),Wt(e,o),e.intersect=function(t){return c.Rm.warn("Intersect called"),jt.polygon(e,a,t)},r},"question"),Xt=(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return jt.circle(e,14,t)},r},"choice"),Zt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=e.positioned?e.height:n.height+e.padding,a=i/4,o=e.positioned?e.width:n.width+2*a+e.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=Ut(r,o,i,s);return l.attr("style",e.style),Wt(e,l),e.intersect=function(t){return jt.polygon(e,s,t)},r},"hexagon"),Qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,o=n.width+2*a+e.padding,s=e.positioned&&(e.widthInColumns??1)>1&&e.width>o?e.width:o,l=Lt(e.directions,n,e,s),c=Ut(r,s,i,l);return c.attr("style",e.style),Wt(e,c),e.intersect=function(t){return jt.polygon(e,l,t)},r},"block_arrow"),Jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Ut(r,i,a,o).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return jt.polygon(e,o,t)},r},"rect_left_inv_arrow"),te=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=Ut(r,i,a,o);return s.attr("style",e.style),Wt(e,s),e.intersect=function(t){return jt.polygon(e,o,t)},r},"lean_right"),ee=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=Ut(r,i,a,o);return s.attr("style",e.style),Wt(e,s),e.intersect=function(t){return jt.polygon(e,o,t)},r},"lean_left"),re=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=Ut(r,i,a,o);return s.attr("style",e.style),Wt(e,s),e.intersect=function(t){return jt.polygon(e,o,t)},r},"trapezoid"),ne=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=Ut(r,i,a,o);return s.attr("style",e.style),Wt(e,s),e.intersect=function(t){return jt.polygon(e,o,t)},r},"inv_trapezoid"),ie=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=Ut(r,i,a,o);return s.attr("style",e.style),Wt(e,s),e.intersect=function(t){return jt.polygon(e,o,t)},r},"rect_right_inv_arrow"),ae=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding,a=i/2,o=a/(2.5+i/50),s=n.height+o+e.padding,l="M 0,"+o+" a "+a+","+o+" 0,0,0 "+i+" 0 a "+a+","+o+" 0,0,0 "+-i+" 0 l 0,"+s+" a "+a+","+o+" 0,0,0 "+i+" 0 l 0,"+-s,c=r.attr("label-offset-y",o).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(s/2+o)+")");return Wt(e,c),e.intersect=function(t){const r=jt.rect(e,t),n=r.x-e.x;if(0!=a&&(Math.abs(n)<e.width/2||Math.abs(n)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-o)){let i=o*o*(1-n*n/(a*a));0!=i&&(i=Math.sqrt(i)),i=o-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),oe=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await qt(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,s=e.positioned?e.height:n.height+e.padding,l=e.positioned?-o/2:-n.width/2-i,h=e.positioned?-s/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",h).attr("width",o).attr("height",s),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ce(a,e.props.borders,o,s),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Wt(e,a),e.intersect=function(t){return jt.rect(e,t)},r},"rect"),se=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await qt(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,s=e.positioned?e.height:n.height+e.padding,l=e.positioned?-o/2:-n.width/2-i,h=e.positioned?-s/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",h).attr("width",o).attr("height",s),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ce(a,e.props.borders,o,s),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Wt(e,a),e.intersect=function(t){return jt.rect(e,t)},r},"composite"),le=(0,c.K2)(async(t,e)=>{const{shapeSvg:r}=await qt(t,e,"label",!0);c.Rm.trace("Classes = ",e.class);const n=r.insert("rect",":first-child");if(n.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ce(n,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return Wt(e,n),e.intersect=function(t){return jt.rect(e,t)},r},"labelRect");function ce(t,e,r,n){const i=[],a=(0,c.K2)(t=>{i.push(t,0)},"addBorder"),o=(0,c.K2)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.Rm.debug("add top border"),a(r)):o(r),e.includes("r")?(c.Rm.debug("add right border"),a(n)):o(n),e.includes("b")?(c.Rm.debug("add bottom border"),a(r)):o(r),e.includes("l")?(c.Rm.debug("add left border"),a(n)):o(n),t.attr("stroke-dasharray",i.join(" "))}(0,c.K2)(ce,"applyNodePropertyBorders");var he=(0,c.K2)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("g").attr("class","label"),s=e.labelText.flat?e.labelText.flat():e.labelText;let h="";h="object"==typeof s?s[0]:s,c.Rm.info("Label text abc79",h,s,"object"==typeof s);const u=await mt(o,h,e.labelStyle,!0,!0);let d={width:0,height:0};if((0,l.E)((0,l.D7)())){const t=u.children[0],e=(0,v.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}c.Rm.info("Text 2",s);const p=s.slice(1,s.length);let f=u.getBBox();const g=await mt(o,p.join?p.join("<br/>"):p,e.labelStyle,!0,!0);if((0,l.E)((0,l.D7)())){const t=g.children[0],e=(0,v.Ltv)(g);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}const m=e.padding/2;return(0,v.Ltv)(g).attr("transform","translate( "+(d.width>f.width?0:(f.width-d.width)/2)+", "+(f.height+m+5)+")"),(0,v.Ltv)(u).attr("transform","translate( "+(d.width<f.width?0:-(f.width-d.width)/2)+", 0)"),d=o.node().getBBox(),o.attr("transform","translate("+-d.width/2+", "+(-d.height/2-m+3)+")"),i.attr("class","outer title-state").attr("x",-d.width/2-m).attr("y",-d.height/2-m).attr("width",d.width+e.padding).attr("height",d.height+e.padding),a.attr("class","divider").attr("x1",-d.width/2-m).attr("x2",d.width/2+m).attr("y1",-d.height/2-m+f.height+m).attr("y2",-d.height/2-m+f.height+m),Wt(e,i),e.intersect=function(t){return jt.rect(e,t)},n},"rectWithTitle"),ue=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,o=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return Wt(e,o),e.intersect=function(t){return jt.rect(e,t)},r},"stadium"),de=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await qt(t,e,Vt(e,void 0),!0),a=r.insert("circle",":first-child");return a.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),c.Rm.info("Circle main"),Wt(e,a),e.intersect=function(t){return c.Rm.info("Circle intersect",e,n.width/2+i,t),jt.circle(e,n.width/2+i,t)},r},"circle"),pe=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await qt(t,e,Vt(e,void 0),!0),a=r.insert("g",":first-child"),o=a.insert("circle"),s=a.insert("circle");return a.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),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),c.Rm.info("DoubleCircle main"),Wt(e,o),e.intersect=function(t){return c.Rm.info("DoubleCircle intersect",e,n.width/2+i+5,t),jt.circle(e,n.width/2+i+5,t)},r},"doublecircle"),fe=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:n}=await qt(t,e,Vt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=Ut(r,i,a,o);return s.attr("style",e.style),Wt(e,s),e.intersect=function(t){return jt.polygon(e,o,t)},r},"subroutine"),ge=(0,c.K2)((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),Wt(e,n),e.intersect=function(t){return jt.circle(e,7,t)},r},"start"),me=(0,c.K2)((t,e,r)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,a=10;"LR"===r&&(i=10,a=70);const o=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Wt(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return jt.rect(e,t)},n},"forkJoin"),ye={rhombus:Ht,composite:se,question:Ht,rect:oe,labelRect:le,rectWithTitle:he,choice:Xt,circle:de,doublecircle:pe,stadium:ue,hexagon:Zt,block_arrow:Qt,rect_left_inv_arrow:Jt,lean_right:te,lean_left:ee,trapezoid:re,inv_trapezoid:ne,rect_right_inv_arrow:ie,cylinder:ae,start:ge,end:(0,c.K2)((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),Wt(e,i),e.intersect=function(t){return jt.circle(e,7,t)},r},"end"),note:Gt,subroutine:fe,fork:me,join:me,class_box:(0,c.K2)(async(t,e)=>{const r=e.padding/2;let n;n=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line");let c=0,h=4;const u=i.insert("g").attr("class","label");let d=0;const p=e.classData.annotations?.[0],f=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",g=await mt(u,f,e.labelStyle,!0,!0);let m=g.getBBox();if((0,l.E)((0,l.D7)())){const t=g.children[0],e=(0,v.Ltv)(g);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}e.classData.annotations[0]&&(h+=m.height+4,c+=m.width);let y=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.E)((0,l.D7)())?y+="<"+e.classData.type+">":y+="<"+e.classData.type+">");const b=await mt(u,y,e.labelStyle,!0,!0);(0,v.Ltv)(b).attr("class","classTitle");let x=b.getBBox();if((0,l.E)((0,l.D7)())){const t=b.children[0],e=(0,v.Ltv)(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h+=x.height+4,x.width>c&&(c=x.width);const T=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;(0,l.E)((0,l.D7)())&&(n=n.replace(/</g,"<").replace(/>/g,">"));const i=await mt(u,n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let a=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,v.Ltv)(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,T.push(i)}),h+=8;const w=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let n=r.displayText;(0,l.E)((0,l.D7)())&&(n=n.replace(/</g,"<").replace(/>/g,">"));const i=await mt(u,n,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let a=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,v.Ltv)(i);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}a.width>c&&(c=a.width),h+=a.height+4,w.push(i)}),h+=8,p){let t=(c-m.width)/2;(0,v.Ltv)(g).attr("transform","translate( "+(-1*c/2+t)+", "+-1*h/2+")"),d=m.height+4}let k=(c-x.width)/2;return(0,v.Ltv)(b).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*h/2+d)+")"),d+=x.height+4,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-h/2-r+8+d).attr("y2",-h/2-r+8+d),d+=8,T.forEach(t=>{(0,v.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+d+4)+")");const e=t?.getBBox();d+=(e?.height??0)+4}),d+=8,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-h/2-r+8+d).attr("y2",-h/2-r+8+d),d+=8,w.forEach(t=>{(0,v.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*h/2+d)+")");const e=t?.getBBox();d+=(e?.height??0)+4}),a.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-h/2-r).attr("width",c+e.padding).attr("height",h+e.padding),Wt(e,a),e.intersect=function(t){return jt.rect(e,t)},i},"class_box")},ve={},be=(0,c.K2)(async(t,e,r)=>{let n,i;if(e.link){let a;"sandbox"===(0,l.D7)().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await ye[e.shape](n,e,r)}else i=await ye[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),ve[e.id]=n,e.haveCallback&&ve[e.id].attr("class",ve[e.id].attr("class")+" clickable"),n},"insertNode"),xe=(0,c.K2)(t=>{const e=ve[t.id];c.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function Te(t,e,r=!1){const n=t;let i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label";let a,o=0,c="";switch(n.type){case"round":o=5,c="rect";break;case"composite":o=0,c="composite",a=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const h=(0,s.sM)(n?.styles??[]),u=n.label,d=n.size??{width:0,height:0,x:0,y:0},p=e.getDiagramId();return{labelStyle:h.labelStyle,shape:c,labelText:u,rx:o,ry:o,class:i,style:h.style,id:n.id,domId:p?`${p}-${n.id}`:n.id,directions:n.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:r,intersect:void 0,type:n.type,padding:a??(0,l.zj)()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}async function we(t,e,r){const n=Te(e,r,!1);if("group"===n.type)return;const i=(0,l.zj)(),a=await be(t,n,{config:i}),o=a.node().getBBox(),s=r.getBlock(n.id);s.size={width:o.width,height:o.height,x:0,y:0,node:a},r.setBlock(s),a.remove()}async function ke(t,e,r){const n=Te(e,r,!0);if("space"!==r.getBlock(n.id).type){const r=(0,l.zj)();await be(t,n,{config:r}),e.intersect=n?.intersect,xe(n)}}async function Ce(t,e,r,n){for(const i of e)await n(t,i,r),i.children&&await Ce(t,i.children,r,n)}async function Ee(t,e,r){await Ce(t,e,r,we)}async function Se(t,e,r){await Ce(t,e,r,ke)}async function _e(t,e,r,n,i){const a=new b.T({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const o of r)o.size&&a.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(const o of e)if(o.start&&o.end){const e=n.getBlock(o.start),r=n.getBlock(o.end);if(e?.size&&r?.size){const n=e.size,s=r.size,l=[{x:n.x,y:n.y},{x:n.x+(s.x-n.x)/2,y:n.y+(s.y-n.y)/2},{x:s.x,y:s.y}],c=i?`${i}-${o.id}`:o.id,h=`${"thick"===o.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===o.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;At(t,{v:o.start,w:o.end,name:c},{...o,id:c,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:l,classes:h},void 0,"block",a,i),o.label&&(await wt(t,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:l,classes:h}),Ct({...o,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,c.K2)(Te,"getNodeFromBlock"),(0,c.K2)(we,"calculateBlockSize"),(0,c.K2)(ke,"insertBlockPositioned"),(0,c.K2)(Ce,"performOperations"),(0,c.K2)(Ee,"calculateBlockSizes"),(0,c.K2)(Se,"insertBlocks"),(0,c.K2)(_e,"insertEdges");var Ae=(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),Re={parser:T,db:nt,renderer:{draw:(0,c.K2)(async function(t,e,r,n){const{securityLevel:i,block:a}=(0,l.zj)(),o=n.db;let s;o.setDiagramId(e),"sandbox"===i&&(s=(0,v.Ltv)("#i"+e));const h="sandbox"===i?(0,v.Ltv)(s.nodes()[0].contentDocument.body):(0,v.Ltv)("body"),u="sandbox"===i?h.select(`[id="${e}"]`):(0,v.Ltv)(`[id="${e}"]`);lt(u,["point","circle","cross"],n.type,e);const d=o.getBlocks(),p=o.getBlocksFlat(),f=o.getEdges(),g=u.insert("g").attr("class","block");await Ee(g,d,o);const m=gt(o);if(await Se(g,d,o),await _e(g,f,p,o,e),m){const t=m,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,n=t.width+10,{useMaxWidth:i}=a;(0,l.a$)(u,r,n,!!i),c.Rm.debug("Here Bounds",m,t),u.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:Ae},styles:at}},7005(t,e,r){"use strict";r.d(e,{diagram:()=>Dt});var n=r(8343),i=r(8221),a=r(1123),o=r(797),s=r(1444),l=r(6750),h=function(){var t=(0,o.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],l=[1,64],h=[1,65],u=[1,66],d=[1,67],p=[1,68],f=[1,69],g=[1,29],m=[1,30],y=[1,31],v=[1,32],b=[1,33],x=[1,34],T=[1,35],w=[1,36],k=[1,37],C=[1,38],E=[1,39],S=[1,40],_=[1,41],A=[1,42],R=[1,43],L=[1,44],I=[1,45],D=[1,46],N=[1,47],M=[1,48],O=[1,50],$=[1,51],P=[1,52],B=[1,53],F=[1,54],z=[1,55],K=[1,56],j=[1,57],q=[1,58],W=[1,59],U=[1,60],G=[14,42],Y=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[1,82],X=[1,83],Z=[1,84],Q=[1,85],J=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,o.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[s-3]);break;case 19:n.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:n.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 28:a[s].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:n.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:n.addDeploymentNode("node",...a[s]),this.$=a[s];break;case 33:n.addDeploymentNode("nodeL",...a[s]),this.$=a[s];break;case 34:n.addDeploymentNode("nodeR",...a[s]),this.$=a[s];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[s]),this.$=a[s];break;case 40:n.addPersonOrSystem("external_person",...a[s]),this.$=a[s];break;case 41:n.addPersonOrSystem("system",...a[s]),this.$=a[s];break;case 42:n.addPersonOrSystem("system_db",...a[s]),this.$=a[s];break;case 43:n.addPersonOrSystem("system_queue",...a[s]),this.$=a[s];break;case 44:n.addPersonOrSystem("external_system",...a[s]),this.$=a[s];break;case 45:n.addPersonOrSystem("external_system_db",...a[s]),this.$=a[s];break;case 46:n.addPersonOrSystem("external_system_queue",...a[s]),this.$=a[s];break;case 47:n.addContainer("container",...a[s]),this.$=a[s];break;case 48:n.addContainer("container_db",...a[s]),this.$=a[s];break;case 49:n.addContainer("container_queue",...a[s]),this.$=a[s];break;case 50:n.addContainer("external_container",...a[s]),this.$=a[s];break;case 51:n.addContainer("external_container_db",...a[s]),this.$=a[s];break;case 52:n.addContainer("external_container_queue",...a[s]),this.$=a[s];break;case 53:n.addComponent("component",...a[s]),this.$=a[s];break;case 54:n.addComponent("component_db",...a[s]),this.$=a[s];break;case 55:n.addComponent("component_queue",...a[s]),this.$=a[s];break;case 56:n.addComponent("external_component",...a[s]),this.$=a[s];break;case 57:n.addComponent("external_component_db",...a[s]),this.$=a[s];break;case 58:n.addComponent("external_component_queue",...a[s]),this.$=a[s];break;case 60:n.addRel("rel",...a[s]),this.$=a[s];break;case 61:n.addRel("birel",...a[s]),this.$=a[s];break;case 62:n.addRel("rel_u",...a[s]),this.$=a[s];break;case 63:n.addRel("rel_d",...a[s]),this.$=a[s];break;case 64:n.addRel("rel_l",...a[s]),this.$=a[s];break;case 65:n.addRel("rel_r",...a[s]),this.$=a[s];break;case 66:n.addRel("rel_b",...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),n.addRel("rel",...a[s]),this.$=a[s];break;case 68:n.updateElStyle("update_el_style",...a[s]),this.$=a[s];break;case 69:n.updateRelStyle("update_rel_style",...a[s]),this.$=a[s];break;case 70:n.updateLayoutConfig("update_layout_config",...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let t={};t[a[s-1].trim()]=a[s].trim(),this.$=t;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U},{14:[1,74]},t(G,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U}),t(G,[2,14]),t(Y,[2,16],{12:[1,76]}),t(G,[2,36],{12:[1,77]}),t(V,[2,19]),t(V,[2,20]),{25:[1,78]},{27:[1,79]},t(V,[2,23]),{35:80,75:81,76:H,77:X,79:Z,80:Q},{35:86,75:81,76:H,77:X,79:Z,80:Q},{35:87,75:81,76:H,77:X,79:Z,80:Q},{35:88,75:81,76:H,77:X,79:Z,80:Q},{35:89,75:81,76:H,77:X,79:Z,80:Q},{35:90,75:81,76:H,77:X,79:Z,80:Q},{35:91,75:81,76:H,77:X,79:Z,80:Q},{35:92,75:81,76:H,77:X,79:Z,80:Q},{35:93,75:81,76:H,77:X,79:Z,80:Q},{35:94,75:81,76:H,77:X,79:Z,80:Q},{35:95,75:81,76:H,77:X,79:Z,80:Q},{35:96,75:81,76:H,77:X,79:Z,80:Q},{35:97,75:81,76:H,77:X,79:Z,80:Q},{35:98,75:81,76:H,77:X,79:Z,80:Q},{35:99,75:81,76:H,77:X,79:Z,80:Q},{35:100,75:81,76:H,77:X,79:Z,80:Q},{35:101,75:81,76:H,77:X,79:Z,80:Q},{35:102,75:81,76:H,77:X,79:Z,80:Q},{35:103,75:81,76:H,77:X,79:Z,80:Q},{35:104,75:81,76:H,77:X,79:Z,80:Q},t(J,[2,59]),{35:105,75:81,76:H,77:X,79:Z,80:Q},{35:106,75:81,76:H,77:X,79:Z,80:Q},{35:107,75:81,76:H,77:X,79:Z,80:Q},{35:108,75:81,76:H,77:X,79:Z,80:Q},{35:109,75:81,76:H,77:X,79:Z,80:Q},{35:110,75:81,76:H,77:X,79:Z,80:Q},{35:111,75:81,76:H,77:X,79:Z,80:Q},{35:112,75:81,76:H,77:X,79:Z,80:Q},{35:113,75:81,76:H,77:X,79:Z,80:Q},{35:114,75:81,76:H,77:X,79:Z,80:Q},{35:115,75:81,76:H,77:X,79:Z,80:Q},{20:116,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U},{12:[1,118],33:[1,117]},{35:119,75:81,76:H,77:X,79:Z,80:Q},{35:120,75:81,76:H,77:X,79:Z,80:Q},{35:121,75:81,76:H,77:X,79:Z,80:Q},{35:122,75:81,76:H,77:X,79:Z,80:Q},{35:123,75:81,76:H,77:X,79:Z,80:Q},{35:124,75:81,76:H,77:X,79:Z,80:Q},{35:125,75:81,76:H,77:X,79:Z,80:Q},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(G,[2,15]),t(Y,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(G,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:s,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:v,48:b,49:x,50:T,51:w,52:k,53:C,54:E,55:S,56:_,57:A,58:R,59:L,60:I,61:D,62:N,63:M,64:O,65:$,66:P,67:B,68:F,69:z,70:K,71:j,72:q,73:W,74:U}),t(V,[2,21]),t(V,[2,22]),t(J,[2,39]),t(tt,[2,71],{75:81,35:132,76:H,77:X,79:Z,80:Q}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(J,[2,40]),t(J,[2,41]),t(J,[2,42]),t(J,[2,43]),t(J,[2,44]),t(J,[2,45]),t(J,[2,46]),t(J,[2,47]),t(J,[2,48]),t(J,[2,49]),t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),t(J,[2,57]),t(J,[2,58]),t(J,[2,60]),t(J,[2,61]),t(J,[2,62]),t(J,[2,63]),t(J,[2,64]),t(J,[2,65]),t(J,[2,66]),t(J,[2,67]),t(J,[2,68]),t(J,[2,69]),t(J,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Y,[2,18]),t(G,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(J,[2,24]),t(J,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},at=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(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,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,o.K2)(function(t,e,r,n){switch(r){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function ot(){this.yy={}}return it.lexer=at,(0,o.K2)(ot,"Parser"),ot.prototype=it,it.Parser=ot,new ot}();h.parser=h;var u,d=h,p=[],f=[""],g="global",m="",y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],v=[],b="",x=!1,T=4,w=2,k=(0,o.K2)(function(){return u},"getC4Type"),C=(0,o.K2)(function(t){let e=(0,a.jZ)(t,(0,a.D7)());u=e},"setC4Type"),E=(0,o.K2)(function(t,e,r,n,i,a,o,s,l){if(null==t||null==e||null==r||null==n)return;let c={};const h=v.find(t=>t.from===e&&t.to===r);if(h?c=h:v.push(c),c.type=t,c.from=e,c.to=r,c.label={text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==a)c.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]={text:e}}else c.descr={text:a};if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.sprite=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.link=l;c.wrap=V()},"addRel"),S=(0,o.K2)(function(t,e,r,n,i,a,o){if(null===e||null===r)return;let s={};const l=p.find(t=>t.alias===e);if(l&&e===l.alias?s=l:(s.alias=e,p.push(s)),s.label=null==r?{text:""}:{text:r},null==n)s.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.sprite=i;if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];s[t]=e}else s.link=o;s.typeC4Shape={text:t},s.parentBoundary=g,s.wrap=V()},"addPersonOrSystem"),_=(0,o.K2)(function(t,e,r,n,i,a,o,s){if(null===e||null===r)return;let l={};const c=p.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,p.push(l)),l.label=null==r?{text:""}:{text:r},null==n)l.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.techn={text:n};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.tags=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.wrap=V(),l.typeC4Shape={text:t},l.parentBoundary=g},"addContainer"),A=(0,o.K2)(function(t,e,r,n,i,a,o,s){if(null===e||null===r)return;let l={};const c=p.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,p.push(l)),l.label=null==r?{text:""}:{text:r},null==n)l.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.techn={text:n};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.tags=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.wrap=V(),l.typeC4Shape={text:t},l.parentBoundary=g},"addComponent"),R=(0,o.K2)(function(t,e,r,n,i){if(null===t||null===e)return;let a={};const o=y.find(e=>e.alias===t);if(o&&t===o.alias?a=o:(a.alias=t,y.push(a)),a.label=null==e?{text:""}:{text:e},null==r)a.type={text:"system"};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]={text:e}}else a.type={text:r};if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]=e}else a.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=g,a.wrap=V(),m=g,g=t,f.push(m)},"addPersonOrSystemBoundary"),L=(0,o.K2)(function(t,e,r,n,i){if(null===t||null===e)return;let a={};const o=y.find(e=>e.alias===t);if(o&&t===o.alias?a=o:(a.alias=t,y.push(a)),a.label=null==e?{text:""}:{text:e},null==r)a.type={text:"container"};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];a[t]={text:e}}else a.type={text:r};if("object"==typeof n){let[t,e]=Object.entries(n)[0];a[t]=e}else a.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];a[t]=e}else a.link=i;a.parentBoundary=g,a.wrap=V(),m=g,g=t,f.push(m)},"addContainerBoundary"),I=(0,o.K2)(function(t,e,r,n,i,a,o,s){if(null===e||null===r)return;let l={};const c=y.find(t=>t.alias===e);if(c&&e===c.alias?l=c:(l.alias=e,y.push(l)),l.label=null==r?{text:""}:{text:r},null==n)l.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.type={text:n};if(null==i)l.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]={text:e}}else l.descr={text:i};if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.tags=o;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.nodeType=t,l.parentBoundary=g,l.wrap=V(),m=g,g=e,f.push(m)},"addDeploymentNode"),D=(0,o.K2)(function(){g=m,f.pop(),m=f.pop(),f.push(m)},"popBoundaryParseStack"),N=(0,o.K2)(function(t,e,r,n,i,a,o,s,l,c,h){let u=p.find(t=>t.alias===e);if(void 0!==u||(u=y.find(t=>t.alias===e),void 0!==u)){if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.bgColor=r;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.borderColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.shadowing=a;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.shape=o;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.sprite=s;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.techn=l;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];u[t]=e}else u.legendSprite=h}},"updateElStyle"),M=(0,o.K2)(function(t,e,r,n,i,a,o){const s=v.find(t=>t.from===e&&t.to===r);if(void 0!==s){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]=e}else s.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.lineColor=i;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=parseInt(e)}else s.offsetX=parseInt(a);if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];s[t]=parseInt(e)}else s.offsetY=parseInt(o)}},"updateRelStyle"),O=(0,o.K2)(function(t,e,r){let n=T,i=w;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof r){const t=Object.values(r)[0];i=parseInt(t)}else i=parseInt(r);n>=1&&(T=n),i>=1&&(w=i)},"updateLayoutConfig"),$=(0,o.K2)(function(){return T},"getC4ShapeInRow"),P=(0,o.K2)(function(){return w},"getC4BoundaryInRow"),B=(0,o.K2)(function(){return g},"getCurrentBoundaryParse"),F=(0,o.K2)(function(){return m},"getParentBoundaryParse"),z=(0,o.K2)(function(t){return null==t?p:p.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),K=(0,o.K2)(function(t){return p.find(e=>e.alias===t)},"getC4Shape"),j=(0,o.K2)(function(t){return Object.keys(z(t))},"getC4ShapeKeys"),q=(0,o.K2)(function(t){return null==t?y:y.filter(e=>e.parentBoundary===t)},"getBoundaries"),W=q,U=(0,o.K2)(function(){return v},"getRels"),G=(0,o.K2)(function(){return b},"getTitle"),Y=(0,o.K2)(function(t){x=t},"setWrap"),V=(0,o.K2)(function(){return x},"autoWrap"),H=(0,o.K2)(function(){p=[],y=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],m="",g="global",f=[""],v=[],f=[""],b="",x=!1,T=4,w=2},"clear"),X=(0,o.K2)(function(t){let e=(0,a.jZ)(t,(0,a.D7)());b=e},"setTitle"),Z={addPersonOrSystem:S,addPersonOrSystemBoundary:R,addContainer:_,addContainerBoundary:L,addComponent:A,addDeploymentNode:I,popBoundaryParseStack:D,addRel:E,updateElStyle:N,updateRelStyle:M,updateLayoutConfig:O,autoWrap:V,setWrap:Y,getC4ShapeArray:z,getC4Shape:K,getC4ShapeKeys:j,getBoundaries:q,getBoundarys:W,getCurrentBoundaryParse:B,getParentBoundaryParse:F,getRels:U,getTitle:G,getC4Type:k,getC4ShapeInRow:$,getC4BoundaryInRow:P,setAccTitle:a.SV,getAccTitle:a.iN,getAccDescription:a.m7,setAccDescription:a.EI,getConfig:(0,o.K2)(()=>(0,a.D7)().c4,"getConfig"),clear:H,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:X,setC4Type:C},Q=(0,o.K2)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),J=(0,o.K2)(function(t,e,r,n,i,a){const o=t.append("image");o.attr("width",e),o.attr("height",r),o.attr("x",n),o.attr("y",i);let s=a.startsWith("data:image/png;base64")?a:(0,l.J)(a);o.attr("xlink:href",s)},"drawImage"),tt=(0,o.K2)((t,e,r,n)=>{const i=t.append("g");let a=0;for(let o of e){let t=o.textColor?o.textColor:"#444444",e=o.lineColor?o.lineColor:"#444444",s=o.offsetX?parseInt(o.offsetX):0,l=o.offsetY?parseInt(o.offsetY):0,c="";if(0===a){let t=i.append("line");t.attr("x1",o.startPoint.x),t.attr("y1",o.startPoint.y),t.attr("x2",o.endPoint.x),t.attr("y2",o.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==o.type&&t.attr("marker-end","url("+c+"#"+n+"-arrowhead)"),"birel"!==o.type&&"rel_b"!==o.type||t.attr("marker-start","url("+c+"#"+n+"-arrowend)"),a=-1}else{let t=i.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",o.startPoint.x).replaceAll("starty",o.startPoint.y).replaceAll("controlx",o.startPoint.x+(o.endPoint.x-o.startPoint.x)/2-(o.endPoint.x-o.startPoint.x)/4).replaceAll("controly",o.startPoint.y+(o.endPoint.y-o.startPoint.y)/2).replaceAll("stopx",o.endPoint.x).replaceAll("stopy",o.endPoint.y)),"rel_b"!==o.type&&t.attr("marker-end","url("+c+"#"+n+"-arrowhead)"),"birel"!==o.type&&"rel_b"!==o.type||t.attr("marker-start","url("+c+"#"+n+"-arrowend)")}let h=r.messageFont();ut(r)(o.label.text,i,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+s,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+l,o.label.width,o.label.height,{fill:t},h),o.techn&&""!==o.techn.text&&(h=r.messageFont(),ut(r)("["+o.techn.text+"]",i,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+s,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+r.messageFontSize+5+l,Math.max(o.label.width,o.techn.width),o.techn.height,{fill:t,"font-style":"italic"},h))}},"drawRels"),et=(0,o.K2)(function(t,e,r){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",o=e.fontColor?e.fontColor:"black",s={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(s={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:s};Q(n,l);let c=r.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=o,ut(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=r.boundaryFont(),c.fontColor=o,ut(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=r.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=o,ut(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},"drawBoundary"),rt=(0,o.K2)(function(t,e,r){let i=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],a=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],o=e.fontColor?e.fontColor:"#FFFFFF",s="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":s="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":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const l=t.append("g");l.attr("class","person-man");const c=(0,n.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=a,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},Q(l,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",a).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)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).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":l.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",a).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)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).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))}let h=ht(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",o).attr("font-family",h.fontFamily).attr("font-size",h.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":J(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let u=r[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=o,ut(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:o},u),u=r[e.typeC4Shape.text+"Font"](),u.fontColor=o,e.techn&&""!==e.techn?.text?ut(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:o,"font-style":"italic"},u):e.type&&""!==e.type.text&&ut(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:o,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=r.personFont(),u.fontColor=o,ut(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:o},u)),e.height},"drawC4Shape"),nt=(0,o.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),it=(0,o.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),at=(0,o.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),ot=(0,o.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),st=(0,o.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),lt=(0,o.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ct=(0,o.K2)(function(t,e){const r=t.append("defs").append("marker").attr("id",e+"-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")},"insertArrowCrossHead"),ht=(0,o.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),ut=function(){function t(t,e,r,i,a,o,s){n(e.append("text").attr("x",r+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,r,i,o,s,l,c){const{fontSize:h,fontFamily:u,fontWeight:d}=c,p=t.split(a.Y2.lineBreakRegex);for(let a=0;a<p.length;a++){const t=a*h-h*(p.length-1)/2,s=e.append("text").attr("x",r+o/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",h).style("font-weight",d).style("font-family",u);s.append("tspan").attr("dy",t).text(p[a]).attr("alignment-baseline","mathematical"),n(s,l)}}function r(t,r,i,a,o,s,l,c){const h=r.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,o,0,l,c),n(u,l)}function n(t,e){for(const r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}return(0,o.K2)(t,"byText"),(0,o.K2)(e,"byTspan"),(0,o.K2)(r,"byFo"),(0,o.K2)(n,"_setTextAttrs"),function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}(),dt={drawRect:Q,drawBoundary:et,drawC4Shape:rt,drawRels:tt,drawImage:J,insertArrowHead:ot,insertArrowEnd:st,insertArrowFilledHead:lt,insertArrowCrossHead:ct,insertDatabaseIcon:nt,insertComputerIcon:it,insertClockIcon:at},pt=0,ft=0,gt=4,mt=2;h.yy=Z;var yt={},vt=class{static{(0,o.K2)(this,"Bounds")}constructor(t){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,bt(t.db.getConfig())}setData(t,e,r,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,r=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>gt)&&(e=this.nextData.startx+t.margin+yt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},bt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},bt=(0,o.K2)(function(t){(0,a.hH)(yt,t),t.fontFamily&&(yt.personFontFamily=yt.systemFontFamily=yt.messageFontFamily=t.fontFamily),t.fontSize&&(yt.personFontSize=yt.systemFontSize=yt.messageFontSize=t.fontSize),t.fontWeight&&(yt.personFontWeight=yt.systemFontWeight=yt.messageFontWeight=t.fontWeight)},"setConf"),xt=(0,o.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),Tt=(0,o.K2)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),wt=(0,o.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function kt(t,e,r,n,o){if(!e[t].width)if(r)e[t].text=(0,i.bH)(e[t].text,o,n),e[t].textLines=e[t].text.split(a.Y2.lineBreakRegex).length,e[t].width=o,e[t].height=(0,i.ru)(e[t].text,n);else{let r=e[t].text.split(a.Y2.lineBreakRegex);e[t].textLines=r.length;let o=0;e[t].height=0,e[t].width=0;for(const a of r)e[t].width=Math.max((0,i.Un)(a,n),e[t].width),o=(0,i.ru)(a,n),e[t].height=e[t].height+o}}(0,o.K2)(kt,"calcC4ShapeTextWH");var Ct=(0,o.K2)(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=yt.c4ShapeMargin-35;let n=e.wrap&&yt.wrap,a=Tt(yt);a.fontSize=a.fontSize+2,a.fontWeight="bold",kt("label",e,n,a,(0,i.Un)(e.label.text,a)),dt.drawBoundary(t,e,yt)},"drawBoundary"),Et=(0,o.K2)(function(t,e,r,n){let a=0;for(const o of n){a=0;const n=r[o];let s=xt(yt,n.typeC4Shape.text);switch(s.fontSize=s.fontSize-2,n.typeC4Shape.width=(0,i.Un)("«"+n.typeC4Shape.text+"»",s),n.typeC4Shape.height=s.fontSize+2,n.typeC4Shape.Y=yt.c4ShapePadding,a=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=a,a=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=a,a=n.image.Y+n.image.height);let l=n.wrap&&yt.wrap,c=yt.width-2*yt.c4ShapePadding,h=xt(yt,n.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",kt("label",n,l,h,c),n.label.Y=a+8,a=n.label.Y+n.label.height,n.type&&""!==n.type.text){n.type.text="["+n.type.text+"]",kt("type",n,l,xt(yt,n.typeC4Shape.text),c),n.type.Y=a+5,a=n.type.Y+n.type.height}else if(n.techn&&""!==n.techn.text){n.techn.text="["+n.techn.text+"]",kt("techn",n,l,xt(yt,n.techn.text),c),n.techn.Y=a+5,a=n.techn.Y+n.techn.height}let u=a,d=n.label.width;if(n.descr&&""!==n.descr.text){kt("descr",n,l,xt(yt,n.typeC4Shape.text),c),n.descr.Y=a+20,a=n.descr.Y+n.descr.height,d=Math.max(n.label.width,n.descr.width),u=a-5*n.descr.textLines}d+=yt.c4ShapePadding,n.width=Math.max(n.width||yt.width,d,yt.width),n.height=Math.max(n.height||yt.height,u,yt.height),n.margin=n.margin||yt.c4ShapeMargin,t.insert(n),dt.drawC4Shape(e,n,yt)}t.bumpLastMargin(yt.c4ShapeMargin)},"drawC4ShapeArray"),St=class{static{(0,o.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},_t=(0,o.K2)(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,o=r+t.width/2,s=n+t.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=t.height/t.width,d=null;return n==a&&r<i?d=new St(r+t.width,s):n==a&&r>i?d=new St(r,s):r==i&&n<a?d=new St(o,n+t.height):r==i&&n>a&&(d=new St(o,n)),r>i&&n<a?d=u>=h?new St(r,s+h*t.width/2):new St(o-l/c*t.height/2,n+t.height):r<i&&n<a?d=u>=h?new St(r+t.width,s+h*t.width/2):new St(o+l/c*t.height/2,n+t.height):r<i&&n>a?d=u>=h?new St(r+t.width,s-h*t.width/2):new St(o+t.height/2*l/c,n):r>i&&n>a&&(d=u>=h?new St(r,s-t.width/2*h):new St(o-t.height/2*l/c,n)),d},"getIntersectPoint"),At=(0,o.K2)(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=_t(t,r);return r.x=t.x+t.width/2,r.y=t.y+t.height/2,{startPoint:n,endPoint:_t(e,r)}},"getIntersectPoints"),Rt=(0,o.K2)(function(t,e,r,n,a){let o=0;for(let s of e){o+=1;let t=s.wrap&&yt.wrap,e=wt(yt);"C4Dynamic"===n.db.getC4Type()&&(s.label.text=o+": "+s.label.text);let a=(0,i.Un)(s.label.text,e);kt("label",s,t,e,a),s.techn&&""!==s.techn.text&&(a=(0,i.Un)(s.techn.text,e),kt("techn",s,t,e,a)),s.descr&&""!==s.descr.text&&(a=(0,i.Un)(s.descr.text,e),kt("descr",s,t,e,a));let l=r(s.from),c=r(s.to),h=At(l,c);s.startPoint=h.startPoint,s.endPoint=h.endPoint}dt.drawRels(t,e,yt,a)},"drawRels");function Lt(t,e,r,n,i){let a=new vt(i);a.data.widthLimit=r.data.widthLimit/Math.min(mt,n.length);for(let[o,s]of n.entries()){let n=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=n,n=s.image.Y+s.image.height);let l=s.wrap&&yt.wrap,c=Tt(yt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",kt("label",s,l,c,a.data.widthLimit),s.label.Y=n+8,n=s.label.Y+s.label.height,s.type&&""!==s.type.text){s.type.text="["+s.type.text+"]",kt("type",s,l,Tt(yt),a.data.widthLimit),s.type.Y=n+5,n=s.type.Y+s.type.height}if(s.descr&&""!==s.descr.text){let t=Tt(yt);t.fontSize=t.fontSize-2,kt("descr",s,l,t,a.data.widthLimit),s.descr.Y=n+20,n=s.descr.Y+s.descr.height}if(0==o||o%mt===0){let t=r.data.startx+yt.diagramMarginX,e=r.data.stopy+yt.diagramMarginY+n;a.setData(t,t,e,e)}else{let t=a.data.stopx!==a.data.startx?a.data.stopx+yt.diagramMarginX:a.data.startx,e=a.data.starty;a.setData(t,t,e,e)}a.name=s.alias;let h=i.db.getC4ShapeArray(s.alias),u=i.db.getC4ShapeKeys(s.alias);u.length>0&&Et(a,t,h,u),e=s.alias;let d=i.db.getBoundaries(e);d.length>0&&Lt(t,e,a,d,i),"global"!==s.alias&&Ct(t,s,a),r.data.stopy=Math.max(a.data.stopy+yt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+yt.c4ShapeMargin,r.data.stopx),pt=Math.max(pt,r.data.stopx),ft=Math.max(ft,r.data.stopy)}}(0,o.K2)(Lt,"drawInsideBoundary");var It={drawPersonOrSystemArray:Et,drawBoundary:Ct,setConf:bt,draw:(0,o.K2)(function(t,e,r,n){yt=(0,a.D7)().c4;const i=(0,a.D7)().securityLevel;let l;"sandbox"===i&&(l=(0,s.Ltv)("#i"+e));const c="sandbox"===i?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body");let h=n.db;n.db.setWrap(yt.wrap),gt=h.getC4ShapeInRow(),mt=h.getC4BoundaryInRow(),o.Rm.debug(`C:${JSON.stringify(yt,null,2)}`);const u="sandbox"===i?c.select(`[id="${e}"]`):(0,s.Ltv)(`[id="${e}"]`);dt.insertComputerIcon(u,e),dt.insertDatabaseIcon(u,e),dt.insertClockIcon(u,e);let d=new vt(n);d.setData(yt.diagramMarginX,yt.diagramMarginX,yt.diagramMarginY,yt.diagramMarginY),d.data.widthLimit=screen.availWidth,pt=yt.diagramMarginX,ft=yt.diagramMarginY;const p=n.db.getTitle();Lt(u,"",d,n.db.getBoundaries(""),n),dt.insertArrowHead(u,e),dt.insertArrowEnd(u,e),dt.insertArrowCrossHead(u,e),dt.insertArrowFilledHead(u,e),Rt(u,n.db.getRels(),n.db.getC4Shape,n,e),d.data.stopx=pt,d.data.stopy=ft;const f=d.data;let g=f.stopy-f.starty+2*yt.diagramMarginY;const m=f.stopx-f.startx+2*yt.diagramMarginX;p&&u.append("text").text(p).attr("x",(f.stopx-f.startx)/2-4*yt.diagramMarginX).attr("y",f.starty+yt.diagramMarginY),(0,a.a$)(u,g,m,yt.useMaxWidth);const y=p?60:0;u.attr("viewBox",f.startx-yt.diagramMarginX+" -"+(yt.diagramMarginY+y)+" "+m+" "+(g+y)),o.Rm.debug("models:",f)},"draw")},Dt={parser:d,db:Z,renderer:It,styles:(0,o.K2)(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,"getStyles"),init:(0,o.K2)(({c4:t,wrap:e})=>{It.setConf(t),Z.setWrap(e)},"init")}},4345(t,e,r){"use strict";r.d(e,{P:()=>a});var n=r(1123),i=r(797),a=(0,i.K2)((t,e,r,a)=>{t.attr("class",r);const{width:l,height:c,x:h,y:u}=o(t,e);(0,n.a$)(t,c,l,a);const d=s(h,u,l,c,e);t.attr("viewBox",d),i.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,i.K2)((t,e)=>{const r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+2*e,height:r.height+2*e,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),s=(0,i.K2)((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")},2654(t,e,r){"use strict";r.d(e,{DA:()=>x,IU:()=>R,U:()=>A,U7:()=>Ie,U_:()=>Ne,Zk:()=>u,aP:()=>Ae,gh:()=>De,lC:()=>p,on:()=>Le});var n=r(5105),i=r(8013),a=r(1240),o=r(8221),s=r(1123),l=r(797),c=r(1444),h=r(2274),u=(0,l.K2)(async(t,e,r)=>{let i;const l=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);i=r||"node default";const h=t.insert("g").attr("class",i).attr("id",e.domId||e.id),u=h.insert("g").attr("class","label").attr("style",(0,o.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,f="markdown"===e.labelType,g=await(0,a.GZ)(u,(0,s.jZ)((0,o.Sm)(d),(0,s.D7)()),{useHtmlLabels:l,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:f},(0,s.D7)());let m=g.getBBox();const y=(e?.padding??0)/2;if(l){const t=g.children[0],e=(0,c.Ltv)(g);await(0,n.X)(t,d),m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}return l?u.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):u.attr("transform","translate(0, "+-m.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:h,bbox:m,halfPadding:y,label:u}},"labelHelper"),d=(0,l.K2)(async(t,e,r)=>{const n=r.useHtmlLabels??(0,s.E)((0,s.D7)()),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,a.GZ)(i,(0,s.jZ)((0,o.Sm)(e),(0,s.D7)()),{useHtmlLabels:n,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let h=l.getBBox();const u=r.padding/2;if((0,s.E)((0,s.D7)())){const t=l.children[0],e=(0,c.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return n?i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):i.attr("transform","translate(0, "+-h.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:u,label:i}},"insertLabel"),p=(0,l.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),f=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function m(t,e,r,n,i,a){const o=[],s=r-t,l=n-e,c=s/a,h=2*Math.PI/c,u=e+l/2;for(let d=0;d<=50;d++){const e=t+d/50*s,r=u+i*Math.sin(h*(e-t));o.push({x:e,y:r})}return o}function y(t,e,r,n,i,a){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=t+r*Math.cos(n),a=e+r*Math.sin(n);o.push({x:-i,y:-a})}return o}function v(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",n);const i=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),o=(0,l.K2)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(i){const t={fill:o(i,"fill"),"fill-opacity":o(i,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(a){const t={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(r),s}(0,l.K2)(g,"createPathFromPoints"),(0,l.K2)(m,"generateFullSineWavePoints"),(0,l.K2)(y,"generateCirclePoints"),(0,l.K2)(v,"mergePaths");var b=(0,l.K2)((t,e)=>{var r,n,i=t.x,a=t.y,o=e.x-i,s=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),r=0===s?0:c*o/s,n=c):(o<0&&(l=-l),r=l,n=0===o?0:l*s/o),{x:i+r,y:a+n}},"intersectRect"),x=(0,l.K2)(async(t,e,r,n=!1,i=!1)=>{let o=e||"";"object"==typeof o&&(o=o[0]);const l=(0,s.D7)(),c=(0,s.E)(l);return await(0,a.GZ)(t,o,{style:r,isTitle:n,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},l)},"createLabel"),T=(0,l.K2)((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),w=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.GX)(e),v=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),w=(0,s.E)(r),k=v.insert("g").attr("class","cluster-label ");let C;C="markdown"===e.labelType?await(0,a.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:w,isNode:!0,width:e.width}):await x(k,e.label,e.labelStyle||"",!1,!0);let E=C.getBBox();if((0,s.E)(r)){const t=C.children[0],e=(0,c.Ltv)(C);E=t.getBoundingClientRect(),e.attr("width",E.width),e.attr("height",E.height)}const S=e.width<=E.width+e.padding?E.width+e.padding:e.width;e.width<=E.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const _=e.height,A=e.x-S/2,R=e.y-_/2;let L;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(v),r=(0,i.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:u}),n=t.path(T(A,R,S,_,0),r);L=v.insert(()=>(l.Rm.debug("Rough node insert CXC",n),n),":first-child"),L.select("path:nth-child(2)").attr("style",m.join(";")),L.select("path").attr("style",y.join(";").replace("fill","stroke"))}else L=v.insert("rect",":first-child"),L.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",R).attr("width",S).attr("height",_);const{subGraphTitleTopMargin:I}=(0,n.O)(r);if(k.attr("transform",`translate(${e.x-E.width/2}, ${e.y-e.height/2+I})`),f){const t=k.select("span");t&&t.attr("style",f)}const D=L.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=E.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:v,labelBBox:E}},"rect"),k=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return b(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),C=(0,l.K2)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=n,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const m=await x(f,e.label,e.labelStyle,void 0,!0);let y=m.getBBox();if((0,s.E)(r)){const t=m.children[0],e=(0,c.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const v=0*e.padding,w=v/2,k=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+v;e.width<=y.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height+v,E=e.height+v-y.height-6,S=e.x-k/2,_=e.y-C/2;e.width=k;const A=e.y-e.height/2-w+y.height+2;let R;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=h.A.svg(d),n=e.rx||e.ry?r.path(T(S,_,k,C,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):r.rectangle(S,_,k,C,{seed:i});R=d.insert(()=>n,":first-child");const s=r.rectangle(S,A,k,E,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:i});R=d.insert(()=>n,":first-child"),g=d.insert(()=>s)}else{R=p.insert("rect",":first-child");const t="outer";R.attr("class",t).attr("x",S).attr("y",_).attr("width",k).attr("height",C).attr("data-look",e.look),g.attr("class","inner").attr("x",S).attr("y",A).attr("width",k).attr("height",E)}f.attr("transform",`translate(${e.x-y.width/2}, ${_+1-((0,s.E)(r)?0:3)})`);const L=R.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return b(e,t)},{cluster:d,labelBBox:y}},"roundedWithTitle"),E=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:m,backgroundStyles:y}=(0,i.GX)(e),v=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=(0,s.E)(r),w=v.insert("g").attr("class","cluster-label "),k=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width});let C=k.getBBox();if((0,s.E)(r)){const t=k.children[0],e=(0,c.Ltv)(k);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}const E=e.width<=C.width+e.padding?C.width+e.padding:e.width;e.width<=C.width+e.padding?e.diff=(E-e.width)/2-e.padding:e.diff=-e.padding;const S=e.height,_=e.x-E/2,A=e.y-S/2;let R;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(v),r=(0,i.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:4,seed:u}),n=t.path(T(_,A,E,S,e.rx),r);R=v.insert(()=>(l.Rm.debug("Rough node insert CXC",n),n),":first-child"),R.select("path:nth-child(2)").attr("style",m.join(";")),R.select("path").attr("style",y.join(";").replace("fill","stroke"))}else R=v.insert("rect",":first-child"),R.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",_).attr("y",A).attr("width",E).attr("height",S);const{subGraphTitleTopMargin:L}=(0,n.O)(r);if(w.attr("transform",`translate(${e.x-C.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const I=R.node().getBBox();return e.offsetX=0,e.width=I.width,e.height=I.height,e.offsetY=C.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:v,labelBBox:C}},"kanbanSection"),S={rect:w,squareRect:w,roundedWithTitle:C,noteGroup:k,divider:(0,l.K2)((t,e)=>{const r=(0,s.D7)(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),l=o.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const d=e.height+c,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=h.A.svg(o).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});g=o.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const m=g.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return b(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:E},_=new Map,A=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",n=await S[r](t,e);return _.set(e.id,n),n},"insertCluster"),R=(0,l.K2)(()=>{_=new Map},"clear");function L(t,e){return t.intersect(e)}(0,l.K2)(L,"intersectNode");var I=L;function D(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,s=a-n.y,l=Math.sqrt(e*e*s*s+r*r*o*o),c=Math.abs(e*r*o/l);n.x<i&&(c=-c);var h=Math.abs(e*r*s/l);return n.y<a&&(h=-h),{x:i+c,y:a+h}}(0,l.K2)(D,"intersectEllipse");var N=D;function M(t,e,r){return N(t,e,e,r)}(0,l.K2)(M,"intersectCircle");var O=M;function $(t,e,r,n){{const i=e.y-t.y,a=t.x-e.x,o=e.x*t.y-t.x*e.y,s=i*r.x+a*r.y+o,l=i*n.x+a*n.y+o,c=1e-6;if(0!==s&&0!==l&&P(s,l))return;const h=n.y-r.y,u=r.x-n.x,d=n.x*r.y-r.x*n.y,p=h*t.x+u*t.y+d,f=h*e.x+u*e.y+d;if(Math.abs(p)<c&&Math.abs(f)<c&&P(p,f))return;const g=i*u-h*a;if(0===g)return;const m=Math.abs(g/2);let y=a*d-u*o;const v=y<0?(y-m)/g:(y+m)/g;y=h*o-i*d;return{x:v,y:y<0?(y-m)/g:(y+m)/g}}}function P(t,e){return t*e>0}(0,l.K2)($,"intersectLine"),(0,l.K2)(P,"sameSign");var B=$;function F(t,e,r){let n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=n-t.width/2-o,c=i-t.height/2-s;for(let h=0;h<e.length;h++){let n=e[h],i=e[h<e.length-1?h+1:0],o=B(t,r,{x:l+n.x,y:c+n.y},{x:l+i.x,y:c+i.y});o&&a.push(o)}return a.length?(a.length>1&&a.sort(function(t,e){let n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return a<l?-1:a===l?0:1}),a[0]):t}(0,l.K2)(F,"intersectPolygon");var z={node:I,circle:O,ellipse:N,polygon:F,rect:b};function K(t,e){const{labelStyles:r}=(0,i.GX)(e);e.labelStyle=r;const n=f(e);let a=n;n||(a="anchor");const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:c}=e,u=h.A.svg(s),d=(0,i.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=u.circle(0,0,2,d),m=s.insert(()=>g,":first-child");return m.attr("class","anchor").attr("style",(0,o.KL)(c)),p(e,m),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),z.circle(e,1,t)},s}function j(t,e,r,n,i,a,o){const s=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=(r-t)/2/i,u=(n-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*a*Math.sin(c)*(o?-1:1),g=l-p*i*Math.cos(c)*(o?-1:1),m=Math.atan2((e-g)/a,(t-f)/i);let y=Math.atan2((n-g)/a,(r-f)/i)-m;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);const v=[];for(let b=0;b<20;b++){const t=m+b/19*y,e=f+i*Math.cos(t),r=g+a*Math.sin(t);v.push({x:e,y:r})}return v}function q(t,e,r){const[n,i]=[e,r].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/n/2)**2))}async function W(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a,c=(0,l.K2)(t=>t+s,"calcTotalHeight"),d=(0,l.K2)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:m,bbox:y}=await u(t,e,f(e)),v=c(e?.height?e?.height:y.height),[b,x]=d(v),T=q(v,b,x),w=(e?.width?e?.width:y.width)+2*o+T-T,k=v,{cssStyles:C}=e,E=[{x:w/2,y:-k/2},{x:-w/2,y:-k/2},...j(-w/2,-k/2,-w/2,k/2,b,x,!1),{x:w/2,y:k/2},...j(w/2,k/2,w/2,-k/2,b,x,!0)],S=h.A.svg(m),_=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=g(E),R=S.path(A,_),L=m.insert(()=>R,":first-child");return L.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",C),n&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(${b/2}, 0)`),p(e,L),e.intersect=function(t){return z.polygon(e,E,t)},m}function U(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,l.K2)(K,"anchor"),(0,l.K2)(j,"generateArcPoints"),(0,l.K2)(q,"calculateArcSagitta"),(0,l.K2)(W,"bowTieRect"),(0,l.K2)(U,"insertPolygonShape");async function G(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?28:a,s="neo"===e.look?24:a,{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=(e?.width??c.width)+("neo"===e.look?2*o:o+12),m=(e?.height??c.height)+("neo"===e.look?2*s:s),y=-m,v=[{x:12,y},{x:d,y},{x:d,y:0},{x:0,y:0},{x:0,y:y+12},{x:12,y}];let b;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.A.svg(l),r=(0,i.Fr)(e,{}),n=g(v),a=t.path(n,r);b=l.insert(()=>a,":first-child").attr("transform",`translate(${-d/2}, ${m/2})`),x&&b.attr("style",x)}else b=U(l,d,m,v);return n&&b.attr("style",n),p(e,b),e.intersect=function(t){return z.polygon(e,v,t)},l}function Y(t,e){const{nodeStyles:r}=(0,i.GX)(e);e.label="";const n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=h.A.svg(n),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=g(s),d=l.path(u,c),p=n.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return z.polygon(e,s,t)},n}async function V(t,e,r){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:s,bbox:c,halfPadding:d}=await u(t,e,f(e)),g=r?.padding??d,m="neo"===e.look?c.width/2+32:c.width/2+g;let y;const{cssStyles:v}=e;if("handDrawn"===e.look){const t=h.A.svg(s),r=(0,i.Fr)(e,{}),n=t.circle(0,0,2*m,r);y=s.insert(()=>n,":first-child"),y.attr("class","basic label-container").attr("style",(0,o.KL)(v))}else y=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",m).attr("cx",0).attr("cy",0);return p(e,y),e.calcIntersect=function(t,e){const r=t.width/2;return z.circle(t,r,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,m,t),z.circle(e,m,t)},s}function H(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=2*t;return`M ${-n/2*e},${n/2*r} L ${n/2*e},${-n/2*r}\n M ${n/2*e},${n/2*r} L ${-n/2*e},${-n/2*r}`}function X(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),o=Math.max(30,e?.width??0),{cssStyles:s}=e,c=h.A.svg(a),u=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=c.circle(0,0,2*o,u),g=H(o),m=c.path(g,u),y=a.insert(()=>d,":first-child");return y.insert(()=>m),y.attr("class","outer-path"),s&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),p(e,y),e.intersect=function(t){l.Rm.info("crossedCircle intersect",e,{radius:o,point:t});return z.circle(e,o,t)},a}function Z(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=t+r*Math.cos(n),a=e+r*Math.sin(n);o.push({x:-i,y:-a})}return o}async function Q(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l="neo"===e.look?18:e.padding??0,c="neo"===e.look?12:e.padding??0,d=o.width+l,m=o.height+c,y=Math.max(5,.1*m),{cssStyles:v}=e,b=[...Z(d/2,-m/2,y,30,-90,0),{x:-d/2-y,y},...Z(d/2+2*y,-y,y,20,-180,-270),...Z(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:-m/2},...Z(d/2,m/2,y,20,0,90)],x=[{x:d/2,y:-m/2-y},{x:-d/2,y:-m/2-y},...Z(d/2,-m/2,y,20,-90,0),{x:-d/2-y,y:-y},...Z(d/2+.1*d,-y,y,20,-180,-270),...Z(d/2+.1*d,y,y,20,-90,-180),{x:-d/2-y,y:m/2},...Z(d/2,m/2,y,20,0,90),{x:-d/2,y:m/2+y},{x:d/2,y:m/2+y}],T=h.A.svg(a),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=g(b).replace("Z",""),C=T.path(k,w),E=g(x),S=T.path(E,{...w}),_=a.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>C,":first-child"),_.attr("class","text"),v&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",v),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${y}, 0)`),s.attr("transform",`translate(${-d/2+y-(o.x-(o.left??0))},${-m/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,_),e.intersect=function(t){return z.polygon(e,x,t)},a}function J(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=t+r*Math.cos(n),a=e+r*Math.sin(n);o.push({x:i,y:a})}return o}async function tt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l="neo"===e.look?18:e.padding??0,c="neo"===e.look?12:e.padding??0,d=o.width+("neo"===e.look?2*l:l),m=o.height+("neo"===e.look?2*c:c),y=Math.max(5,.1*m),{cssStyles:v}=e,b=[...J(d/2,-m/2,y,20,-90,0),{x:d/2+y,y:-y},...J(d/2+2*y,-y,y,20,-180,-270),...J(d/2+2*y,y,y,20,-90,-180),{x:d/2+y,y:m/2},...J(d/2,m/2,y,20,0,90)],x=[{x:-d/2,y:-m/2-y},{x:d/2,y:-m/2-y},...J(d/2,-m/2,y,20,-90,0),{x:d/2+y,y:-y},...J(d/2+2*y,-y,y,20,-180,-270),...J(d/2+2*y,y,y,20,-90,-180),{x:d/2+y,y:m/2},...J(d/2,m/2,y,20,0,90),{x:d/2,y:m/2+y},{x:-d/2,y:m/2+y}],T=h.A.svg(a),w=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=g(b).replace("Z",""),C=T.path(k,w),E=g(x),S=T.path(E,{...w}),_=a.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>C,":first-child"),_.attr("class","text"),v&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",v),n&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${-y}, 0)`),s.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-m/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,_),e.intersect=function(t){return z.polygon(e,x,t)},a}function et(t,e,r,n=100,i=0,a=180){const o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(n-1);for(let c=0;c<n;c++){const n=s+c*l,i=t+r*Math.cos(n),a=e+r*Math.sin(n);o.push({x:-i,y:-a})}return o}async function rt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l="neo"===e.look?18:e.padding??0,c="neo"===e.look?12:e.padding??0,d=o.width+("neo"===e.look?2*l:l),m=o.height+("neo"===e.look?2*c:c),y=Math.max(5,.1*m),{cssStyles:v}=e,b=[...et(d/2,-m/2,y,30,-90,0),{x:-d/2-y,y},...et(d/2+2*y,-y,y,20,-180,-270),...et(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:-m/2},...et(d/2,m/2,y,20,0,90)],x=[...et(-d/2+y+y/2,-m/2,y,20,-90,-180),{x:d/2-y/2,y},...et(-d/2-y/2,-y,y,20,0,90),...et(-d/2-y/2,y,y,20,-90,0),{x:d/2-y/2,y:-y},...et(-d/2+y+y/2,m/2,y,30,-180,-270)],T=[{x:d/2,y:-m/2-y},{x:-d/2,y:-m/2-y},...et(d/2,-m/2,y,20,-90,0),{x:-d/2-y,y:-y},...et(d/2+2*y,-y,y,20,-180,-270),...et(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:m/2},...et(d/2,m/2,y,20,0,90),{x:-d/2,y:m/2+y},{x:d/2-y-y/2,y:m/2+y},...et(-d/2+y+y/2,-m/2,y,20,-90,-180),{x:d/2-y/2,y},...et(-d/2-y/2,-y,y,20,0,90),...et(-d/2-y/2,y,y,20,-90,0),{x:d/2-y/2,y:-y},...et(-d/2+y+y/2,m/2,y,30,-180,-270)],w=h.A.svg(a),k=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=g(b).replace("Z",""),E=w.path(C,k),S=g(x).replace("Z",""),_=w.path(S,k),A=g(T),R=w.path(A,{...k}),L=a.insert("g",":first-child");return L.insert(()=>R,":first-child").attr("stroke-opacity",0),L.insert(()=>E,":first-child"),L.insert(()=>_,":first-child"),L.attr("class","text"),v&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",v),n&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(${y-y/4}, 0)`),s.attr("transform",`translate(${-d/2+(e.padding??0)/2-(o.x-(o.left??0))},${-m/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,L),e.intersect=function(t){return z.polygon(e,T,t)},a}async function nt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a,{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=Math.max(20,1.25*(c.width+2*o),e?.width??0),m=Math.max(5,c.height+2*s,e?.height??0),v=m/2,{cssStyles:b}=e,x=h.A.svg(l),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const w=d-v,k=m/4,C=[{x:w,y:0},{x:k,y:0},{x:0,y:m/2},{x:k,y:m},{x:w,y:m},...y(-w,-m/2,v,50,270,90)],E=g(C),S=x.path(E,T),_=l.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",b),n&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",n),_.attr("transform",`translate(${-d/2}, ${-m/2})`),p(e,_),e.intersect=function(t){return z.polygon(e,C,t)},l}(0,l.K2)(G,"card"),(0,l.K2)(Y,"choice"),(0,l.K2)(V,"circle"),(0,l.K2)(H,"createLine"),(0,l.K2)(X,"crossedCircle"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceLeft"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraceRight"),(0,l.K2)(et,"generateCirclePoints"),(0,l.K2)(rt,"curlyBraces"),(0,l.K2)(nt,"curvedTrapezoid");var it=(0,l.K2)((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),at=(0,l.K2)((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),ot=(0,l.K2)((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function st(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?24:a,l="neo"===e.look?24:a;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-l,e.width<8&&(e.width=8);const r=t/2/(2.5+t/50);e.height=(e.height??0)-s-3*r,e.height<8&&(e.height=8)}const{shapeSvg:c,bbox:d,label:g}=await u(t,e,f(e)),m=(e.width?e.width:d.width)+l,y=m/2,v=y/(2.5+m/50),b=(e.height?e.height:d.height)+s+v;let x;const{cssStyles:T}=e;if("handDrawn"===e.look){const t=h.A.svg(c),r=at(0,0,m,b,y,v),n=ot(0,v,m,b,y,v),a=(0,i.Fr)(e,{}),o=t.path(r,a),s=t.path(n,(0,i.Fr)(e,{fill:"none"}));x=c.insert(()=>s,":first-child"),x=c.insert(()=>o,":first-child"),x.attr("class","basic label-container"),T&&x.attr("style",T)}else{const t=it(0,0,m,b,y,v);x=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,o.KL)(T)).attr("style",n)}return x.attr("label-offset-y",v),x.attr("transform",`translate(${-m/2}, ${-(b/2+v)})`),p(e,x),g.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${-d.height/2+(e.padding??0)/1.5-(d.y-(d.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),n=r.x-(e.x??0);if(0!=y&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-v)){let i=v*v*(1-n*n/(y*y));i>0&&(i=Math.sqrt(i)),i=v-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},c}async function lt(t,e,r){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;const{shapeSvg:s,bbox:l}=await u(t,e,f(e)),c=Math.max(l.width+2*r.labelPaddingX,e?.width||0),d=Math.max(l.height+2*r.labelPaddingY,e?.height||0),g=-c/2,m=-d/2;let y,{rx:v,ry:b}=e;const{cssStyles:x}=e;if(r?.rx&&r.ry&&(v=r.rx,b=r.ry),"handDrawn"===e.look){const t=h.A.svg(s),r=(0,i.Fr)(e,{}),n=v||b?t.path(T(g,m,c,d,v||0),r):t.rectangle(g,m,c,d,r);y=s.insert(()=>n,":first-child"),y.attr("class","basic label-container").attr("style",(0,o.KL)(x))}else y=s.insert("rect",":first-child"),y.attr("class","basic label-container").attr("style",a).attr("rx",(0,o.KL)(v)).attr("ry",(0,o.KL)(b)).attr("x",g).attr("y",m).attr("width",c).attr("height",d);return p(e,y),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},s}async function ct(t,e){const{cssClasses:r,labelPaddingX:n,labelPaddingY:a,padding:o,width:s,height:l}=e,c={rx:0,ry:0,classes:r??"",labelPaddingX:n??2*(o??0),labelPaddingY:a??o??0},u=await lt(t,e,c);if("handDrawn"===e.look){const t=h.A.svg(u),r=(0,i.Fr)(e,{}),n=u.select(".basic.label-container > path:nth-child(2)"),a=n.node();if(!a)return u;let o=null;return a instanceof SVGGraphicsElement?(o=a.getBBox(),u.insert(()=>t.line(o.x,o.y,o.x+o.width,o.y,r),".basic.label-container g.label"),u.insert(()=>t.line(o.x,o.y+o.height,o.x+o.width,o.y+o.height,r),".basic.label-container g.label"),n.remove(),u):u}const d=u.select(".basic.label-container"),p=(Number(d.attr("width"))||s)??0,f=(Number(d.attr("height"))||l)??0;return p>0&&f>0&&d.attr("stroke-dasharray",`${p} ${f}`),u}async function ht(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,o="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:l,label:c}=await u(t,e,f(e)),d=l.width+a,g=l.height+o,m=.2*g,y=-d/2,v=-g/2-m/2,{cssStyles:b}=e,x=h.A.svg(s),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const w=[{x:y,y:v+m},{x:-y,y:v+m},{x:-y,y:-v},{x:y,y:-v},{x:y,y:v},{x:-y,y:v},{x:-y,y:v+m}],k=x.polygon(w.map(t=>[t.x,t.y]),T),C=s.insert(()=>k,":first-child");return C.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",b),n&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",n),c.attr("transform",`translate(${y+(e.padding??0)/2-(l.x-(l.left??0))}, ${v+m+(e.padding??0)/2-(l.y-(l.top??0))})`),p(e,C),e.intersect=function(t){return z.rect(e,t)},s}async function ut(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e),a="neo"===e.look?12:5;e.labelStyle=r;const s=e.padding??0,c="neo"===e.look?16:s,{shapeSvg:d,bbox:g}=await u(t,e,f(e)),m=(e?.width?e?.width/2:g.width/2)+(c??0),y=m-a;let v;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.A.svg(d),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),n=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),a=t.circle(0,0,2*m,r),s=t.circle(0,0,2*y,n);v=d.insert("g",":first-child"),v.attr("class",(0,o.KL)(e.cssClasses)).attr("style",(0,o.KL)(b)),v.node()?.appendChild(a),v.node()?.appendChild(s)}else{v=d.insert("g",":first-child");const t=v.insert("circle",":first-child"),e=v.insert("circle");v.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",m).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",y).attr("cx",0).attr("cy",0)}return p(e,v),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,m,t),z.circle(e,m,t)},d}function dt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.label="",e.labelStyle=n;const o=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,c=h.A.svg(o),{nodeBorder:u}=r,d=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=c.circle(0,0,14,d),m=o.insert(()=>g,":first-child");return m.selectAll("path").attr("style",`fill: ${u} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",a),p(e,m),e.intersect=function(t){l.Rm.info("filledCircle intersect",e,{radius:7,point:t});return z.circle(e,7,t)},o}(0,l.K2)(st,"cylinder"),(0,l.K2)(lt,"drawRect"),(0,l.K2)(ct,"datastore"),(0,l.K2)(ht,"dividedRectangle"),(0,l.K2)(ut,"doublecircle"),(0,l.K2)(dt,"filledCircle");async function pt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?2*a:a;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-o-o/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:c,label:d}=await u(t,e,f(e)),m=(e?.width?e?.width:c.width)+(o??0),y=e?.height?e?.height:m+c.height,v=[{x:0,y:-y},{x:y,y:-y},{x:y/2,y:0}],{cssStyles:b}=e,x=h.A.svg(s),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const w=g(v),k=x.path(w,T),C=s.insert(()=>k,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`).attr("class","outer-path");return b&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",b),n&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",n),e.width=m,e.height=y,p(e,C),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-y/2+(e.padding??0)/2+(c.y-(c.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,v,t),z.polygon(e,v,t)},s}function ft(t,e,{dir:r,config:{state:n,themeVariables:a}}){const{nodeStyles:o}=(0,i.GX)(e);e.label="";const s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let c=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===r&&(c=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const d=-1*c/2,g=-1*u/2,m=h.A.svg(s),y=(0,i.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const v=m.rectangle(d,g,c,u,y),b=s.insert(()=>v,":first-child");l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),p(e,b);const x=n?.padding??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(t){return z.rect(e,t)},s}async function gt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,o="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*o,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:c}=await u(t,e,f(e)),d=(e?.width?e?.width:Math.max(15,c.width))+2*a,m=(e?.height?e?.height:Math.max(10,c.height))+2*o,v=m/2,{cssStyles:b}=e,x=h.A.svg(s),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const w=[{x:-d/2,y:-m/2},{x:d/2-v,y:-m/2},...y(-d/2+v,0,v,50,90,270),{x:d/2-v,y:m/2},{x:-d/2,y:m/2}],k=g(w),C=x.path(k,T),E=s.insert(()=>C,":first-child");return E.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&E.selectChildren("path").attr("style",b),n&&"handDrawn"!==e.look&&E.selectChildren("path").attr("style",n),p(e,E),e.intersect=function(t){l.Rm.info("Pill intersect",e,{radius:v,point:t});return z.polygon(e,w,t)},s}(0,l.K2)(pt,"flippedTriangle"),(0,l.K2)(ft,"forkJoin"),(0,l.K2)(gt,"halfRoundedRectangle");var mt=(0,l.K2)((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function yt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e),a="neo"===e.look?3.5:4;e.labelStyle=r;const o=e.padding??0,s="neo"===e.look?70:o,l="neo"===e.look?32:o;if(e.width||e.height){const t=(e.height??0)/a;e.width=(e?.width??0)-2*t-l,e.height=(e.height??0)-s}const{shapeSvg:c,bbox:d}=await u(t,e,f(e)),g=(e?.height?e?.height:d.height)+s,m=g/a,y=(e?.width?e?.width:d.width)+2*m+l,v=[{x:m,y:0},{x:y-m,y:0},{x:y,y:-g/2},{x:y-m,y:-g},{x:m,y:-g},{x:0,y:-g/2}];let b;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.A.svg(c),r=(0,i.Fr)(e,{}),n=mt(0,0,y,g,m),a=t.path(n,r);b=c.insert(()=>a,":first-child").attr("transform",`translate(${-y/2}, ${g/2})`),x&&b.attr("style",x)}else b=U(c,y,g,v);return n&&b.attr("style",n),e.width=y,e.height=g,p(e,b),e.intersect=function(t){return z.polygon(e,v,t)},c}async function vt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await u(t,e,f(e)),o=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:c}=e,d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],v=g(y),b=d.path(v,m),x=a.insert(()=>b,":first-child");return x.attr("class","basic label-container outer-path"),c&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",n),x.attr("transform",`translate(${-o/2}, ${-s/2})`),p(e,x),e.intersect=function(t){l.Rm.info("Pill intersect",e,{points:y});return z.polygon(e,y,t)},a}async function bt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:o}=(0,i.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),v="t"===e.pos,b=d,x=d,{nodeBorder:T}=r,{stylesMap:w}=(0,i.WW)(e),k=-x/2,C=-b/2,E=e.label?8:0,S=h.A.svg(g),_=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const A=S.rectangle(k,C,x,b,_),R=Math.max(x,m.width),L=b+m.height+E,I=S.rectangle(-R/2,-L/2,R,L,{..._,fill:"transparent",stroke:"none"}),D=g.insert(()=>A,":first-child"),N=g.insert(()=>I);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),n=r.width,i=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-n/2-o},${v?m.height/2+E/2-i/2-s:-m.height/2-E/2-i/2-s})`),t.attr("style",`color: ${w.get("stroke")??T};`)}return y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${v?-L/2:L/2-m.height})`),D.attr("transform",`translate(0,${v?m.height/2+E/2:-m.height/2-E/2})`),p(e,N),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=v?[{x:r-m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2+m.height+E},{x:r+x/2,y:n-i/2+m.height+E},{x:r+x/2,y:n+i/2},{x:r-x/2,y:n+i/2},{x:r-x/2,y:n-i/2+m.height+E},{x:r-m.width/2,y:n-i/2+m.height+E}]:[{x:r-x/2,y:n-i/2},{x:r+x/2,y:n-i/2},{x:r+x/2,y:n-i/2+b},{x:r+m.width/2,y:n-i/2+b},{x:r+m.width/2/2,y:n+i/2},{x:r-m.width/2,y:n+i/2},{x:r-m.width/2,y:n-i/2+b},{x:r-x/2,y:n-i/2+b}];return z.polygon(e,a,t)},g}async function xt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:o}=(0,i.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,label:y}=await u(t,e,"icon-shape default"),v=e.label?8:0,b="t"===e.pos,{nodeBorder:x,mainBkg:T}=r,{stylesMap:w}=(0,i.WW)(e),k=h.A.svg(g),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const E=w.get("fill");C.stroke=E??T;const S=g.append("g");e.icon&&S.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),A=_.width,R=_.height,L=_.x,I=_.y,D=Math.max(A,R)*Math.SQRT2+40,N=k.circle(0,0,D,C),M=Math.max(D,m.width),O=D+m.height+v,$=k.rectangle(-M/2,-O/2,M,O,{...C,fill:"transparent",stroke:"none"}),P=g.insert(()=>N,":first-child"),B=g.insert(()=>$);return S.attr("transform",`translate(${-A/2-L},${b?m.height/2+v/2-R/2-I:-m.height/2-v/2-R/2-I})`),S.attr("style",`color: ${w.get("stroke")??x};`),y.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-O/2:O/2-m.height})`),P.attr("transform",`translate(0,${b?m.height/2+v/2:-m.height/2-v/2})`),p(e,B),e.intersect=function(t){l.Rm.info("iconSquare intersect",e,t);return z.rect(e,t)},g}async function Tt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:o}=(0,i.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:v}=await u(t,e,"icon-shape default"),b="t"===e.pos,x=d+2*y,w=d+2*y,{nodeBorder:k,mainBkg:C}=r,{stylesMap:E}=(0,i.WW)(e),S=-w/2,_=-x/2,A=e.label?8:0,R=h.A.svg(g),L=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const I=E.get("fill");L.stroke=I??C;const D=R.path(T(S,_,w,x,5),L),N=Math.max(w,m.width),M=x+m.height+A,O=R.rectangle(-N/2,-M/2,N,M,{...L,fill:"transparent",stroke:"none"}),$=g.insert(()=>D,":first-child").attr("class","icon-shape2"),P=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),n=r.width,i=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-n/2-o},${b?m.height/2+A/2-i/2-s:-m.height/2-A/2-i/2-s})`),t.attr("style",`color: ${E.get("stroke")??k};`)}return v.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-M/2:M/2-m.height})`),$.attr("transform",`translate(0,${b?m.height/2+A/2:-m.height/2-A/2})`),p(e,P),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=b?[{x:r-m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2+m.height+A},{x:r+w/2,y:n-i/2+m.height+A},{x:r+w/2,y:n+i/2},{x:r-w/2,y:n+i/2},{x:r-w/2,y:n-i/2+m.height+A},{x:r-m.width/2,y:n-i/2+m.height+A}]:[{x:r-w/2,y:n-i/2},{x:r+w/2,y:n-i/2},{x:r+w/2,y:n-i/2+x},{x:r+m.width/2,y:n-i/2+x},{x:r+m.width/2/2,y:n+i/2},{x:r-m.width/2,y:n+i/2},{x:r-m.width/2,y:n-i/2+x},{x:r-w/2,y:n-i/2+x}];return z.polygon(e,a,t)},g}async function wt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:o}=(0,i.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=n?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:m,halfPadding:y,label:v}=await u(t,e,"icon-shape default"),b="t"===e.pos,x=d+2*y,w=d+2*y,{nodeBorder:k,mainBkg:C}=r,{stylesMap:E}=(0,i.WW)(e),S=-w/2,_=-x/2,A=e.label?8:0,R=h.A.svg(g),L=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const I=E.get("fill");L.stroke=I??C;const D=R.path(T(S,_,w,x,.1),L),N=Math.max(w,m.width),M=x+m.height+A,O=R.rectangle(-N/2,-M/2,N,M,{...L,fill:"transparent",stroke:"none"}),$=g.insert(()=>D,":first-child"),P=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),n=r.width,i=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-n/2-o},${b?m.height/2+A/2-i/2-s:-m.height/2-A/2-i/2-s})`),t.attr("style",`color: ${E.get("stroke")??k};`)}return v.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-M/2:M/2-m.height})`),$.attr("transform",`translate(0,${b?m.height/2+A/2:-m.height/2-A/2})`),p(e,P),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=b?[{x:r-m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2},{x:r+m.width/2,y:n-i/2+m.height+A},{x:r+w/2,y:n-i/2+m.height+A},{x:r+w/2,y:n+i/2},{x:r-w/2,y:n+i/2},{x:r-w/2,y:n-i/2+m.height+A},{x:r-m.width/2,y:n-i/2+m.height+A}]:[{x:r-w/2,y:n-i/2},{x:r+w/2,y:n-i/2},{x:r+w/2,y:n-i/2+x},{x:r+m.width/2,y:n-i/2+x},{x:r+m.width/2/2,y:n+i/2},{x:r-m.width/2,y:n+i/2},{x:r-m.width/2,y:n-i/2+x},{x:r-w/2,y:n-i/2+x}];return z.polygon(e,a,t)},g}async function kt(t,e,{config:{flowchart:r}}){const n=new Image;n.src=e?.img??"",await n.decode();const a=Number(n.naturalWidth.toString().replace("px","")),o=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const c=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const d=Math.max(e.label?c??0:0,e?.assetWidth??a),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,g="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??o;e.width=Math.max(f,c??0);const{shapeSvg:m,bbox:y,label:v}=await u(t,e,"image-shape default"),b="t"===e.pos,x=-f/2,T=-g/2,w=e.label?8:0,k=h.A.svg(m),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const E=k.rectangle(x,T,f,g,C),S=Math.max(f,y.width),_=g+y.height+w,A=k.rectangle(-S/2,-_/2,S,_,{...C,fill:"none",stroke:"none"}),R=m.insert(()=>E,":first-child"),L=m.insert(()=>A);if(e.img){const t=m.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${b?_/2-g:-_/2})`)}return v.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-g/2-y.height/2-w/2:g/2-y.height/2+w/2})`),R.attr("transform",`translate(0,${b?y.height/2+w/2:-y.height/2-w/2})`),p(e,L),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,n=e.y??0,i=e.height??0;let a=[];a=b?[{x:r-y.width/2,y:n-i/2},{x:r+y.width/2,y:n-i/2},{x:r+y.width/2,y:n-i/2+y.height+w},{x:r+f/2,y:n-i/2+y.height+w},{x:r+f/2,y:n+i/2},{x:r-f/2,y:n+i/2},{x:r-f/2,y:n-i/2+y.height+w},{x:r-y.width/2,y:n-i/2+y.height+w}]:[{x:r-f/2,y:n-i/2},{x:r+f/2,y:n-i/2},{x:r+f/2,y:n-i/2+g},{x:r+y.width/2,y:n-i/2+g},{x:r+y.width/2/2,y:n+i/2},{x:r-y.width/2,y:n+i/2},{x:r-y.width/2,y:n-i/2+g},{x:r-f/2,y:n-i/2+g}];return z.polygon(e,a,t)},m}async function Ct(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o=a,s="neo"===e.look?2*a:a,{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=Math.max(c.width+2*(s??0),e?.width??0),m=Math.max(c.height+2*(o??0),e?.height??0),y=[{x:0,y:0},{x:d,y:0},{x:d+3*m/6,y:-m},{x:-3*m/6,y:-m}];let v;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.A.svg(l),r=(0,i.Fr)(e,{}),n=g(y),a=t.path(n,r);v=l.insert(()=>a,":first-child").attr("transform",`translate(${-d/2}, ${m/2})`),b&&v.attr("style",b)}else v=U(l,d,m,y);return n&&v.attr("style",n),e.width=d,e.height=m,p(e,v),e.intersect=function(t){return z.polygon(e,y,t)},l}async function Et(t,e){const{shapeSvg:r,bbox:n,label:i}=await u(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),p(e,a),e.intersect=function(t){return z.rect(e,t)},r}async function St(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o=a,s="neo"===e.look?2*a:a,{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=(e?.height??c.height)+o,m=(e?.width??c.width)+s,y=[{x:0,y:0},{x:m+3*d/6,y:0},{x:m,y:-d},{x:-3*d/6,y:-d}];let v;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.A.svg(l),r=(0,i.Fr)(e,{}),n=g(y),a=t.path(n,r);v=l.insert(()=>a,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),b&&v.attr("style",b)}else v=U(l,m,d,y);return n&&v.attr("style",n),e.width=m,e.height=d,p(e,v),e.intersect=function(t){return z.polygon(e,y,t)},l}async function _t(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o=a,s="neo"===e.look?2*a:a,{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=(e?.height??c.height)+o,m=(e?.width??c.width)+s,y=[{x:-3*d/6,y:0},{x:m,y:0},{x:m+3*d/6,y:-d},{x:0,y:-d}];let v;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.A.svg(l),r=(0,i.Fr)(e,{}),n=g(y),a=t.path(n,r);v=l.insert(()=>a,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),b&&v.attr("style",b)}else v=U(l,m,d,y);return n&&v.attr("style",n),e.width=m,e.height=d,p(e,v),e.intersect=function(t){return z.polygon(e,y,t)},l}function At(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=Math.max(35,e?.width??0),c=Math.max(35,e?.height??0),u=[{x:s,y:0},{x:0,y:c+3.5},{x:s-14,y:c+3.5},{x:0,y:2*c},{x:s,y:c-3.5},{x:14,y:c-3.5}],d=h.A.svg(a),m=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const y=g(u),v=d.path(y,m),b=a.insert(()=>v,":first-child");return b.attr("class","outer-path"),o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(-${s/2},${-c})`),p(e,b),e.intersect=function(t){l.Rm.info("lightningBolt intersect",e,t);return z.polygon(e,u,t)},a}(0,l.K2)(yt,"hexagon"),(0,l.K2)(vt,"hourglass"),(0,l.K2)(bt,"icon"),(0,l.K2)(xt,"iconCircle"),(0,l.K2)(Tt,"iconRounded"),(0,l.K2)(wt,"iconSquare"),(0,l.K2)(kt,"imageSquare"),(0,l.K2)(Ct,"inv_trapezoid"),(0,l.K2)(Et,"labelRect"),(0,l.K2)(St,"lean_left"),(0,l.K2)(_t,"lean_right"),(0,l.K2)(At,"lightningBolt");var Rt=(0,l.K2)((t,e,r,n,i,a,o)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Lt=(0,l.K2)((t,e,r,n,i,a,o)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},${e+a+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),It=(0,l.K2)((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Dt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?24:a;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-l-3*r,e.height<10&&(e.height=10)}const{shapeSvg:c,bbox:d,label:g}=await u(t,e,f(e)),m=(e?.width?e?.width:d.width)+2*s,y=m/2,v=y/(2.5+m/50),b=(e?.height?e?.height:d.height)+v+2*l,x=.1*b;let T;const{cssStyles:w}=e;if("handDrawn"===e.look){const t=h.A.svg(c),r=Lt(0,0,m,b,y,v,x),n=It(0,v,m,b,y,v),a=(0,i.Fr)(e,{}),o=t.path(r,a),s=t.path(n,a);c.insert(()=>s,":first-child").attr("class","line"),T=c.insert(()=>o,":first-child"),T.attr("class","basic label-container"),w&&T.attr("style",w)}else{const t=Rt(0,0,m,b,y,v,x);T=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,o.KL)(w)).attr("style",n)}return T.attr("label-offset-y",v),T.attr("transform",`translate(${-m/2}, ${-(b/2+v)})`),p(e,T),g.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${-d.height/2+v-(d.y-(d.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),n=r.x-(e.x??0);if(0!=y&&(Math.abs(n)<(e.width??0)/2||Math.abs(n)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-v)){let i=v*v*(1-n*n/(y*y));i>0&&(i=Math.sqrt(i)),i=v-i,t.y-(e.y??0)>0&&(i=-i),r.y+=i}return r},c}async function Nt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*o,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:l,bbox:c,label:d}=await u(t,e,f(e)),g=(e?.width?e?.width:c.width)+2*(o??0),y=(e?.height?e?.height:c.height)+2*(s??0),v="neo"===e.look?y/4:y/8,b=y+v,{cssStyles:x}=e,T=h.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-g/2-g/2*.1,y:-b/2},{x:-g/2-g/2*.1,y:b/2},...m(-g/2-g/2*.1,b/2,g/2+g/2*.1,b/2,v,.8),{x:g/2+g/2*.1,y:-b/2},{x:-g/2-g/2*.1,y:-b/2},{x:-g/2,y:-b/2},{x:-g/2,y:b/2*1.1},{x:-g/2,y:-b/2}],C=T.polygon(k.map(t=>[t.x,t.y]),w),E=l.insert(()=>C,":first-child");return E.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-v/2})`),d.attr("transform",`translate(${-g/2+(e.padding??0)+g/2*.1/2-(c.x-(c.left??0))},${-y/2+(e.padding??0)-v/2-(c.y-(c.top??0))})`),p(e,E),e.intersect=function(t){return z.polygon(e,k,t)},l}async function Mt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o-2*l,10),e.height=Math.max((e?.height??0)-2*s-2*l,10));const{shapeSvg:c,bbox:d,label:m}=await u(t,e,f(e)),y=(e?.width?e?.width:d.width)+2*o+2*l-2*l,b=(e?.height?e?.height:d.height)+2*s+2*l-2*l,x=-y/2,T=-b/2,{cssStyles:w}=e,k=h.A.svg(c),C=(0,i.Fr)(e,{}),E=[{x:x-l,y:T+l},{x:x-l,y:T+b+l},{x:x+y-l,y:T+b+l},{x:x+y-l,y:T+b},{x:x+y,y:T+b},{x:x+y,y:T+b-l},{x:x+y+l,y:T+b-l},{x:x+y+l,y:T-l},{x:x+l,y:T-l},{x:x+l,y:T},{x,y:T},{x,y:T+l}],S=[{x,y:T+l},{x:x+y-l,y:T+l},{x:x+y-l,y:T+b},{x:x+y,y:T+b},{x:x+y,y:T},{x,y:T}];"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=g(E);let A=k.path(_,C);const R=g(S);let L=k.path(R,C);"handDrawn"!==e.look&&(A=v(A),L=v(L));const I=c.insert("g",":first-child");return I.insert(()=>A),I.insert(()=>L),I.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",w),n&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",n),m.attr("transform",`translate(${-d.width/2-l-(d.x-(d.left??0))}, ${-d.height/2+l-(d.y-(d.top??0))})`),p(e,I),e.intersect=function(t){return z.polygon(e,E,t)},c}async function Ot(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=e.padding??0,c="neo"===e.look?16:l,d="neo"===e.look?12:l;let y=!0;(e.width||e.height)&&(y=!1,e.width=(e?.width??0)-2*c,e.height=(e?.height??0)-3*d);const v=Math.max(o.width,e?.width??0)+2*c,b=Math.max(o.height,e?.height??0)+3*d,x="neo"===e.look?b/4:b/8,T=b+(y?x/2:-x/2),w=-v/2,k=-T/2,C=10,{cssStyles:E}=e,S=m(w-C,k+T+C,w+v-C,k+T+C,x,.8),_=S?.[S.length-1],A=[{x:w-C,y:k+C},{x:w-C,y:k+T+C},...S,{x:w+v-C,y:_.y-C},{x:w+v,y:_.y-C},{x:w+v,y:_.y-20},{x:w+v+C,y:_.y-20},{x:w+v+C,y:k-C},{x:w+C,y:k-C},{x:w+C,y:k},{x:w,y:k},{x:w,y:k+C}],R=[{x:w,y:k+C},{x:w+v-C,y:k+C},{x:w+v-C,y:_.y-C},{x:w+v,y:_.y-C},{x:w+v,y:k},{x:w,y:k}],L=h.A.svg(a),I=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(I.roughness=0,I.fillStyle="solid");const D=g(A),N=L.path(D,I),M=g(R),O=L.path(M,I),$=a.insert(()=>N,":first-child");return $.insert(()=>O),$.attr("class","basic label-container outer-path"),E&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",E),n&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(0,${-x/2})`),s.attr("transform",`translate(${-o.width/2-C-(o.x-(o.left??0))}, ${-o.height/2+C-x/2-(o.y-(o.top??0))})`),p(e,$),e.intersect=function(t){return z.polygon(e,A,t)},a}async function $t(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;e.useHtmlLabels||(0,s.E)((0,s.zj)())||(e.centerLabel=!0);const{shapeSvg:o,bbox:l,label:c}=await u(t,e,f(e)),d=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),m=-d/2,y=-g/2,{cssStyles:v}=e,b=h.A.svg(o),x=(0,i.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const T=b.rectangle(m,y,d,g,x),w=o.insert(()=>T,":first-child");return w.attr("class","basic label-container outer-path"),c.attr("class","label noteLabel"),v&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",v),a&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",a),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,w),e.intersect=function(t){return z.rect(e,t)},o}(0,l.K2)(Dt,"linedCylinder"),(0,l.K2)(Nt,"linedWaveEdgedRect"),(0,l.K2)(Mt,"multiRect"),(0,l.K2)(Ot,"multiWaveEdgedRectangle"),(0,l.K2)($t,"note");var Pt=(0,l.K2)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Bt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+(e.padding??0)+(o.height+(e.padding??0)),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=Pt(0,0,s),o=t.path(n,r);c=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),d&&c.attr("style",d)}else c=U(a,s,s,l),c.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return n&&c.attr("style",n),p(e,c),e.calcIntersect=function(t,e){const r=t.width,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],i=z.polygon(t,n,e);return{x:i.x-.5,y:i.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function Ft(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?21:a??0,s="neo"===e.look?12:a??0,{shapeSvg:l,bbox:c,label:d}=await u(t,e,f(e)),m=-((e?.width??c.width)+("neo"===e.look?2*o:o))/2,y=-((e?.height??c.height)+("neo"===e.look?2*s:s))/2,v=y/2,b=[{x:m+v,y},{x:m,y:0},{x:m+v,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:x}=e,T=h.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=g(b),C=T.path(k,w),E=l.insert(()=>C,":first-child");return E.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${-v/2},0)`),d.attr("transform",`translate(${-v/2-c.width/2-(c.x-(c.left??0))}, ${-c.height/2-(c.y-(c.top??0))})`),p(e,E),e.intersect=function(t){return z.polygon(e,b,t)},l}async function zt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=o.insert("g"),d=o.insert("g").attr("class","label").attr("style",n),f=e.description,g=e.label,m=await x(d,g,e.labelStyle,!0,!0);let y={width:0,height:0};if((0,s.E)((0,s.D7)())){const t=m.children[0],e=(0,c.Ltv)(m);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}l.Rm.info("Text 2",f);const v=f||[],b=m.getBBox(),w=await x(d,Array.isArray(v)?v.join("<br/>"):v,e.labelStyle,!0,!0),k=w.children[0],C=(0,c.Ltv)(w);y=k.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height);const E=(e.padding||0)/2;(0,c.Ltv)(w).attr("transform","translate( "+(y.width>b.width?0:(b.width-y.width)/2)+", "+(b.height+E+5)+")"),(0,c.Ltv)(m).attr("transform","translate( "+(y.width<b.width?0:-(b.width-y.width)/2)+", 0)"),y=d.node().getBBox(),d.attr("transform","translate("+-y.width/2+", "+(-y.height/2-E+3)+")");const S=y.width+(e.padding||0),_=y.height+(e.padding||0),A=-y.width/2-E,R=-y.height/2-E;let L,I;if("handDrawn"===e.look){const t=h.A.svg(o),r=(0,i.Fr)(e,{}),n=t.path(T(A,R,S,_,e.rx||0),r),a=t.line(-y.width/2-E,-y.height/2-E+b.height+E,y.width/2+E,-y.height/2-E+b.height+E,r);I=o.insert(()=>(l.Rm.debug("Rough node insert CXC",n),a),":first-child"),L=o.insert(()=>(l.Rm.debug("Rough node insert CXC",n),n),":first-child")}else L=u.insert("rect",":first-child"),I=u.insert("line"),L.attr("class","outer title-state").attr("style",n).attr("x",-y.width/2-E).attr("y",-y.height/2-E).attr("width",y.width+(e.padding||0)).attr("height",y.height+(e.padding||0)),I.attr("class","divider").attr("x1",-y.width/2-E).attr("x2",y.width/2+E).attr("y1",-y.height/2-E+b.height+E).attr("y2",-y.height/2-E+b.height+E);return p(e,L),e.intersect=function(t){return z.rect(e,t)},o}async function Kt(t,e,{config:{themeVariables:r}}){const n=r?.radius??5;return lt(t,e,{rx:n,ry:n,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}(0,l.K2)(Bt,"question"),(0,l.K2)(Ft,"rect_left_inv_arrow"),(0,l.K2)(zt,"rectWithTitle"),(0,l.K2)(Kt,"roundedRect");async function jt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:c,label:d}=await u(t,e,f(e)),g=(e?.width??c.width)+2*a+("neo"===e.look?8:16),m=(e?.height??c.height)+2*s,y=g-8,v=m,b=8-g/2,x=-m/2,{cssStyles:T}=e,w=h.A.svg(l),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=[{x:b,y:x},{x:b+y,y:x},{x:b+y,y:x+v},{x:b-8,y:x+v},{x:b-8,y:x},{x:b,y:x},{x:b,y:x+v}],E=w.polygon(C.map(t=>[t.x,t.y]),k),S=l.insert(()=>E,":first-child");return S.attr("class","basic label-container outer-path").attr("style",(0,o.KL)(T)),n&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",n),T&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",n),d.attr("transform",`translate(${4-c.width/2-(c.x-(c.left??0))}, ${-c.height/2-(c.y-(c.top??0))})`),p(e,S),e.intersect=function(t){return z.rect(e,t)},l}async function qt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:l,bbox:c,label:d}=await u(t,e,f(e)),m=(e?.width?e?.width:c.width)+2*o,y=1.5*((e?.height?e?.height:c.height)+2*s)/1.5,v=-m/2,b=-y/2,{cssStyles:x}=e,T=h.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:v,y:b},{x:v,y:b+y},{x:v+m,y:b+y},{x:v+m,y:b-y/2}],C=g(k),E=T.path(C,w),S=l.insert(()=>E,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),n&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",n),S.attr("transform",`translate(0, ${y/4})`),d.attr("transform",`translate(${-m/2+(e.padding??0)-(c.x-(c.left??0))}, ${-y/4+(e.padding??0)-(c.y-(c.top??0))})`),p(e,S),e.intersect=function(t){return z.polygon(e,k,t)},l}async function Wt(t,e){const r=e.padding??0,n="neo"===e.look?16:2*r,i="neo"===e.look?12:r;return lt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??n,labelPaddingY:i})}async function Ut(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?20:a,s="neo"===e.look?12:a,{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=c.height+("neo"===e.look?2*s:s),m=c.width+d/4+("neo"===e.look?2*o:o),v=d/2,{cssStyles:b}=e,x=h.A.svg(l),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const w=[{x:-m/2+v,y:-d/2},{x:m/2-v,y:-d/2},...y(-m/2+v,0,v,50,90,270),{x:m/2-v,y:d/2},...y(m/2-v,0,v,50,270,450)],k=g(w),C=x.path(k,T),E=l.insert(()=>C,":first-child");return E.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&E.selectChildren("path").attr("style",b),n&&"handDrawn"!==e.look&&E.selectChildren("path").attr("style",n),p(e,E),e.intersect=function(t){return z.polygon(e,w,t)},l}async function Gt(t,e){return lt(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function Yt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n;const{cssStyles:o}=e,{lineColor:s,stateBorder:l,nodeBorder:c,nodeShadow:u}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const d=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=h.A.svg(d),g=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=f.circle(0,0,e.width,{...g,stroke:s,strokeWidth:2}),y=l??c,v=5*(e.width??0)/14,b=f.circle(0,0,v,{...g,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),x=d.insert(()=>m,":first-child");if(x.insert(()=>b),"handDrawn"!==e.look&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),a&&x.selectAll("path").attr("style",a),e.width<25&&u&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${r})`)}return p(e,x),e.intersect=function(t){return z.circle(e,(e.width??0)/2,t)},d}function Vt(t,e,{config:{themeVariables:r}}){const{lineColor:n,nodeShadow:a}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const o=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=h.A.svg(o).circle(0,0,e.width,(0,i.ue)(n));s=o.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=o.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&a&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return p(e,s),e.intersect=function(t){return z.circle(e,(e.width??7)/2,t)},o}(0,l.K2)(jt,"shadedProcess"),(0,l.K2)(qt,"slopedRect"),(0,l.K2)(Wt,"squareRect"),(0,l.K2)(Ut,"stadium"),(0,l.K2)(Gt,"state"),(0,l.K2)(Yt,"stateEnd"),(0,l.K2)(Vt,"stateStart");async function Ht(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e?.padding??8,s="neo"===e.look?28:a,l="neo"===e.look?12:a,{shapeSvg:c,bbox:d}=await u(t,e,f(e)),g=(e?.width??d.width)+16+s,m=(e?.height??d.height)+l,y=g-16,v=m,b=-g/2,x=-m/2,T=[{x:0,y:0},{x:y,y:0},{x:y,y:-v},{x:0,y:-v},{x:0,y:0},{x:-8,y:0},{x:y+8,y:0},{x:y+8,y:-v},{x:-8,y:-v},{x:-8,y:0}];if("handDrawn"===e.look){const t=h.A.svg(c),r=(0,i.Fr)(e,{}),n=t.rectangle(b,x,y+16,v,r),a=t.line(b+8,x,b+8,x+v,r),s=t.line(b+8+y,x,b+8+y,x+v,r);c.insert(()=>a,":first-child"),c.insert(()=>s,":first-child");const l=c.insert(()=>n,":first-child"),{cssStyles:u}=e;l.attr("class","basic label-container").attr("style",(0,o.KL)(u)),p(e,l)}else{const t=U(c,y,v,T);n&&t.attr("style",n),p(e,t)}return e.intersect=function(t){return z.polygon(e,T,t)},c}(0,l.K2)(Ht,"subroutine");async function Xt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*o-.2*(e.height+2*s),10));const{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=(e?.height?e?.height:c.height)+2*s,m=.2*d,y=.2*d,v=(e?.width?e?.width:c.width)+2*o+m-m,b=d,x=-v/2,T=-b/2,{cssStyles:w}=e,k=h.A.svg(l),C=(0,i.Fr)(e,{}),E=[{x:x-m/2,y:T},{x:x+v+m/2,y:T},{x:x+v+m/2,y:T+b},{x:x-m/2,y:T+b}],S=[{x:x+v-m/2,y:T+b},{x:x+v+m/2,y:T+b},{x:x+v+m/2,y:T+b-y}];"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=g(E),A=k.path(_,C),R=g(S),L=k.path(R,{...C,fillStyle:"solid"}),I=l.insert(()=>L,":first-child");return I.insert(()=>A,":first-child"),I.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",w),n&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",n),p(e,I),e.intersect=function(t){return z.polygon(e,E,t)},l}async function Zt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=c/8,y=.2*l,v=.2*c,b=c+d,{cssStyles:x}=e,T=h.A.svg(a),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:b/2},...m(-l/2-l/2*.1,b/2,l/2+l/2*.1,b/2,d,.8),{x:l/2+l/2*.1,y:-b/2},{x:-l/2-l/2*.1,y:-b/2}],C=-l/2+l/2*.1,E=-b/2-.4*v,S=[{x:C+l-y,y:1.3*(E+c)},{x:C+l,y:E+c-v},{x:C+l,y:.9*(E+c)},...m(C+l,1.25*(E+c),C+l-y,1.3*(E+c),.02*-c,.5)],_=g(k),A=T.path(_,w),R=g(S),L=T.path(R,{...w,fillStyle:"solid"}),I=a.insert(()=>L,":first-child");return I.insert(()=>A,":first-child"),I.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&I.selectAll("path").attr("style",n),I.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-c/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),p(e,I),e.intersect=function(t){return z.polygon(e,k,t)},a}async function Qt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+(e.padding??0),e?.width||0),l=Math.max(o.height+(e.padding??0),e?.height||0),c=-s/2,h=-l/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",s).attr("height",l),p(e,d),e.intersect=function(t){return z.rect(e,t)},a}(0,l.K2)(Xt,"taggedRect"),(0,l.K2)(Zt,"taggedWaveEdgedRectangle"),(0,l.K2)(Qt,"text");var Jt=(0,l.K2)((t,e,r,n,i,a)=>`M${t},${e}\n a${i},${a} 0,0,1 0,${-n}\n l${r},0\n a${i},${a} 0,0,1 0,${n}\n M${r},${-n}\n a${i},${a} 0,0,0 0,${n}\n l${-r},0`,"createCylinderPathD"),te=(0,l.K2)((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ee=(0,l.K2)((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function re(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?12:a/2;if(e.width||e.height){const t=e.height??0;e.height=(e.height??0)-s,e.height<5&&(e.height=5);const r=t/2/(2.5+t/50);e.width=(e.width??0)-s-3*r,e.width<10&&(e.width=10)}const{shapeSvg:l,bbox:c,label:d}=await u(t,e,f(e)),g=(e.height?e.height:c.height)+s,m=g/2,y=m/(2.5+g/50),v=(e.width?e.width:c.width)+y+s,{cssStyles:b}=e;let x;if("handDrawn"===e.look){const t=h.A.svg(l),r=te(0,0,v,g,y,m),n=ee(0,0,v,g,y,m),a=t.path(r,(0,i.Fr)(e,{})),o=t.path(n,(0,i.Fr)(e,{fill:"none"}));x=l.insert(()=>o,":first-child"),x=l.insert(()=>a,":first-child"),x.attr("class","basic label-container"),b&&x.attr("style",b)}else{const t=Jt(0,0,v,g,y,m);x=l.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",n),x.attr("class","basic label-container outer-path"),b&&x.selectAll("path").attr("style",b),n&&x.selectAll("path").attr("style",n)}return x.attr("label-offset-x",y),x.attr("transform",`translate(${-v/2}, ${g/2} )`),d.attr("transform",`translate(${-c.width/2-y-(c.x-(c.left??0))}, ${-c.height/2-(c.y-(c.top??0))})`),p(e,x),e.intersect=function(t){const r=z.rect(e,t),n=r.y-(e.y??0);if(0!=m&&(Math.abs(n)<(e.height??0)/2||Math.abs(n)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-y)){let i=y*y*(1-n*n/(m*m));0!=i&&(i=Math.sqrt(Math.abs(i))),i=y-i,t.x-(e.x??0)>0&&(i=-i),r.x+=i}return r},l}async function ne(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o=(e.look,a),s="neo"===e.look?2*a:a,{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=(e?.height??c.height)+o,m=(e?.width??c.width)+s,y=[{x:-3*d/6,y:0},{x:m+3*d/6,y:0},{x:m,y:-d},{x:0,y:-d}];let v;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.A.svg(l),r=(0,i.Fr)(e,{}),n=g(y),a=t.path(n,r);v=l.insert(()=>a,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),b&&v.attr("style",b)}else v=U(l,m,d,y);return n&&v.attr("style",n),e.width=m,e.height=d,p(e,v),e.intersect=function(t){return z.polygon(e,y,t)},l}async function ie(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*o,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=(e?.width?e?.width:c.width)+2*o,m=(e?.height?e?.height:c.height)+2*s,{cssStyles:y}=e,v=h.A.svg(l),b=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const x=[{x:-d/2*.8,y:-m/2},{x:d/2*.8,y:-m/2},{x:d/2,y:-m/2*.6},{x:d/2,y:m/2},{x:-d/2,y:m/2},{x:-d/2,y:-m/2*.6}],T=g(x),w=v.path(T,b),k=l.insert(()=>w,":first-child");return k.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",y),n&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",n),p(e,k),e.intersect=function(t){return z.polygon(e,x,t)},l}(0,l.K2)(re,"tiltedCylinder"),(0,l.K2)(ne,"trapezoid"),(0,l.K2)(ie,"trapezoidalPentagon");async function ae(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?2*a:a;(e.width||e.height)&&(e.width=((e?.width??0)-o)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:c,bbox:d,label:m}=await u(t,e,f(e)),y=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),v=(e?.width?e?.width:d.width)+o,b=e?.height?e?.height:v+d.height,x=[{x:0,y:0},{x:b,y:0},{x:b/2,y:-b}],{cssStyles:T}=e,w=h.A.svg(c),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=g(x),E=w.path(C,k),S=c.insert(()=>E,":first-child").attr("transform",`translate(${-b/2}, ${b/2})`).attr("class","outer-path");return T&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",T),n&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",n),e.width=v,e.height=b,p(e,S),m.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${b/2-(d.height+(e.padding??0)/(y?2:1)-(d.y-(d.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,x,t),z.polygon(e,x,t)},c}async function oe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?12:a;let l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*o,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:c,bbox:d,label:y}=await u(t,e,f(e)),v=(e?.width?e?.width:d.width)+2*(o??0),b=(e?.height?e?.height:d.height)+2*(s??0),x="neo"===e.look?b/4:b/8,T=b+(l?x:-x),{cssStyles:w}=e,k=14-v,C=k>0?k/2:0,E=h.A.svg(c),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const _=[{x:-v/2-C,y:T/2},...m(-v/2-C,T/2,v/2+C,T/2,x,.8),{x:v/2+C,y:-T/2},{x:-v/2-C,y:-T/2}],A=g(_),R=E.path(A,S),L=c.insert(()=>R,":first-child");return L.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",w),n&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(0,${-x/2})`),y.attr("transform",`translate(${-v/2+(e.padding??0)-(d.x-(d.left??0))},${-b/2+(e.padding??0)-x-(d.y-(d.top??0))})`),p(e,L),e.intersect=function(t){return z.polygon(e,_,t)},c}async function se(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,o="neo"===e.look?16:a,s="neo"===e.look?20:a;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*o}const{shapeSvg:l,bbox:c}=await u(t,e,f(e)),d=(e?.width?e?.width:c.width)+2*o,y=(e?.height?e?.height:c.height)+s,v=y/8,b=y+2*v,{cssStyles:x}=e,T=h.A.svg(l),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const k=[{x:-d/2,y:b/2},...m(-d/2,b/2,d/2,b/2,v,1),{x:d/2,y:-b/2},...m(d/2,-b/2,-d/2,-b/2,v,-1)],C=g(k),E=T.path(C,w),S=l.insert(()=>E,":first-child");return S.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",n),p(e,S),e.intersect=function(t){return z.polygon(e,k,t)},l}(0,l.K2)(ae,"triangle"),(0,l.K2)(oe,"waveEdgedRectangle"),(0,l.K2)(se,"waveRectangle");var le=10;async function ce(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,o="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-le,10),e.height=Math.max((e?.height??0)-2*o-le,10));const{shapeSvg:s,bbox:l,label:c}=await u(t,e,f(e)),d=(e?.width?e?.width:l.width)+2*a+le,g=(e?.height?e?.height:l.height)+2*o+le,m=d-le,y=g-le,v=-m/2,b=-y/2,{cssStyles:x}=e,T=h.A.svg(s),w=(0,i.Fr)(e,{}),k=[{x:v-le,y:b-le},{x:v-le,y:b+y},{x:v+m,y:b+y},{x:v+m,y:b-le}],C=`M${v-le},${b-le} L${v+m},${b-le} L${v+m},${b+y} L${v-le},${b+y} L${v-le},${b-le}\n M${v-le},${b} L${v+m},${b}\n M${v},${b-le} L${v},${b+y}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const E=T.path(C,w),S=s.insert(()=>E,":first-child");return S.attr("transform","translate(5, 5)"),S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",n),c.attr("transform",`translate(${-l.width/2+5-(l.x-(l.left??0))}, ${-l.height/2+5-(l.y-(l.top??0))})`),p(e,S),e.intersect=function(t){return z.polygon(e,k,t)},s}(0,l.K2)(ce,"windowPane");var he=new Set(["redux-color","redux-dark-color"]),ue=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function de(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:a}=(0,s.zj)(),{rowEven:l,rowOdd:u,nodeBorder:d,borderColorArray:g}=a;if("handDrawn"===e.look){const{themeVariables:r}=(0,s.zj)(),{background:n}=r,i={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${n}`]};await de(t,i)}const m=(0,s.zj)();e.useHtmlLabels=m.htmlLabels;let y=m.er?.diagramPadding??10,v=m.er?.entityPadding??6;const{cssStyles:b}=e,{labelStyles:x,nodeStyles:T}=(0,i.GX)(e);if(0===r.attributes.length&&e.label){const i={rx:0,ry:0,labelPaddingX:y,labelPaddingY:1.5*y,classes:""};(0,o.Un)(e.label,m)+2*i.labelPaddingX<m.er.minEntityWidth&&(e.width=m.er.minEntityWidth);const a=await lt(t,e,i);if(null!=n&&he.has(n)){const t=r.colorIndex??0;a.attr("data-color-id","color-"+t%g.length)}if(!(0,s._3)(m.htmlLabels)){const t=a.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return a}m.htmlLabels||(y*=1.25,v*=1.25);let w=f(e);w||(w="node default");const k=t.insert("g").attr("class",w).attr("id",e.domId||e.id),C=await pe(k,e.label??"",m,0,0,["name"],x);C.height+=v;let E=0;const S=[],_=[];let A=0,R=0,L=0,I=0,D=!0,N=!0;for(const i of r.attributes){const t=await pe(k,i.type,m,0,E,["attribute-type"],x);A=Math.max(A,t.width+y);const e=await pe(k,i.name,m,0,E,["attribute-name"],x);R=Math.max(R,e.width+y);const r=await pe(k,i.keys.join(),m,0,E,["attribute-keys"],x);L=Math.max(L,r.width+y);const n=await pe(k,i.comment,m,0,E,["attribute-comment"],x);I=Math.max(I,n.width+y);const a=Math.max(t.height,e.height,r.height,n.height)+v;_.push({yOffset:E,rowHeight:a}),E+=a}let M=4;L<=y&&(D=!1,L=0,M--),I<=y&&(N=!1,I=0,M--);const O=k.node().getBBox();if(C.width+2*y-(A+R+L+I)>0){const t=C.width+2*y-(A+R+L+I);A+=t/M,R+=t/M,L>0&&(L+=t/M),I>0&&(I+=t/M)}const $=A+R+L+I,P=h.A.svg(k),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let F=0;_.length>0&&(F=_.reduce((t,e)=>t+(e?.rowHeight??0),0));const K=Math.max(O.width+2*y,e?.width||0,$),j=Math.max((F??0)+C.height,e?.height||0),q=-K/2,W=-j/2;if(k.selectAll("g:not(:first-child)").each((t,e,r)=>{const n=(0,c.Ltv)(r[e]),i=n.attr("transform");let a=0,o=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(a=parseFloat(t[1]),o=parseFloat(t[2]),n.attr("class").includes("attribute-name")?a+=A:n.attr("class").includes("attribute-keys")?a+=A+R:n.attr("class").includes("attribute-comment")&&(a+=A+R+L))}n.attr("transform",`translate(${q+y/2+a}, ${o+W+C.height+v/2})`)}),k.select(".name").attr("transform","translate("+-C.width/2+", "+(W+v/2)+")"),null!=n&&he.has(n)){const t=r.colorIndex??0;k.attr("data-color-id","color-"+t%g.length)}const U=P.rectangle(q,W,K,j,B),G=k.insert(()=>U,":first-child").attr("class","outer-path").attr("style",b.join(""));S.push(0);for(const[i,o]of _.entries()){const t=(i+1)%2==0&&0!==o.yOffset,e=P.rectangle(q,C.height+W+o?.yOffset,K,o?.rowHeight,{...B,fill:t?l:u,stroke:d});k.insert(()=>e,"g.label").attr("style",b.join("")).attr("class","row-rect-"+(t?"even":"odd"))}const Y=1e-4;let V=fe(q,C.height+W,K+q,C.height+W,Y),H=P.polygon(V.map(t=>[t.x,t.y]),B);if(k.insert(()=>H).attr("class","divider"),V=fe(A+q,C.height+W,A+q,j+W,Y),H=P.polygon(V.map(t=>[t.x,t.y]),B),k.insert(()=>H).attr("class","divider"),D){const t=A+R+q;V=fe(t,C.height+W,t,j+W,Y),H=P.polygon(V.map(t=>[t.x,t.y]),B),k.insert(()=>H).attr("class","divider")}if(N){const t=A+R+L+q;V=fe(t,C.height+W,t,j+W,Y),H=P.polygon(V.map(t=>[t.x,t.y]),B),k.insert(()=>H).attr("class","divider")}for(const i of S){const t=C.height+W+i;V=fe(q,t,K+q,t,Y),H=P.polygon(V.map(t=>[t.x,t.y]),B),k.insert(()=>H).attr("class","divider")}if(p(e,G),T&&"handDrawn"!==e.look)if(null!=n&&ue.has(n))k.selectAll("path").attr("style",T);else{const t=T.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");k.selectAll("path").attr("style",e??""),k.selectAll(".row-rect-even path").attr("style",T)}return e.intersect=function(t){return z.rect(e,t)},k}async function pe(t,e,r,n=0,i=0,l=[],h=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",h);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));const d=u.node().appendChild(await(0,a.GZ)(u,e,{width:(0,o.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=d.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let p=d.getBBox();if((0,s._3)(r.htmlLabels)){const t=d.children[0];t.style.textAlign="start";const e=(0,c.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}function fe(t,e,r,n,i){return t===r?[{x:t-i/2,y:e},{x:t+i/2,y:e},{x:r+i/2,y:n},{x:r-i/2,y:n}]:[{x:t,y:e-i/2},{x:t,y:e+i/2},{x:r,y:n+i/2},{x:r,y:n-i/2}]}async function ge(t,e,r,n,i=r.class.padding??12){const a=n?0:3,o=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id);let s=null,l=null,c=null,h=null,u=0,d=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await me(s,{text:`«${t}»`},0);u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await me(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const f of e.members){m+=await me(c,f,m,[f.parseClassifier()])+a}p=c.node().getBBox().height,p<=0&&(p=i/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const f of e.methods){y+=await me(h,f,y,[f.parseClassifier()])+a}let v=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),v=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*i})`),v=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*i:2*i)})`),v=o.node().getBBox(),{shapeSvg:o,bbox:v}}async function me(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),h=(0,s.zj)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(h.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!u&&d.startsWith("\\")&&(d=d.substring(1)),(0,s.Wi)(d)&&(u=!0);const p=await(0,a.GZ)(i,(0,s.oB)((0,o.Sm)(d)),{width:(0,o.Un)(d,h)+50,classes:"markdown-node-label",useHtmlLabels:u},h);let f,g=1;if(u){const t=p.children[0],e=(0,c.Ltv)(p);g=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(g+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function n(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=h.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,n=parseInt(t,10)*r+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";r(e)}(0,l.K2)(n,"setupImage"),setTimeout(()=>{e.complete&&n()}),e.addEventListener("error",n),e.addEventListener("load",n)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{n.includes("font-weight: bolder")&&(0,c.Ltv)(p).selectAll("tspan").attr("font-weight",""),g=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes(">")){t.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),f=p.getBBox()}return i.attr("transform","translate(0,"+(-f.height/(2*g)+r)+")"),f.height}async function ye(t,e){const r=(0,s.D7)(),{themeVariables:n}=r,{useGradient:a}=n,o=r.class.padding??12,l=o,u=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,d=e;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];const{shapeSvg:f,bbox:g}=await ge(t,e,r,u,l),{labelStyles:m,nodeStyles:y}=(0,i.GX)(e);e.labelStyle=m,e.cssStyles=d.styles||"";const v=d.styles?.join(";")||y||"";e.cssStyles||(e.cssStyles=v.replaceAll("!important","").split(";"));const b=0===d.members.length&&0===d.methods.length&&!r.class?.hideEmptyMembersBox,x=h.A.svg(f),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const w=Math.max(e.width??0,g.width);let k=Math.max(e.height??0,g.height);const C=(e.height??0)>g.height;0===d.members.length&&0===d.methods.length?k+=l:d.members.length>0&&0===d.methods.length&&(k+=2*l);const E=-w/2,S=-k/2;let _=b?2*o:0===d.members.length&&0===d.methods.length?-o:0;C&&(_=2*o);const A=x.rectangle(E-o,S-o-(b?o:0===d.members.length&&0===d.methods.length?-o/2:0),w+2*o,k+2*o+_,T),R=f.insert(()=>A,":first-child");R.attr("class","basic label-container outer-path");const L=R.node().getBBox(),I=f.select(".annotation-group").node().getBBox().height-(b?o/2:0)||0,D=f.select(".label-group").node().getBBox().height-(b?o/2:0)||0,N=f.select(".members-group").node().getBBox().height-(b?o/2:0)||0,M=(I+D+S+o-(S-o-(b?o:0===d.members.length&&0===d.methods.length?-o/2:0)))/2;if(f.selectAll(".text").each((t,e,n)=>{const i=(0,c.Ltv)(n[e]),a=i.attr("transform");let s=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(s=parseFloat(t[2]))}let h=s+S+o-(b?o:0===d.members.length&&0===d.methods.length?-o/2:0);if(i.attr("class").includes("methods-group")){const t=Math.max(N,l/2);h=C?Math.max(M,I+D+t+S+2*l+o)+2*l:I+D+t+S+4*l+o}0===d.members.length&&0===d.methods.length&&r.class?.hideEmptyMembersBox&&(h=d.annotations.length>0?s-l:s),u||(h-=4);let p=E;(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(p=-i.node()?.getBBox().width/2||0,f.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),i.attr("transform",`translate(${p}, ${h})`)}),d.members.length>0||d.methods.length>0||b){const t=I+D+S+o,r=x.line(L.x,t,L.x+L.width,t+.001,T);f.insert(()=>r).attr("class","divider"+("neo"!==e.look||a?"":" neo-line")).attr("style",v)}if(b||d.members.length>0||d.methods.length>0){const t=I+D+N+S+2*l+o,r=x.line(L.x,C?Math.max(M,t):t,L.x+L.width,(C?Math.max(M,t):t)+.001,T);f.insert(()=>r).attr("class","divider"+("neo"!==e.look||a?"":" neo-line")).attr("style",v)}if("handDrawn"!==d.look&&f.selectAll("path").attr("style",v),R.select(":nth-child(2)").attr("style",v),f.selectAll(".divider").select("path").attr("style",v),e.labelStyle?f.selectAll("span").attr("style",e.labelStyle):f.selectAll("span").attr("style",v),!u){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(v);if(e){const t=e[0].replace("color","fill");f.selectAll("tspan").attr("style",t)}else if(m){const e=t.exec(m);if(e){const t=e[0].replace("color","fill");f.selectAll("tspan").attr("style",t)}}}return p(e,R),e.intersect=function(t){return z.rect(e,t)},f}async function ve(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const a=e,o=e,l="verifyMethod"in e,u=f(e),{themeVariables:d}=(0,s.D7)(),{borderColorArray:g,requirementEdgeLabelBackground:m}=d,y=t.insert("g").attr("class",u).attr("id",e.domId??e.id);let v;v=l?await be(y,`<<${a.type}>>`,0,e.labelStyle):await be(y,"<<Element>>",0,e.labelStyle);let b=v;const x=await be(y,a.name,b,e.labelStyle+"; font-weight: bold;");if(b+=x+20,l){b+=await be(y,""+(a.requirementId?`ID: ${a.requirementId}`:""),b,e.labelStyle);b+=await be(y,""+(a.text?`Text: ${a.text}`:""),b,e.labelStyle);b+=await be(y,""+(a.risk?`Risk: ${a.risk}`:""),b,e.labelStyle),await be(y,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),b,e.labelStyle)}else{b+=await be(y,""+(o.type?`Type: ${o.type}`:""),b,e.labelStyle),await be(y,""+(o.docRef?`Doc Ref: ${o.docRef}`:""),b,e.labelStyle)}const T=(y.node()?.getBBox().width??200)+20,w=(y.node()?.getBBox().height??200)+20,k=-T/2,C=-w/2,E=h.A.svg(y),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const _=E.rectangle(k,C,T,w,S),A=y.insert(()=>_,":first-child");if(A.attr("class","basic label-container outer-path").attr("style",n),g?.length){const t=e.colorIndex??0;y.attr("data-color-id","color-"+t%g.length)}if(y.selectAll(".label").each((t,e,r)=>{const n=(0,c.Ltv)(r[e]),i=n.attr("transform");let a=0,o=0;if(i){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(a=parseFloat(t[1]),o=parseFloat(t[2]))}const s=o-w/2;let l=k+10;0!==e&&1!==e||(l=a),n.attr("transform",`translate(${l}, ${s+20})`)}),b>v+x+20){const t=C+v+x+20;let r;if("neo"===e.look){const e=.001,n=[[k,t],[k+T,t],[k+T,t+e],[k,t+e]];r=E.polygon(n,S)}else r=E.line(k,t,k+T,t,S);y.insert(()=>r).attr("class","divider")}return p(e,A),e.intersect=function(t){return z.rect(e,t)},n&&"handDrawn"!==e.look&&(m||g?.length)&&y.selectAll("path").attr("style",n),y}async function be(t,e,r,n=""){if(""===e)return 0;const i=t.insert("g").attr("class","label").attr("style",n),l=(0,s.D7)(),h=l.htmlLabels??!0,u=await(0,a.GZ)(i,(0,s.oB)((0,o.Sm)(e)),{width:(0,o.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:h,style:n},l);let d;if(h){const t=u.children[0],e=(0,c.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}else{const t=u.children[0];for(const e of t.children)n&&e.setAttribute("style",n);d=u.getBBox(),d.height+=6}return i.attr("transform",`translate(${-d.width/2},${-d.height/2+r})`),d.height}(0,l.K2)(de,"erBox"),(0,l.K2)(pe,"addText"),(0,l.K2)(fe,"lineToPolygon"),(0,l.K2)(ge,"textHelper"),(0,l.K2)(me,"addText"),(0,l.K2)(ye,"classBox"),(0,l.K2)(ve,"requirementBox"),(0,l.K2)(be,"addText");var xe=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Te(t,e,{config:r}){const{labelStyles:n,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=n||"";const o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await u(t,e,f(e)),g=e.padding||10;let m,y="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(y=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),m=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",y).attr("target","_blank"));const v={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let b,x;({label:b,bbox:x}=m?await d(m,"ticket"in e&&e.ticket||"",v):await d(s,"ticket"in e&&e.ticket||"",v));const{label:w,bbox:k}=await d(s,"assigned"in e&&e.assigned||"",v);e.width=o;const C=e?.width||0,E=Math.max(x.height,k.height)/2,S=Math.max(l.height+20,e?.height||0)+E,_=-C/2,A=-S/2;let R;c.attr("transform","translate("+(g-C/2)+", "+(-E-l.height/2)+")"),b.attr("transform","translate("+(g-C/2)+", "+(-E+l.height/2)+")"),w.attr("transform","translate("+(g+C/2-k.width-20)+", "+(-E+l.height/2)+")");const{rx:L,ry:I}=e,{cssStyles:D}=e;if("handDrawn"===e.look){const t=h.A.svg(s),r=(0,i.Fr)(e,{}),n=L||I?t.path(T(_,A,C,S,L||0),r):t.rectangle(_,A,C,S,r);R=s.insert(()=>n,":first-child"),R.attr("class","basic label-container").attr("style",D||null)}else{R=s.insert("rect",":first-child"),R.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",I??5).attr("x",_).attr("y",A).attr("width",C).attr("height",S);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=_+2,n=A+Math.floor((L??0)/2),i=A+S-Math.floor((L??0)/2);e.attr("x1",r).attr("y1",n).attr("x2",r).attr("y2",i).attr("stroke-width","4").attr("stroke",xe(t))}}return p(e,R),e.height=S,e.intersect=function(t){return z.rect(e,t)},s}async function we(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:c,label:d}=await u(t,e,f(e)),g=s.width+10*c,m=s.height+8*c,y=.15*g,{cssStyles:v}=e,b=s.width+20,x=s.height+20,T=Math.max(g,b),w=Math.max(m,x);let k;d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const C=`M0 0 \n a${y},${y} 1 0,0 ${.25*T},${-1*w*.1}\n a${y},${y} 1 0,0 ${.25*T},0\n a${y},${y} 1 0,0 ${.25*T},0\n a${y},${y} 1 0,0 ${.25*T},${.1*w}\n\n a${y},${y} 1 0,0 ${.15*T},${.33*w}\n a${.8*y},${.8*y} 1 0,0 0,${.34*w}\n a${y},${y} 1 0,0 ${-1*T*.15},${.33*w}\n\n a${y},${y} 1 0,0 ${-1*T*.25},${.15*w}\n a${y},${y} 1 0,0 ${-1*T*.25},0\n a${y},${y} 1 0,0 ${-1*T*.25},0\n a${y},${y} 1 0,0 ${-1*T*.25},${-1*w*.15}\n\n a${y},${y} 1 0,0 ${-1*T*.1},${-1*w*.33}\n a${.8*y},${.8*y} 1 0,0 0,${-1*w*.34}\n a${y},${y} 1 0,0 ${.1*T},${-1*w*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=t.path(C,r);k=a.insert(()=>n,":first-child"),k.attr("class","basic label-container").attr("style",(0,o.KL)(v))}else k=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",C);return k.attr("transform",`translate(${-T/2}, ${-w/2})`),p(e,k),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),z.rect(e,t)},a}async function ke(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:c,label:d}=await u(t,e,f(e)),g=s.width+2*c,m=s.height+2*c,y=.15*g,v=.25*g,b=.35*g,x=.2*g,{cssStyles:T}=e;let w;const k=`M0 0 \n a${y},${y} 0 0,1 ${.25*g},${-1*g*.1}\n a${b},${b} 1 0,1 ${.4*g},${-1*g*.1}\n a${v},${v} 1 0,1 ${.35*g},${.2*g}\n\n a${y},${y} 1 0,1 ${.15*g},${.35*m}\n a${x},${x} 1 0,1 ${-1*g*.15},${.65*m}\n\n a${v},${y} 1 0,1 ${-1*g*.25},${.15*g}\n a${b},${b} 1 0,1 ${-1*g*.5},0\n a${y},${y} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${y},${y} 1 0,1 ${-1*g*.1},${-1*m*.35}\n a${x},${x} 1 0,1 ${.1*g},${-1*m*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,i.Fr)(e,{}),n=t.path(k,r);w=a.insert(()=>n,":first-child"),w.attr("class","basic label-container").attr("style",(0,o.KL)(T))}else w=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",k);return d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),w.attr("transform",`translate(${-g/2}, ${-m/2})`),p(e,w),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),z.rect(e,t)},a}async function Ce(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:l}=await u(t,e,f(e)),c=o.width+8*s,h=o.height+2*s,d="neo"===e.look?`\n M${-c/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${c-10}\n q5,0 5,5\n v${h-5}\n H${-c/2}\n Z\n `:`\n M${-c/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${c-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${-(c-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const g=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>l.node()),p(e,g),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},a}async function Ee(t,e){return V(t,e,{padding:e.padding??0})}(0,l.K2)(Te,"kanbanItem"),(0,l.K2)(we,"bang"),(0,l.K2)(ke,"cloud"),(0,l.K2)(Ce,"defaultMindmapNode"),(0,l.K2)(Ee,"mindmapCircle");var Se=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Kt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ut},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ht},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:st},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ct},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:V},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:we},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ke},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Bt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:yt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_t},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:St},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ne},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ct},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ut},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Qt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:G},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:jt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Vt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ft},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:vt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Q},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:At},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:oe},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:gt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:re},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Dt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:nt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ht},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ae},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ce},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:dt},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ie},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:pt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:qt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Ot},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Mt},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:W},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:X},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Zt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:se},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ft},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Nt}],_e=(0,l.K2)(()=>{const t={state:Gt,choice:Y,note:$t,rectWithTitle:zt,labelRect:Et,iconSquare:wt,iconCircle:xt,icon:bt,iconRounded:Tt,imageSquare:kt,anchor:K,kanbanItem:Te,mindmapCircle:Ee,defaultMindmapNode:Ce,classBox:ye,erBox:de,requirementBox:ve},e=[...Object.entries(t),...Se.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Ae(t){return t in _e}(0,l.K2)(Ae,"isValidShape");var Re=new Map;async function Le(t,e,r){let n,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?_e[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return n.attr("data-look",(0,o.KL)(e.look)),e.tooltip&&i.attr("title",e.tooltip),Re.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}(0,l.K2)(Le,"insertNode");var Ie=(0,l.K2)((t,e)=>{Re.set(e.id,t)},"setNodeElem"),De=(0,l.K2)(()=>{Re.clear()},"clear"),Ne=(0,l.K2)(t=>{const e=Re.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},5871(t,e,r){"use strict";function n(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}r.d(e,{S:()=>n}),(0,r(797).K2)(n,"populateCommonDb")},9625(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(797),i=r(1444),a=(0,n.K2)((t,e)=>{let r;"sandbox"===e&&(r=(0,i.Ltv)("#i"+t));return("sandbox"===e?(0,i.Ltv)(r.nodes()[0].contentDocument.body):(0,i.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},8221(t,e,r){"use strict";r.d(e,{pe:()=>A,PX:()=>nt,ru:()=>tt,Un:()=>et,$t:()=>ct,Sm:()=>dt,C4:()=>ut,$C:()=>Y,rY:()=>pt,sM:()=>U,KL:()=>ft,Ib:()=>O,dq:()=>ot,I5:()=>lt,yT:()=>H,vU:()=>N,_K:()=>ht,bH:()=>Q});var n=r(1123),i=r(797),a=r(6750),o=r(1444);function s(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...n){const i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);const o=t.apply(this,n);return r.cache=a.set(i,o)||a,o},n=s.Cache||Map;return r.cache=new n,r}function l(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}s.Cache=Map;var c=r(9125),h=r(9826),u=r(2178),d=r(7110),p=r(2796);function f(t,e,r,n=new Map,i=void 0){const a=i?.(t,e,r,n);if(void 0!==a)return a;if((0,d.s)(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){const e=new Array(t.length);n.set(t,e);for(let a=0;a<t.length;a++)e[a]=f(t[a],a,r,n,i);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;n.set(t,e);for(const[a,o]of t)e.set(a,f(o,a,r,n,i));return e}if(t instanceof Set){const e=new Set;n.set(t,e);for(const a of t)e.add(f(a,void 0,r,n,i));return e}if((0,u.P)(t))return t.subarray();if((0,p.i)(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);n.set(t,e);for(let a=0;a<t.length;a++)e[a]=f(t[a],a,r,n,i);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,e),g(e,t,r,n,i),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return n.set(t,e),g(e,t,r,n,i),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return n.set(t,e),g(e,t,r,n,i),e}if(t instanceof Error){const e=structuredClone(t);return n.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,g(e,t,r,n,i),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return n.set(t,e),g(e,t,r,n,i),e}if(t instanceof Number){const e=new Number(t.valueOf());return n.set(t,e),g(e,t,r,n,i),e}if(t instanceof String){const e=new String(t.valueOf());return n.set(t,e),g(e,t,r,n,i),e}if("object"==typeof t&&function(t){switch((0,c.b)(t)){case h.R_:case h.Uw:case h.cT:case h.iq:case h.$V:case h.vC:case h.ri:case h.ML:case h.XZ:case h.i1:case h._u:case h.pj:case h.kj:case h.GX:case h.Av:case h.NA:case h.OG:case h.VP:case h.Qb:case h.q:case h.x6:case h.ZR:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return n.set(t,e),g(e,t,r,n,i),e}return t}function g(t,e,r=t,n,i){const a=[...Object.keys(e),...l(e)];for(let o=0;o<a.length;o++){const s=a[o],l=Object.getOwnPropertyDescriptor(t,s);(null==l||l.writable)&&(t[s]=f(e[s],s,r,n,i))}}function m(t,e){return function(t,e){return f(t,void 0,t,new Map,e)}(t,(r,n,i,a)=>{const o=e?.(r,n,i,a);if(void 0!==o)return o;if("object"==typeof t){if((0,c.b)(t)===h.GX&&"function"!=typeof t.constructor){const e={};return a.set(t,e),g(e,t,i,a),e}switch(Object.prototype.toString.call(t)){case h.kj:case h.OG:case h.$V:{const e=new t.constructor(t?.valueOf());return g(e,t),e}case h.R_:{const e={};return g(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function y(t){return m(t)}function v(t){return"__proto__"===t}var b=r(4608),x=r(622);function T(t){return"object"==typeof t&&null!==t}function w(t){return T(t)&&(0,x.X)(t)}function k(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];if(null==e)return!1;return!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var C=r(9663);function E(t,e,r,n){if((0,d.s)(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(n.has(e))return function(t){if((0,d.s)(t))return t;if(Array.isArray(t)||(0,p.i)(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}if("undefined"!=typeof File&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if("object"==typeof t){const r=Object.create(e);return Object.assign(r,t)}return t}(n.get(e));if(n.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const i=[...Object.keys(e),...l(e)];for(let a=0;a<i.length;a++){const o=i[a];if(v(o))continue;let s=e[o],l=t[o];if((0,b.N)(s)&&(s={...s}),(0,b.N)(l)&&(l={...l}),(0,u.P)(s)&&(s=y(s)),Array.isArray(s))if(Array.isArray(l)){const t=[],e=Reflect.ownKeys(l);for(let r=0;r<e.length;r++){const n=e[r];t[n]=l[n]}l=t}else if(w(l)){const t=[];for(let e=0;e<l.length;e++)t[e]=l[e];l=t}else l=[];const c=r(l,s,o,t,e,n);void 0!==c?t[o]=c:Array.isArray(s)||T(l)&&T(s)&&(k(l)||k(s)||(0,C.i)(l)||(0,C.i)(s))?t[o]=E(l,s,r,n):null==l&&k(s)?t[o]=E({},s,r,n):null==l&&(0,C.i)(s)?t[o]=y(s):void 0!==l&&void 0===s||(t[o]=s)}return t}function S(){}function _(t,...e){return function(t,...e){const r=e.slice(0,-1),n=e[e.length-1];let i=t;for(let a=0;a<r.length;a++)i=E(i,r[a],n,new Map);return i}(t,...e,S)}var A="",R={curveBasis:o.qrM,curveBasisClosed:o.Yu4,curveBasisOpen:o.IA3,curveBumpX:o.Wi0,curveBumpY:o.PGM,curveBundle:o.OEq,curveCardinalClosed:o.olC,curveCardinalOpen:o.IrU,curveCardinal:o.y8u,curveCatmullRomClosed:o.Q7f,curveCatmullRomOpen:o.cVp,curveCatmullRom:o.oDi,curveLinear:o.lUB,curveLinearClosed:o.Lx9,curveMonotoneX:o.nVG,curveMonotoneY:o.uxU,curveNatural:o.Xf2,curveStep:o.GZz,curveStepAfter:o.UPb,curveStepBefore:o.dyv},L=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,I=(0,i.K2)(function(t,e){const r=D(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,n.$i)(t),i=(0,n.hH)(i,[...t])}else i=r.args;if(!i)return;let a=(0,n.Ch)(t,e);const o="config";return void 0!==i[o]&&("flowchart-v2"===a&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),D=(0,i.K2)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${L.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(r,"").replace(/'/gm,'"'),i.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(a=n.DB.exec(t));)if(a.index===n.DB.lastIndex&&n.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return i.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),N=(0,i.K2)(function(t){return t.replace(n.DB,"")},"removeDirectives"),M=(0,i.K2)(function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");function O(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return R[r]??e}function $(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,i.K2)(O,"interpolateToCurve"),(0,i.K2)($,"formatUrl");var P=(0,i.K2)((t,...e)=>{const r=t.split("."),n=r.length-1,a=r[n];let o=window;for(let s=0;s<n;s++)if(o=o[r[s]],!o)return void i.Rm.error(`Function name: ${t} not found in window`);o[a](...e)},"runFunc");function B(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function F(t){let e,r=0;t.forEach(t=>{r+=B(t,e),e=t});return j(t,r/2)}function z(t){return 1===t.length?t[0]:F(t)}(0,i.K2)(B,"distance"),(0,i.K2)(F,"traverseEdge"),(0,i.K2)(z,"calcLabelPosition");var K=(0,i.K2)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),j=(0,i.K2)((t,e)=>{let r,n=e;for(const i of t){if(r){const t=B(i,r);if(0===t)return r;if(t<n)n-=t;else{const e=n/t;if(e<=0)return r;if(e>=1)return{x:i.x,y:i.y};if(e>0&&e<1)return{x:K((1-e)*r.x+e*i.x,5),y:K((1-e)*r.y+e*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),q=(0,i.K2)((t,e,r)=>{i.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=j(e,25),a=t?10:5,o=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+n.x)/2,s.y=-Math.cos(o)*a+(e[0].y+n.y)/2,s},"calcCardinalityPosition");function W(t,e,r){const n=structuredClone(r);i.Rm.info("our points",n),"start_left"!==e&&"start_right"!==e&&n.reverse();const a=j(n,25+t),o=10+.5*t,s=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(n[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(n[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(n[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(n[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(n[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(n[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(n[0].x+a.x)/2,l.y=-Math.cos(s)*o+(n[0].y+a.y)/2),l}function U(t){let e="",r="";for(const n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}(0,i.K2)(W,"calcTerminalLabelPosition"),(0,i.K2)(U,"getStylesFromArray");var G=0,Y=(0,i.K2)(()=>(G++,"id-"+Math.random().toString(36).substr(2,12)+"-"+G),"generateId");function V(t){let e="";const r="0123456789abcdef";for(let n=0;n<t;n++)e+=r.charAt(Math.floor(16*Math.random()));return e}(0,i.K2)(V,"makeRandomHex");var H=(0,i.K2)(t=>V(t.length),"random"),X=(0,i.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Z=(0,i.K2)(function(t,e){const r=e.text.replace(n.Y2.lineBreakRegex," "),[,i]=lt(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),Q=s((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),n.Y2.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),a=[];let o="";return i.forEach((t,n)=>{const s=et(`${t} `,r),l=et(o,r);if(s>e){const{hyphenatedStrings:n,remainingWord:i}=J(t,e,"-",r);a.push(o,...n),o=i}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");n+1===i.length&&a.push(o)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),J=s((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let o="";return i.forEach((t,s)=>{const l=`${o}${t}`;if(et(l,n)>=e){const t=s+1,e=i.length===t,n=`${l}${r}`;a.push(e?l:n),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function tt(t,e){return nt(t,e).height}function et(t,e){return nt(t,e).width}(0,i.K2)(tt,"calculateTextHeight"),(0,i.K2)(et,"calculateTextWidth");var rt,nt=s((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=lt(r),l=["sans-serif",i],c=t.split(n.Y2.lineBreakRegex),h=[],u=(0,o.Ltv)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const d=u.append("svg");for(const n of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of c){const i=X();i.text=r||A;const o=Z(d,i).style("font-size",s).style("font-weight",a).style("font-family",n),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}h.push(e)}d.remove();return h[isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),it=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,i.K2)(this,"InitIDGenerator")}},at=(0,i.K2)(function(t){return rt=rt||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),rt.innerHTML=t,unescape(rt.textContent)},"entityDecode");function ot(t){return"str"in t}(0,i.K2)(ot,"isDetailedError");var st=(0,i.K2)((t,e,r,n)=>{if(!n)return;const i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),lt=(0,i.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function ct(t,e){return _({},t,e)}(0,i.K2)(ct,"cleanAndMerge");var ht={assignWithDepth:n.hH,wrapLabel:Q,calculateTextHeight:tt,calculateTextWidth:et,calculateTextDimensions:nt,cleanAndMerge:ct,detectInit:I,detectDirective:D,isSubstringInArray:M,interpolateToCurve:O,calcLabelPosition:z,calcCardinalityPosition:q,calcTerminalLabelPosition:W,formatUrl:$,getStylesFromArray:U,generateId:Y,random:H,runFunc:P,entityDecode:at,insertTitle:st,isLabelCoordinateInPath:gt,parseFontSize:lt,InitIDGenerator:it},ut=(0,i.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),dt=(0,i.K2)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),pt=(0,i.K2)((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");function ft(t){return t??null}function gt(t,e){const r=Math.round(t.x),n=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return i.includes(r.toString())||i.includes(n.toString())}(0,i.K2)(ft,"handleUndefinedAttr"),(0,i.K2)(gt,"isLabelCoordinateInPath")},4787(t,e,r){"use strict";r.d(e,{Lh:()=>k,NM:()=>x,_$:()=>f,tM:()=>T});var n=r(2501),i=r(8343),a=r(9625),o=r(4345),s=r(3848),l=r(8221),c=r(1123),h=r(797),u=r(1444),d=r(3047),p=function(){var t=(0,h.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,26],o=[1,42],s=[1,24],l=[1,25],c=[1,32],u=[1,33],d=[1,34],p=[1,45],f=[1,35],g=[1,36],m=[1,37],y=[1,38],v=[1,27],b=[1,28],x=[1,29],T=[1,30],w=[1,31],k=[1,44],C=[1,46],E=[1,43],S=[1,47],_=[1,9],A=[1,8,9],R=[1,58],L=[1,59],I=[1,60],D=[1,61],N=[1,62],M=[1,63],O=[1,64],$=[1,8,9,41],P=[1,77],B=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],F=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],z=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],j=[13,60,68,69,70,71,72,86,100,102,103],q=[1,103],W=[1,121],U=[1,117],G=[1,113],Y=[1,119],V=[1,114],H=[1,115],X=[1,116],Z=[1,118],Q=[1,120],J=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],et=[12,39],rt=[1,8,9,39,41,44,46],nt=[1,8,9,22],it=[1,153],at=[1,8,9,61],ot=[1,8,9,22,50,60,61,82,86,87,88,89,90],st={trace:(0,h.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,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],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:(0,h.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:case 46:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+"."+a[s];break;case 12:case 16:case 110:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+"~"+a[s]+"~";break;case 19:n.addRelation(a[s]);break;case 20:a[s-1].title=n.cleanupLabel(a[s]),n.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 34:n.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),n.popNamespace();break;case 35:n.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),n.popNamespace();break;case 36:this.$=n.addNamespace(a[s]);break;case 37:this.$=n.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 48:n.setCssClass(a[s-2],a[s]);break;case 49:n.addMembers(a[s-3],a[s-1]);break;case 51:n.setCssClass(a[s-5],a[s-3]),n.addMembers(a[s-5],a[s-1]);break;case 52:n.addAnnotation(a[s-3],a[s-1]);break;case 53:n.addAnnotation(a[s-6],a[s-4]),n.addMembers(a[s-6],a[s-1]);break;case 54:n.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],n.addClass(a[s]);break;case 56:this.$=a[s-1],n.addClass(a[s-1]),n.setClassLabel(a[s-1],a[s]);break;case 60:n.addAnnotation(a[s],a[s-2]);break;case 61:case 74:case 107:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:case 65:case 66:break;case 64:n.addMember(a[s-1],n.cleanupLabel(a[s]));break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=n.addNote(a[s],a[s-1]);break;case 72:this.$=n.addNote(a[s]);break;case 73:this.$=a[s-2],n.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:n.setDirection("TB");break;case 77:n.setDirection("BT");break;case 78:n.setDirection("RL");break;case 79:n.setDirection("LR");break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 84:this.$=n.relationType.AGGREGATION;break;case 85:this.$=n.relationType.EXTENSION;break;case 86:this.$=n.relationType.COMPOSITION;break;case 87:this.$=n.relationType.DEPENDENCY;break;case 88:this.$=n.relationType.LOLLIPOP;break;case 89:this.$=n.lineType.LINE;break;case 90:this.$=n.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],n.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],n.setClickEvent(a[s-2],a[s-1]),n.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],n.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],n.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],n.setLink(a[s-2],a[s-1]),n.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],n.setLink(a[s-3],a[s-2],a[s]),n.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],n.setClickEvent(a[s-3],a[s-2],a[s-1]),n.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],n.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],n.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],n.setLink(a[s-3],a[s-1]),n.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],n.setLink(a[s-4],a[s-2],a[s]),n.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],n.setCssStyle(a[s-1],a[s]);break;case 106:n.setCssClass(a[s-1],a[s]);break;case 108:a[s-2].push(a[s]),this.$=a[s-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,48:o,51:s,52:l,54:c,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:b,78:x,82:T,83:w,86:k,100:C,102:E,103:S},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:R,69:L,70:I,71:D,72:N,73:M,74:O}),{39:[1,65]},t($,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:p,86:k,100:C,102:E},{16:39,17:40,19:70,60:p,86:k,100:C,102:E,103:S},{16:39,17:40,19:71,60:p,86:k,100:C,102:E,103:S},{16:39,17:40,19:72,60:p,86:k,100:C,102:E,103:S},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:k,100:C,102:E,103:S},{13:P,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(B,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:k,100:C,102:E,103:S}),t(B,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:k,100:C,102:E,103:S},{16:39,17:40,19:87,60:p,86:k,100:C,102:E,103:S},t(F,[2,133]),t(F,[2,134]),t(F,[2,135]),t(F,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(_,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:e,35:r,37:n,42:i,46:a,48:o,51:s,52:l,54:c,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:b,78:x,82:T,83:w,86:k,100:C,102:E,103:S}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,48:o,51:s,52:l,54:c,56:u,57:d,60:p,62:f,63:g,64:m,65:y,75:v,76:b,78:x,82:T,83:w,86:k,100:C,102:E,103:S},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:k,100:C,102:E,103:S},{53:92,66:56,67:57,68:R,69:L,70:I,71:D,72:N,73:M,74:O},t(A,[2,64]),{67:93,73:M,74:O},t(z,[2,83],{66:94,68:R,69:L,70:I,71:D,72:N}),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(j,[2,89]),t(j,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:o,54:c,56:u},{16:100,60:p,86:k,100:C,102:E},{41:[1,102],45:101,51:q},{16:104,60:p,86:k,100:C,102:E},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:U,59:110,60:G,82:Y,84:111,85:112,86:V,87:H,88:X,89:Z,90:Q},{60:[1,122]},{13:P,55:123},t($,[2,72]),t($,[2,138]),{22:W,50:U,59:124,60:G,61:[1,125],82:Y,84:111,85:112,86:V,87:H,88:X,89:Z,90:Q},t(J,[2,74]),{16:39,17:40,19:126,60:p,86:k,100:C,102:E,103:S},t(B,[2,16]),t(B,[2,17]),t(B,[2,18]),{11:127,12:tt,39:[2,36]},t(et,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:k,100:C,102:E,103:S}),t(et,[2,10]),t(rt,[2,55],{11:131,12:tt}),t(_,[2,7]),{9:[1,132]},t(nt,[2,67]),{16:39,17:40,19:133,60:p,86:k,100:C,102:E,103:S},{13:[1,135],16:39,17:40,19:134,60:p,86:k,100:C,102:E,103:S},t(z,[2,82],{66:136,68:R,69:L,70:I,71:D,72:N}),t(z,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:o,54:c,56:u},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t($,[2,48],{39:[1,142]}),{41:[1,143]},t($,[2,50]),{41:[2,61],45:144,51:q},{47:[1,145]},{16:39,17:40,19:146,60:p,86:k,100:C,102:E,103:S},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:it}),t(at,[2,107],{85:154,22:W,50:U,60:G,82:Y,86:V,87:H,88:X,89:Z,90:Q}),t(ot,[2,109]),t(ot,[2,111]),t(ot,[2,112]),t(ot,[2,113]),t(ot,[2,114]),t(ot,[2,115]),t(ot,[2,116]),t(ot,[2,117]),t(ot,[2,118]),t(ot,[2,119]),t(A,[2,106]),t($,[2,71]),t(A,[2,73],{61:it}),{60:[1,155]},t(B,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:k,100:C,102:E,103:S},t(et,[2,12]),t(rt,[2,56]),{1:[2,4]},t(nt,[2,69]),t(nt,[2,68]),{16:39,17:40,19:158,60:p,86:k,100:C,102:E,103:S},t(z,[2,80]),t($,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:o,54:c,56:u},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:o,54:c,56:u},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:o,54:c,56:u},{45:163,51:q},t($,[2,49]),{41:[2,62]},t($,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:U,60:G,82:Y,84:169,85:112,86:V,87:H,88:X,89:Z,90:Q},t(ot,[2,110]),t(J,[2,75]),{14:[1,170]},t(et,[2,11]),t(nt,[2,70]),t($,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:q},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(at,[2,108],{85:154,22:W,50:U,60:G,82:Y,86:V,87:H,88:X,89:Z,90:Q}),t(rt,[2,8]),t($,[2,51]),{41:[1,175]},t($,[2,54]),t(A,[2,104]),t($,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:(0,h.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,h.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",l=0,c=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,h.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(c=p.yyleng,s=p.yytext,l=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,c,l,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},lt=function(){return{EOF:1,parseError:(0,h.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,h.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,h.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K2)(function(){return this._more=!0,this},"more"),reject:(0,h.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K2)(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,"")},"upcomingInput"),showPosition:(0,h.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,h.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,h.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,h.K2)(function(t,e,r,n){switch(r){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 37:case 41:case 48:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 59:case 62:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 36:return 8;case 15:case 16:return 7;case 17:case 38:case 46:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 40:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:case 44:return this.popState(),41;case 35:case 45:return"EOF_IN_STRUCT";case 39:return this.begin("class"),48;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 47:return"OPEN_IN_STRUCT";case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:case 66:case 67:case 68:return 77;case 69:case 70:return 69;case 71:case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:case 86:return 89;case 87:return 90;case 88:case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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],inclusive:!0}}}}();function ct(){this.yy={}}return st.lexer=lt,(0,h.K2)(ct,"Parser"),ct.prototype=st,st.Parser=ct,new ct}();p.parser=p;var f=p,g=["#","+","~","-",""],m=class{static{(0,h.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const r=(0,c.jZ)(t,(0,c.D7)());this.parseMember(r)}getDisplayDetails(){let t=this.visibility+(0,c.QO)(this.id);"method"===this.memberType&&(t+=`(${(0,c.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,c.QO)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(r){const t=r[1]?r[1].trim():"";if(g.includes(t)&&(this.visibility=t),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const r=t.length,n=t.substring(0,1),i=t.substring(r-1);g.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const r=`${this.visibility?"\\"+this.visibility:""}${(0,c.QO)(this.id)}${"method"===this.memberType?`(${(0,c.QO)(this.parameters)})${this.returnType?" : "+(0,c.QO)(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},y="classId-",v=0,b=(0,h.K2)(t=>c.Y2.sanitizeText(t,(0,c.D7)()),"sanitizeText"),x=class t{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=(0,h.K2)(t=>{const e=(0,i.Ck)();(0,u.Ltv)(t).select("svg").selectAll("g").filter(function(){return null!==(0,u.Ltv)(this).attr("title")}).on("mouseover",t=>{const r=(0,u.Ltv)(t.currentTarget),n=r.attr("title");if(!n)return;const i=t.currentTarget.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(d.A.sanitize(n)).style("left",`${window.scrollX+i.left+i.width/2}px`).style("top",`${window.scrollY+i.bottom+4}px`),r.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,u.Ltv)(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=c.SV,this.getAccTitle=c.iN,this.setAccDescription=c.EI,this.getAccDescription=c.m7,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.getConfig=(0,h.K2)(()=>(0,c.D7)().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{(0,h.K2)(this,"ClassDB")}splitClassNameAndType(t){const e=c.Y2.sanitizeText(t,(0,c.D7)());let r="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=b(t[0]),r=b(t[1])}return{className:n,type:r}}setClassLabel(t,e){const r=c.Y2.sanitizeText(t,(0,c.D7)());e&&(e=b(e));const{className:n}=this.splitClassNameAndType(r);this.classes.get(n).label=e,this.classes.get(n).text=`${e}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(t){const e=c.Y2.sanitizeText(t,(0,c.D7)()),{className:r,type:n}=this.splitClassNameAndType(e);if(this.classes.has(r))return;const i=c.Y2.sanitizeText(r,(0,c.D7)());this.classes.set(i,{id:i,type:n,label:i,text:`${i}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:y+i+"-"+v}),v++}addInterface(t,e){const r={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(r)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){const e=c.Y2.sanitizeText(t,(0,c.D7)());if(this.classes.has(e)){const t=this.classes.get(e).domId;return this.diagramId?`${this.diagramId}-${t}`:t}throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",(0,c.IU)()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){const e="number"==typeof t?`note${t}`:t;return this.notes.get(e)}getNotes(){return this.notes}addRelation(t){h.Rm.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=c.Y2.sanitizeText(t.relationTitle1.trim(),(0,c.D7)()),t.relationTitle2=c.Y2.sanitizeText(t.relationTitle2.trim(),(0,c.D7)()),this.relations.push(t)}addAnnotation(t,e){const r=this.splitClassNameAndType(t).className;this.classes.get(r).annotations.push(e)}addMember(t,e){this.addClass(t);const r=this.splitClassNameAndType(t).className,n=this.classes.get(r);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(b(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new m(t,"method")):t&&n.members.push(new m(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const r=this.notes.size,n={id:`note${r}`,class:e,text:t,index:r};return this.notes.set(n.id,n),n.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),b(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let r=t;/\d/.exec(t[0])&&(r=y+r);const n=this.classes.get(r);n&&(n.cssClasses+=" "+e)})}defineClass(t,e){for(const r of t){let t=this.styleClasses.get(r);void 0===t&&(t={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const r=e.replace("fill","bgFill");t.textStyles.push(r)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(r)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=b(e))})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,r){const n=(0,c.D7)();t.split(",").forEach(t=>{let i=t;/\d/.exec(t[0])&&(i=y+i);const a=this.classes.get(i);a&&(a.link=l._K.formatUrl(e,n),"sandbox"===n.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof r?b(r):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFunc(t,e,r),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,e,r){const n=c.Y2.sanitizeText(t,(0,c.D7)());if("loose"!==(0,c.D7)().securityLevel)return;if(void 0===e)return;const i=n;if(this.classes.has(i)){let t=[];if("string"==typeof r){t=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<t.length;e++){let r=t[e].trim();r.startsWith('"')&&r.endsWith('"')&&(r=r.substr(1,r.length-2)),t[e]=r}}0===t.length&&t.push(i),this.functions.push(()=>{const r=this.lookUpDomId(i),n=document.querySelector(`[id="${r}"]`);null!==n&&n.addEventListener("click",()=>{l._K.runFunc(e,...t)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,e){const r=e.at(-1);return r?`${r}.${t}`:t}static getAncestorIds(t){const e=t.split("."),r=new Array(e.length);r[0]=e[0];for(let n=1;n<e.length;n++)r[n]=`${r[n-1]}.${e[n]}`;return r}createNamespaceNode(t,e,r,n=!1){return{id:t,label:e,classes:new Map,notes:new Map,children:new Map,domId:y+t+"-"+this.namespaceCounter++,parent:r,explicit:n}}linkParentChild(t,e){const r=this.namespaces.get(t),n=this.namespaces.get(e);r&&n&&(r.children.has(e)||r.children.set(e,n),n.parent??=t)}addNamespace(e,r){const n=t.resolveQualifiedId(e,this.namespaceStack);if(this.namespaceStack.push(n),this.namespaces.has(n)){const t=this.namespaces.get(n);return t.explicit=!0,r&&(t.label=r),n}const i=n.split("."),a=t.getAncestorIds(n);for(let t=0;t<a.length;t++){const e=a[t],n=t>0?a[t-1]:void 0,o=t===a.length-1,s=o&&r?r:i[t];this.namespaces.has(e)?o&&(this.namespaces.get(e).explicit=!0):this.namespaces.set(e,this.createNamespaceNode(e,s,n,o)),n&&this.linkParentChild(n,e)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e,r){if(this.namespaces.has(t)){for(const r of e){const{className:e}=this.splitClassNameAndType(r),n=this.getClass(e);n.parent=t,this.namespaces.get(t).classes.set(e,n)}for(const e of r){const r=this.getNote(e);r.parent=t,this.namespaces.get(t).notes.set(e,r)}}}setCssStyle(t,e){const r=this.classes.get(t);if(e&&r)for(const n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(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}resolveExplicitAncestor(t){let e=t;for(;e;){const t=this.namespaces.get(e);if(!t)return;if(t.explicit)return e;e=t.parent}}getData(){const t=[],e=[],r=(0,c.D7)(),n=r.class?.hierarchicalNamespaces??!0;for(const a of this.namespaces.values()){if(!n&&!a.explicit)continue;const e={id:a.id,label:n?a.label:a.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:[],look:r.look,parentId:n?a.parent:void 0};t.push(e)}for(const a of this.classes.values()){const e=n?a.parent:this.resolveExplicitAncestor(a.parent),i={...a,type:void 0,isGroup:!1,parentId:e,look:r.look};t.push(i)}for(const a of this.notes.values()){const i=n?a.parent:this.resolveExplicitAncestor(a.parent),o={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look,parentId:i,labelType:"markdown"};t.push(o);const s=this.classes.get(a.class)?.id;if(s){const t={id:`edgeNote${a.index}`,start:a.id,end:s,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};e.push(t)}}for(const a of this.interfaces){const e={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};t.push(e)}let i=0;for(const a of this.relations){i++;const t={id:(0,l.rY)(a.id1,a.id2,{prefix:"id",counter:i}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:"none"===a.relationTitle1?"":a.relationTitle1,endLabelLeft:"none"===a.relationTitle2?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:1==a.relation.lineType?"dashed":"solid",look:r.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:r,direction:this.getDirection()}}},T=(0,h.K2)(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n\n.noteLabel .nodeLabel, .noteLabel .edgeLabel {\n color: ${t.noteTextColor};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth};\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth};\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n[id$="-compositionStart"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-compositionEnd"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyStart"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyEnd"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionStart"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionEnd"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationStart"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationEnd"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopStart"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopEnd"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n.edgeLabel[data-look="neo"] {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n ${(0,n.o)()}\n`,"getStyles"),w=(0,h.K2)((t,e="TB")=>{if(!t.doc)return e;let r=e;for(const n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),k={getClasses:(0,h.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K2)(async function(t,e,r,n){h.Rm.info("REF0:"),h.Rm.info("Drawing class diagram (v3)",e);const{securityLevel:i,state:u,layout:d}=(0,c.D7)();n.db.setDiagramId(e);const p=n.db.getData(),f=(0,a.A)(e,i);p.type=n.type,p.layoutAlgorithm=(0,s.q7)(d),p.nodeSpacing=u?.nodeSpacing||50,p.rankSpacing=u?.rankSpacing||50,p.markers=["aggregation","extension","composition","dependency","lollipop"],p.diagramId=e,await(0,s.XX)(p,f);l._K.insertTitle(f,"classDiagramTitleText",u?.titleTopMargin??25,n.db.getDiagramTitle()),(0,o.P)(f,8,"classDiagram",u?.useMaxWidth??!0)},"draw"),getDir:w}},797(t,e,r){"use strict";r.d(e,{He:()=>c,K2:()=>a,Rm:()=>l,VA:()=>o});var n=r(4353),i=Object.defineProperty,a=(t,e)=>i(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},c=a(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,h("FATAL"),"color: orange"):console.log.bind(console,"[35m",h("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,h("ERROR"),"color: orange"):console.log.bind(console,"[31m",h("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,h("WARN"),"color: orange"):console.log.bind(console,"[33m",h("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,h("INFO"),"color: lightblue"):console.log.bind(console,"[34m",h("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,h("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",h("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,h("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",h("TRACE")))},"setLogLevel"),h=a(t=>`%c${n().format("ss.SSS")} : ${t} : `,"format")},1513(t,e,r){"use strict";r.d(e,{Zk:()=>h,q7:()=>P,tM:()=>ot,u4:()=>at});var n=r(9625),i=r(4345),a=r(3848),o=r(8221),s=r(1123),l=r(797),c=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,33],p=[1,20],f=[1,21],g=[1,22],m=[1,23],y=[1,24],v=[1,26],b=[1,27],x=[1,28],T=[1,29],w=[1,30],k=[1,31],C=[1,32],E=[1,35],S=[1,36],_=[1,37],A=[1,38],R=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],D=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":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,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",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:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 3:return n.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:case 12:this.$=a[s];break;case 8:this.$="nl";break;case 13:const t=a[s-1];t.description=n.trimColon(a[s]),this.$=t;break;case 14:this.$={stmt:"relation",state1:a[s-2],state2:a[s]};break;case 15:const e=n.trimColon(a[s]);this.$={stmt:"relation",state1:a[s-3],state2:a[s-1],description:e};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 20:var l=a[s],c=a[s-2].trim();if(a[s].match(":")){var h=a[s].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:"state",id:a[s],type:"fork"};break;case 23:this.$={stmt:"state",id:a[s],type:"join"};break;case 24:this.$={stmt:"state",id:a[s],type:"choice"};break;case 25:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:"click",id:a[s-3],url:a[s-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:"style",id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:"applyClass",id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:n.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[s].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[s-2].trim(),classes:[a[s].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:c,19:h,22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:C,51:E,52:S,53:_,54:A,57:R},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:s,17:c,19:h,22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:C,51:E,52:S,53:_,54:A,57:R},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:d,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(I,[2,44],{58:[1,56]}),t(I,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:d,57:R},t(L,[2,17]),t(D,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:C,51:E,52:S,53:_,54:A,57:R},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(I,[2,46]),t(I,[2,47]),t(L,[2,15]),t(L,[2,19]),t(D,i,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:c,19:h,21:[1,81],22:u,24:d,25:p,26:f,27:g,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:C,51:E,52:S,53:_,54:A,57:R},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},M=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){function i(){const r=e.yytext.indexOf("%%");if(0===r)return!1;if(r>0){const n=e.yytext.slice(0,r),i=e.yytext.slice(r);i&&t.lexer.unput(i),e.yytext=n}return!0}(0,l.K2)(i,"processId");switch(r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 77:return 5;case 9:case 10:case 11:case 12:case 56:case 62:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 53:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 64:if(!i())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:return 19;case 54:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),59;case 59:return this.popState(),this.pushState("NOTE_ID"),60;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 57;case 72:if(!i())return;return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<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,/^(?:\})/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]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}}}();function O(){this.yy={}}return N.lexer=M,(0,l.K2)(O,"Parser"),O.prototype=N,N.Parser=O,new O}();c.parser=c;var h=c,u="state",d="root",p="relation",f="default",g="divider",m="fill:none",y="fill: #333",v="markdown",b="normal",x="rect",T="rectWithTitle",w="divider",k="roundedWithTitle",C="statediagram",E=`${C}-state`,S="transition",_=`${S} note-edge`,A=`${C}-note`,R=`${C}-cluster`,L=`${C}-cluster-alt`,I="parent",D="note",N="----",M=`${N}${D}`,O=`${N}${I}`,$=(0,l.K2)((t,e="TB")=>{if(!t.doc)return e;let r=e;for(const n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),P={getClasses:(0,l.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,l.K2)(async function(t,e,r,c){l.Rm.info("REF0:"),l.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:u,layout:d}=(0,s.D7)();c.db.extract(c.db.getRootDocV2());const p=c.db.getData(),f=(0,n.A)(e,h);p.type=c.type,p.layoutAlgorithm=d,p.nodeSpacing=u?.nodeSpacing||50,p.rankSpacing=u?.rankSpacing||50;"neo"===(0,s.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await(0,a.XX)(p,f);try{("function"==typeof c.db.getLinks?c.db.getLinks():new Map).forEach((t,e)=>{const r="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(!r)return void l.Rm.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));const n=f.node()?.querySelectorAll("g");let i;if(n?.forEach(t=>{const e=t.textContent?.trim();e===r&&(i=t)}),!i)return void l.Rm.warn("⚠️ Could not find node matching text:",r);const a=i.parentNode;if(!a)return void l.Rm.warn("⚠️ Node has no parent, cannot wrap:",r);const o=document.createElementNS("http://www.w3.org/2000/svg","a"),s=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),o.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e)}a.replaceChild(o,i),o.appendChild(i),l.Rm.info("🔗 Wrapped node in <a> tag for:",r,t.url)})}catch(g){l.Rm.error("❌ Error injecting clickable links:",g)}o._K.insertTitle(f,"statediagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,i.P)(f,8,C,u?.useMaxWidth??!0)},"draw"),getDir:$},B=new Map,F=0;function z(t="",e=0,r="",n=N){return`state-${t}${null!==r&&r.length>0?`${n}${r}`:""}-${e}`}(0,l.K2)(z,"stateDomId");var K=(0,l.K2)((t,e,r,n,i,a,o,c)=>{l.Rm.trace("items",e),e.forEach(e=>{switch(e.stmt){case u:case f:G(t,e,r,n,i,a,o,c);break;case p:{G(t,e.state1,r,n,i,a,o,c),G(t,e.state2,r,n,i,a,o,c);const l="neo"===o,h={id:"edge"+F,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:l?"arrow_barb_neo":"arrow_barb",style:m,labelStyle:"",label:s.Y2.sanitizeText(e.description??"",(0,s.D7)()),arrowheadStyle:y,labelpos:"c",labelType:v,thickness:b,classes:S,look:o};i.push(h),F++}}})},"setupDoc"),j=(0,l.K2)((t,e="TB")=>{let r=e;if(t.doc)for(const n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir");function q(t,e,r){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const n=r.get(t);n&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...n.styles])}));const n=t.find(t=>t.id===e.id);n?Object.assign(n,e):t.push(e)}function W(t){return t?.classes?.join(" ")??""}function U(t){return t?.styles??[]}(0,l.K2)(q,"insertOrUpdateNode"),(0,l.K2)(W,"getClassesFromDbInfo"),(0,l.K2)(U,"getStylesFromDbInfo");var G=(0,l.K2)((t,e,r,n,i,a,o,c)=>{const h=e.id,u=r.get(h),d=W(u),p=U(u),C=(0,s.D7)();if(l.Rm.info("dataFetcher parsedItem",e,u,p),"root"!==h){let r=x;!0===e.start?r="stateStart":!1===e.start&&(r="stateEnd"),e.type!==f&&(r=e.type),B.get(h)||B.set(h,{id:h,shape:r,description:s.Y2.sanitizeText(h,C),cssClasses:`${d} ${E}`,cssStyles:p});const u=B.get(h);e.description&&(Array.isArray(u.description)?(u.shape=T,u.description.push(e.description)):u.description?.length&&u.description.length>0?(u.shape=T,u.description===h?u.description=[e.description]:u.description=[u.description,e.description]):(u.shape=x,u.description=e.description),u.description=s.Y2.sanitizeTextOrArray(u.description,C)),1===u.description?.length&&u.shape===T&&("group"===u.type?u.shape=k:u.shape=x),!u.type&&e.doc&&(l.Rm.info("Setting cluster for XCX",h,j(e)),u.type="group",u.isGroup=!0,u.dir=j(e),u.shape=e.type===g?w:k,u.cssClasses=`${u.cssClasses} ${R} ${a?L:""}`);const S={labelStyle:"",shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:h,dir:u.dir,domId:z(h,F),type:u.type,isGroup:"group"===u.type,padding:8,rx:10,ry:10,look:o,labelType:"markdown"};if(S.shape===w&&(S.label=""),t&&"root"!==t.id&&(l.Rm.trace("Setting node ",h," to be child of its parent ",t.id),S.parentId=t.id),S.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:A,cssStyles:[],cssCompiledStyles:[],id:h+M+"-"+F,domId:z(h,F,D),type:u.type,isGroup:"group"===u.type,padding:C.flowchart?.padding,look:o,position:e.note.position},r=h+O,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:u.cssClasses,cssStyles:[],id:h+O,domId:z(h,F,I),type:"group",isGroup:!0,padding:16,look:o,position:e.note.position};F++,a.id=r,t.parentId=r,q(n,a,c),q(n,t,c),q(n,S,c);let s=h,l=t.id;"left of"===e.note.position&&(s=t.id,l=h),i.push({id:s+"-"+l,start:s,end:l,arrowhead:"none",arrowTypeEnd:"",style:m,labelStyle:"",classes:_,arrowheadStyle:y,labelpos:"c",labelType:v,thickness:b,look:o})}else q(n,S,c)}e.doc&&(l.Rm.trace("Adding nodes children "),K(e,e.doc,r,n,i,!a,o,c))},"dataFetcher"),Y=(0,l.K2)(()=>{B.clear(),F=0},"reset"),V="[*]",H="start",X="[*]",Z="end",Q="color",J="fill",tt="bgFill",et=",",rt=(0,l.K2)(()=>new Map,"newClassesList"),nt=(0,l.K2)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),it=(0,l.K2)(t=>JSON.parse(JSON.stringify(t)),"clone"),at=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=rt(),this.documents={root:nt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=s.iN,this.setAccTitle=s.SV,this.getAccDescription=s.m7,this.setAccDescription=s.EI,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{(0,l.K2)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const n of Array.isArray(t)?t:t.doc)switch(n.stmt){case u:this.addState(n.id.trim(),n.type,n.doc,n.description,n.note);break;case p:this.addRelation(n.state1,n.state2,n.description);break;case"classDef":this.addStyleClass(n.id.trim(),n.classes);break;case"style":this.handleStyleDef(n);break;case"applyClass":this.setCssClass(n.id.trim(),n.styleClass);break;case"click":this.addLink(n.id,n.url,n.tooltip)}const e=this.getStates(),r=(0,s.D7)();Y(),G(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,r.look,this.classes);for(const n of this.nodes)if(Array.isArray(n.label)){if(n.description=n.label.slice(1),n.isGroup&&n.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${n.id}]`);n.label=n.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),r=t.styleClass.split(",");for(const n of e){let t=this.getState(n);if(!t){const e=n.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=r.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){l.Rm.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,r){if(e.stmt===p)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===u&&(e.id===V?(e.id=t.id+(r?"_start":"_end"),e.start=r):e.id=e.id.trim()),e.stmt!==d&&e.stmt!==u||!e.doc)return;const n=[];let i=[];for(const a of e.doc)if(a.type===g){const t=it(a);t.doc=it(i),n.push(t),i=[]}else i.push(a);if(n.length>0&&i.length>0){const t={stmt:u,id:(0,o.$C)(),type:"divider",doc:it(i)};n.push(it(t)),e.doc=n}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:d,stmt:d},{id:d,stmt:d,doc:this.rootDoc},!0),{id:d,doc:this.rootDoc}}addState(t,e=f,r=void 0,n=void 0,i=void 0,a=void 0,o=void 0,c=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=r),t.type||(t.type=e)}else l.Rm.info("Adding state ",h,n),this.currentDocument.states.set(h,{stmt:u,id:h,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n){l.Rm.info("Setting state description",h,n);(Array.isArray(n)?n:[n]).forEach(t=>this.addDescription(h,t.trim()))}if(i){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=i,t.note.text=s.Y2.sanitizeText(t.note.text,(0,s.D7)())}if(a){l.Rm.info("Setting state classes",h,a);(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))}if(o){l.Rm.info("Setting state styles",h,o);(Array.isArray(o)?o:[o]).forEach(t=>this.setStyle(h,t.trim()))}if(c){l.Rm.info("Setting state styles",h,o);(Array.isArray(c)?c:[c]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.documents={root:nt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=rt(),t||(this.links=new Map,(0,s.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){l.Rm.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,r){this.links.set(t,{url:e,tooltip:r}),l.Rm.warn("Adding link",t,e,r)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===V?(this.startEndCount++,`${H}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=f){return t===V?H:e}endIdIfNeeded(t=""){return t===X?(this.startEndCount++,`${Z}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=f){return t===X?Z:e}addRelationObjs(t,e,r=""){const n=this.startIdIfNeeded(t.id.trim()),i=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),o=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:s.Y2.sanitizeText(r,(0,s.D7)())})}addRelation(t,e,r){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,r);else if("string"==typeof t&&"string"==typeof e){const n=this.startIdIfNeeded(t.trim()),i=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),o=this.endTypeIfNeeded(e);this.addState(n,i),this.addState(a,o),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:r?s.Y2.sanitizeText(r,(0,s.D7)()):void 0})}}addDescription(t,e){const r=this.currentDocument.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r?.descriptions?.push(s.Y2.sanitizeText(n,(0,s.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const r=this.classes.get(t);e&&r&&e.split(et).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(Q).exec(t)){const t=e.replace(J,tt).replace(Q,J);r.textStyles.push(t)}r.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(t=>{let r=this.getState(t);if(!r){const e=t.trim();this.addState(e),r=this.getState(e)}r?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=(0,s.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:$(this.getRootDocV2())}}getConfig(){return(0,s.D7)().state}},ot=(0,l.K2)(t=>`\ndefs [id$="-barbEnd"] {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: ${t.strokeWidth||1};\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: ${t.strokeWidth||1}px;\n}\n[id$="-barbEnd"] {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n[id$="-dependencyStart"], [id$="-dependencyEnd"] {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n[data-look="neo"].statediagram-cluster rect {\n fill: ${t.mainBkg};\n stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth??1};\n}\n[data-look="neo"].statediagram-cluster rect.outer {\n rx: ${t.radius}px;\n ry: ${t.radius}px;\n filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}\n}\n`,"getStyles")},1334(t,e,r){"use strict";r.d(e,{Nq:()=>o,RI:()=>c,Wg:()=>i,hq:()=>a});var n=r(797),i=(0,n.K2)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,n=t.y??0;return"translate("+-(r+t.width/2)+", "+-(n+t.height/2)+")"},"computeLabelTransform"),a={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},o={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function s(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=l(t),e=l(e);const[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],o=i-r,s=a-n;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}(0,n.K2)(s,"calculateDeltaAndAngle");var l=(0,n.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),c=(0,n.K2)(t=>({x:(0,n.K2)(function(e,r,n){let i=0;const o=l(n[0]).x<l(n[n.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(a,t.arrowTypeStart)){const{angle:e,deltaX:r}=s(n[0],n[1]);i=a[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaX:r}=s(n[n.length-1],n[n.length-2]);i=a[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const c=Math.abs(l(e).x-l(n[n.length-1]).x),h=Math.abs(l(e).y-l(n[n.length-1]).y),u=Math.abs(l(e).x-l(n[0]).x),d=Math.abs(l(e).y-l(n[0]).y),p=a[t.arrowTypeStart],f=a[t.arrowTypeEnd];if(c<f&&c>0&&h<f){let t=f+1-c;t*="right"===o?-1:1,i-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="right"===o?-1:1,i+=t}return l(e).x+i},"x"),y:(0,n.K2)(function(e,r,n){let i=0;const o=l(n[0]).y<l(n[n.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(a,t.arrowTypeStart)){const{angle:e,deltaY:r}=s(n[0],n[1]);i=a[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaY:r}=s(n[n.length-1],n[n.length-2]);i=a[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const c=Math.abs(l(e).y-l(n[n.length-1]).y),h=Math.abs(l(e).x-l(n[n.length-1]).x),u=Math.abs(l(e).y-l(n[0]).y),d=Math.abs(l(e).x-l(n[0]).x),p=a[t.arrowTypeStart],f=a[t.arrowTypeEnd];if(c<f&&c>0&&h<f){let t=f+1-c;t*="up"===o?-1:1,i-=t}if(u<p&&u>0&&d<p){let t=p+1-u;t*="up"===o?-1:1,i+=t}return l(e).y+i},"y")}),"getLineFunctionsWithOffset")},1123(t,e,r){"use strict";r.d(e,{C0:()=>v,xA:()=>yt,hH:()=>E,Dl:()=>Yt,IU:()=>ue,Wt:()=>oe,Y2:()=>Xt,a$:()=>Jt,KG:()=>re,sb:()=>it,ME:()=>we,UI:()=>et,Ch:()=>x,mW:()=>b,DB:()=>m,_3:()=>at,EJ:()=>g,m7:()=>ge,iN:()=>pe,zj:()=>gt,D7:()=>xe,Gs:()=>Ae,J$:()=>k,ab:()=>ye,E:()=>Ct,Q2:()=>pt,P$:()=>M,ID:()=>Pt,TM:()=>kt,Wi:()=>Gt,H1:()=>Et,QO:()=>zt,Js:()=>_e,Xd:()=>T,dj:()=>Ht,cL:()=>vt,Df:()=>nt,$i:()=>rt,jZ:()=>It,oB:()=>ke,wZ:()=>ut,EI:()=>fe,SV:()=>de,Nk:()=>ft,XV:()=>Te,ke:()=>me,UU:()=>ht,ot:()=>te,mj:()=>Ce,tM:()=>ae,H$:()=>X,B6:()=>dt});var n=r(797),i=r(1931),a=r(8232);const o=(t,e)=>{const r=i.A.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return(0,a.A)(t,n)};var s=r(5582);const l=(t,e,r=50)=>{const{r:n,g:a,b:o,a:l}=i.A.parse(t),{r:c,g:h,b:u,a:d}=i.A.parse(e),p=r/100,f=2*p-1,g=l-d,m=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,y=1-m,v=n*m+c*y,b=a*m+h*y,x=o*m+u*y,T=l*p+d*(1-p);return(0,s.A)(v,b,x,T)},c=(t,e=100)=>{const r=i.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,l(r,t,e)};var h,u=r(5263),d=r(8041),p=r(5097),f=r(3047),g=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,m=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,y=/\s*%%.*\n/gm,v=class extends Error{static{(0,n.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},b={},x=(0,n.K2)(function(t,e){t=t.replace(g,"").replace(m,"").replace(y,"\n");for(const[r,{detector:n}]of Object.entries(b)){if(n(t,e))return r}throw new v(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),T=(0,n.K2)((...t)=>{for(const{id:e,detector:r,loader:n}of t)w(e,r,n)},"registerLazyLoadedDiagrams"),w=(0,n.K2)((t,e,r)=>{b[t]&&n.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),b[t]={detector:e,loader:r},n.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),k=(0,n.K2)(t=>b[t].loader,"getDiagramLoader"),C=(0,n.K2)((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>C(t,e,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(i=>{"object"!=typeof e[i]||null===e[i]||void 0!==t[i]&&"object"!=typeof t[i]?(n||"object"!=typeof t[i]&&"object"!=typeof e[i])&&(t[i]=e[i]):(void 0===t[i]&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=C(t[i],e[i],{depth:r-1,clobber:n}))}),t)},"assignWithDepth"),E=C,S="#ffffff",_="#f2f2f2",A=(0,n.K2)((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),R=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(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||(0,d.A)(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.vertLineColor=this.vertLineColor||"navy",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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,5)),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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||c(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(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;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(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||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??o(this.primaryColor,{l:-30}),this.venn2=this.venn2??o(this.secondaryColor,{l:-30}),this.venn3=this.venn3??o(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??o(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??o(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??o(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??o(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??o(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(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||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},L=(0,n.K2)(t=>{const e=new R;return e.calculate(t),e},"getThemeVariables"),I=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=(0,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(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.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,d.A)(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=(0,d.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.A)(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=c(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,d.A)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,d.A)(this.secondaryColor,20),this.git1=(0,d.A)(this.pie2||this.secondaryColor,20),this.git2=(0,d.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,d.A)(this.pie4||o(this.primaryColor,{h:-30}),20),this.git4=(0,d.A)(this.pie5||o(this.primaryColor,{h:-60}),20),this.git5=(0,d.A)(this.pie6||o(this.primaryColor,{h:-90}),10),this.git6=(0,d.A)(this.pie7||o(this.primaryColor,{h:60}),10),this.git7=(0,d.A)(this.pie8||o(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||(0,d.A)("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||(0,d.A)("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||(0,d.A)("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||(0,d.A)("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||(0,d.A)(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||(0,d.A)(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,d.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,d.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},D=(0,n.K2)(t=>{const e=new I;return e.calculate(t),e},"getThemeVariables"),N=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",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.vertLineColor="calculated",this.sectionBkgColor=(0,s.A)(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.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||c(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||c(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=this.border1,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.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,d.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.primaryColor,1),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=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||o(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||o(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||o(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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??o(this.primaryColor,{l:-30}),this.venn2=this.venn2??o(this.secondaryColor,{l:-30}),this.venn3=this.venn3??o(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??o(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??o(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??o(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??o(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??o(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",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||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,u.A)(c(this.git0),25),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},M=(0,n.K2)(t=>{const e=new N;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,n.K2)(this,"Theme")}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=(0,d.A)("#cde498",10),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,u.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||o(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,20),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=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(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||o(this.primaryColor,{l:-30}),this.pie5=this.pie5||o(this.secondaryColor,{l:-30}),this.pie6=this.pie6||o(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||o(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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??o(this.primaryColor,{l:-30}),this.venn2=this.venn2??o(this.secondaryColor,{l:-30}),this.venn3=this.venn3??o(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??o(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??o(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??o(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??o(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??o(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",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||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||c(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},$=(0,n.K2)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),P=class{static{(0,n.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(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.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,d.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,d.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||c(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||o(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||o(this.mainBkg,{l:-(8+5*t)});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.sectionBkgColor=(0,d.A)(this.contrast,30),this.sectionBkgColor2=(0,d.A)(this.contrast,30),this.taskBorderColor=(0,u.A)(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=(0,d.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,u.A)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",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=(0,u.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||o(this.primaryColor,{h:-30}),this.git4=this.pie5||o(this.primaryColor,{h:-60}),this.git5=this.pie6||o(this.primaryColor,{h:-90}),this.git6=this.pie7||o(this.primaryColor,{h:60}),this.git7=this.pie8||o(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,n.K2)(t=>{const e=new P;return e.calculate(t),e},"getThemeVariables"),F=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=o(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.A)(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||o(t,{h:30}),this.cScale4=this.cScale4||o(t,{h:60}),this.cScale5=this.cScale5||o(t,{h:90}),this.cScale6=this.cScale6||o(t,{h:120}),this.cScale7=this.cScale7||o(t,{h:150}),this.cScale8=this.cScale8||o(t,{h:210,l:150}),this.cScale9=this.cScale9||o(t,{h:270}),this.cScale10=this.cScale10||o(t,{h:300}),this.cScale11=this.cScale11||o(t,{h:330}),this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,u.A)(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,u.A)(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||c(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||(0,d.A)(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||(0,u.A)(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||o(this.mainBkg,{h:180,s:-15,l:n*(5+3*i)}),this["surfacePeer"+i]=this["surfacePeer"+i]||o(this.mainBkg,{h:180,s:-15,l:n*(8+3*i)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||o(t,{h:64}),this.fillType3=this.fillType3||o(e,{h:64}),this.fillType4=this.fillType4||o(t,{h:-64}),this.fillType5=this.fillType5||o(e,{h:-64}),this.fillType6=this.fillType6||o(t,{h:128}),this.fillType7=this.fillType7||o(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||o(t,{l:-10}),this.pie5=this.pie5||o(e,{l:-10}),this.pie6=this.pie6||o(r,{l:-10}),this.pie7=this.pie7||o(t,{h:60,l:-10}),this.pie8=this.pie8||o(t,{h:-60,l:-10}),this.pie9=this.pie9||o(t,{h:120,l:0}),this.pie10=this.pie10||o(t,{h:60,l:-20}),this.pie11=this.pie11||o(t,{h:-60,l:-20}),this.pie12=this.pie12||o(t,{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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||o(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||o(t,{h:-30}),this.git4=this.git4||o(t,{h:-60}),this.git5=this.git5||o(t,{h:-90}),this.git6=this.git6||o(t,{h:60}),this.git7=this.git7||o(t,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},z=(0,n.K2)(t=>{const e=new F;return e.calculate(t),e},"getThemeVariables"),K=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(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||(0,d.A)(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||c(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(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;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(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||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},j=(0,n.K2)(t=>{const e=new K;return e.calculate(t),e},"getThemeVariables"),q=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=A("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=o(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.A)(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,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.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=this.mainBkg;if(this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,u.A)(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,u.A)(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||c(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||(0,d.A)(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||(0,u.A)(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||o(this.mainBkg,{h:180,s:-15,l:n*(5+3*i)}),this["surfacePeer"+i]=this["surfacePeer"+i]||o(this.mainBkg,{h:180,s:-15,l:n*(8+3*i)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||o(t,{h:64}),this.fillType3=this.fillType3||o(e,{h:64}),this.fillType4=this.fillType4||o(t,{h:-64}),this.fillType5=this.fillType5||o(e,{h:-64}),this.fillType6=this.fillType6||o(t,{h:128}),this.fillType7=this.fillType7||o(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||o(t,{l:-10}),this.pie5=this.pie5||o(e,{l:-10}),this.pie6=this.pie6||o(r,{l:-10}),this.pie7=this.pie7||o(t,{h:60,l:-10}),this.pie8=this.pie8||o(t,{h:-60,l:-10}),this.pie9=this.pie9||o(t,{h:120,l:0}),this.pie10=this.pie10||o(t,{h:60,l:-20}),this.pie11=this.pie11||o(t,{h:-60,l:-20}),this.pie12=this.pie12||o(t,{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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||o(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||o(t,{h:-30}),this.git4=this.git4||o(t,{h:-60}),this.git5=this.git5||o(t,{h:-90}),this.git6=this.git6||o(t,{h:60}),this.git7=this.git7||o(t,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},W=(0,n.K2)(t=>{const e=new q;return e.calculate(t),e},"getThemeVariables"),U=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(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||(0,d.A)(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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,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.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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,u.A)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||c(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(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;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(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||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},G=(0,n.K2)(t=>{const e=new U;return e.calculate(t),e},"getThemeVariables"),Y=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=A(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=o(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.A)(t,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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||c(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||(0,d.A)(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||(0,u.A)(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||o(this.mainBkg,{h:180,s:-15,l:n*(5+3*i)}),this["surfacePeer"+i]=this["surfacePeer"+i]||o(this.mainBkg,{h:180,s:-15,l:n*(8+3*i)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||o(t,{h:64}),this.fillType3=this.fillType3||o(e,{h:64}),this.fillType4=this.fillType4||o(t,{h:-64}),this.fillType5=this.fillType5||o(e,{h:-64}),this.fillType6=this.fillType6||o(t,{h:128}),this.fillType7=this.fillType7||o(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||o(t,{l:-10}),this.pie5=this.pie5||o(e,{l:-10}),this.pie6=this.pie6||o(r,{l:-10}),this.pie7=this.pie7||o(t,{h:60,l:-10}),this.pie8=this.pie8||o(t,{h:-60,l:-10}),this.pie9=this.pie9||o(t,{h:120,l:0}),this.pie10=this.pie10||o(t,{h:60,l:-20}),this.pie11=this.pie11||o(t,{h:-60,l:-20}),this.pie12=this.pie12||o(t,{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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||o(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||o(t,{h:-30}),this.git4=this.git4||o(t,{h:-60}),this.git5=this.git5||o(t,{h:-90}),this.git6=this.git6||o(t,{h:60}),this.git7=this.git7||o(t,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},V=(0,n.K2)(t=>{const e=new Y;return e.calculate(t),e},"getThemeVariables"),H=class{static{(0,n.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=A(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor=c(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||A(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||A(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||A(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||A(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,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?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.rootLabelColor="#FFFFFF",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||(0,d.A)(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.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||c(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,d.A)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,u.A)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=(0,u.A)(this["cScale"+e],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||o(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||o(this.primaryColor,{h:64}),this.fillType3=this.fillType3||o(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||o(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||o(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||o(this.primaryColor,{h:128}),this.fillType7=this.fillType7||o(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||o(this.primaryColor,{l:-10}),this.pie5=this.pie5||o(this.secondaryColor,{l:-10}),this.pie6=this.pie6||o(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||o(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||o(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||o(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||o(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||o(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||o(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.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||o(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||o(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||o(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||o(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||o(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||o(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,p.A)(this.quadrant1Fill)?(0,d.A)(this.quadrant1Fill):(0,u.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.A)(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||o(this.primaryColor,{h:-30}),this.git4=this.git4||o(this.primaryColor,{h:-60}),this.git5=this.git5||o(this.primaryColor,{h:-90}),this.git6=this.git6||o(this.primaryColor,{h:60}),this.git7=this.git7||o(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.A)(this.git0,25),this.git1=(0,d.A)(this.git1,25),this.git2=(0,d.A)(this.git2,25),this.git3=(0,d.A)(this.git3,25),this.git4=(0,d.A)(this.git4,25),this.git5=(0,d.A)(this.git5,25),this.git6=(0,d.A)(this.git6,25),this.git7=(0,d.A)(this.git7,25)):(this.git0=(0,u.A)(this.git0,25),this.git1=(0,u.A)(this.git1,25),this.git2=(0,u.A)(this.git2,25),this.git3=(0,u.A)(this.git3,25),this.git4=(0,u.A)(this.git4,25),this.git5=(0,u.A)(this.git5,25),this.git6=(0,u.A)(this.git6,25),this.git7=(0,u.A)(this.git7,25)),this.gitInv0=this.gitInv0||c(this.git0),this.gitInv1=this.gitInv1||c(this.git1),this.gitInv2=this.gitInv2||c(this.git2),this.gitInv3=this.gitInv3||c(this.git3),this.gitInv4=this.gitInv4||c(this.git4),this.gitInv5=this.gitInv5||c(this.git5),this.gitInv6=this.gitInv6||c(this.git6),this.gitInv7=this.gitInv7||c(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||S,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||_}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},X={base:{getThemeVariables:L},dark:{getThemeVariables:D},default:{getThemeVariables:M},forest:{getThemeVariables:$},neutral:{getThemeVariables:B},neo:{getThemeVariables:z},"neo-dark":{getThemeVariables:j},redux:{getThemeVariables:W},"redux-dark":{getThemeVariables:G},"redux-color":{getThemeVariables:V},"redux-dark-color":{getThemeVariables:(0,n.K2)(t=>{const e=new H;return e.calculate(t),e},"getThemeVariables")}},Z={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Q={...Z,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:X.default.getThemeVariables(),sequence:{...Z.sequence,messageFont:(0,n.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,n.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,n.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Z.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Z.c4,useWidth:void 0,personFont:(0,n.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Z.flowchart,inheritDir:!1},external_personFont:(0,n.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,n.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,n.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,n.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,n.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,n.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,n.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,n.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,n.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,n.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,n.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,n.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,n.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,n.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,n.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,n.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,n.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,n.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,n.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,n.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,n.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Z.pie,useWidth:984},xyChart:{...Z.xyChart,useWidth:void 0},requirement:{...Z.requirement,useWidth:void 0},packet:{...Z.packet},eventmodeling:{...Z.eventmodeling},treeView:{...Z.treeView,useWidth:void 0},radar:{...Z.radar},ishikawa:{...Z.ishikawa},sankey:{...Z.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Z.venn}},J=(0,n.K2)((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:"object"==typeof t[n]&&null!==t[n]?[...r,e+n,...J(t[n],"")]:[...r,e+n],[]),"keyify"),tt=new Set(J(Q,"")),et=Q,rt=(0,n.K2)(t=>{if(n.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>rt(t));else{for(const e of Object.keys(t)){if(n.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!tt.has(e)||null==t[e]){n.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){if("nodeColors"===e){const r=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const i of Object.keys(t[e]))"string"==typeof t[e][i]&&r.test(t[e][i])||(n.Rm.debug("sanitize deleting invalid color:",i,t[e][i]),delete t[e][i])}else n.Rm.debug("sanitizing object",e),rt(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(n.Rm.debug("sanitizing css option",e),t[e]=nt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}n.Rm.debug("After sanitization",t)}},"sanitizeDirective"),nt=(0,n.K2)(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},"sanitizeCss"),it=Object.freeze(et),at=(0,n.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),ot=E({},it),st=[],lt=E({},it),ct=(0,n.K2)((t,e)=>{let r=E({},t),n={};for(const i of e)mt(i),n=E(n,i);if(r=E(r,n),n.theme&&n.theme in X){const t=E({},h),e=E(t.themeVariables||{},n.themeVariables);r.theme&&r.theme in X&&(r.themeVariables=X[r.theme].getThemeVariables(e))}return wt(lt=r),lt},"updateCurrentConfig"),ht=(0,n.K2)(t=>(ot=E({},it),ot=E(ot,t),t.theme&&X[t.theme]&&(ot.themeVariables=X[t.theme].getThemeVariables(t.themeVariables)),ct(ot,st),ot),"setSiteConfig"),ut=(0,n.K2)(t=>{h=E({},t)},"saveConfigFromInitialize"),dt=(0,n.K2)(t=>(ot=E(ot,t),ct(ot,st),ot),"updateSiteConfig"),pt=(0,n.K2)(()=>E({},ot),"getSiteConfig"),ft=(0,n.K2)(t=>(wt(t),E(lt,t),gt()),"setConfig"),gt=(0,n.K2)(()=>E({},lt),"getConfig"),mt=(0,n.K2)(t=>{t&&(["secure",...ot.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(n.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&mt(t[e])}))},"sanitize"),yt=(0,n.K2)(t=>{rt(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),st.push(t),ct(ot,st)},"addDirective"),vt=(0,n.K2)((t=ot)=>{ct(t,st=[])},"reset"),bt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},xt={},Tt=(0,n.K2)(t=>{xt[t]||(n.Rm.warn(bt[t]),xt[t]=!0)},"issueWarning"),wt=(0,n.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Tt("LAZY_LOAD_DEPRECATED")},"checkConfig"),kt=(0,n.K2)(()=>{let t={};h&&(t=E(t,h));for(const e of st)t=E(t,e);return t},"getUserDefinedConfig"),Ct=(0,n.K2)(t=>(null!=t.flowchart?.htmlLabels&&Tt("FLOWCHART_HTML_LABELS_DEPRECATED"),at(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Et=/<br\s*\/?>/gi,St=(0,n.K2)(t=>{if(!t)return[""];return $t(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),_t=(()=>{let t=!1;return()=>{t||(At(),t=!0)}})();function At(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,n.K2)(At,"setupDompurifyHooks");var Rt=(0,n.K2)(t=>{_t();return f.A.sanitize(t)},"removeScript"),Lt=(0,n.K2)((t,e)=>{if(Ct(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Rt(t):"loose"!==r&&(t=(t=(t=$t(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=Ot(t))}return t},"sanitizeMore"),It=(0,n.K2)((t,e)=>t?t=e.dompurifyConfig?f.A.sanitize(Lt(t,e),e.dompurifyConfig).toString():f.A.sanitize(Lt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Dt=(0,n.K2)((t,e)=>"string"==typeof t?It(t,e):t.flat().map(t=>It(t,e)),"sanitizeTextOrArray"),Nt=(0,n.K2)(t=>Et.test(t),"hasBreaks"),Mt=(0,n.K2)(t=>t.split(Et),"splitBreaks"),Ot=(0,n.K2)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),$t=(0,n.K2)(t=>t.replace(Et,"#br#"),"breakToPlaceholder"),Pt=(0,n.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Bt=(0,n.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Ft=(0,n.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),zt=(0,n.K2)(function(t){const e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let t=e[n];if(","===t&&n>0&&n+1<e.length){const i=e[n-1],a=e[n+1];jt(i,a)&&(t=i+","+a,n++,r.pop())}r.push(qt(t))}return r.join("")},"parseGenericTypes"),Kt=(0,n.K2)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),jt=(0,n.K2)((t,e)=>{const r=Kt(t,"~"),n=Kt(e,"~");return 1===r&&1===n},"shouldCombineSets"),qt=(0,n.K2)(t=>{const e=Kt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Wt=(0,n.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ut=/\$\$(.*)\$\$/g,Gt=(0,n.K2)(t=>(t.match(Ut)?.length??0)>0,"hasKatex"),Yt=(0,n.K2)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Ht(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n?.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),Vt=(0,n.K2)(async(t,e)=>{if(!Gt(t))return t;if(!(Wt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ut,"MathML is unsupported in this environment.");{const{default:n}=await Promise.resolve().then(r.bind(r,2130)),i=e.forceLegacyMathML||!Wt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Et).map(t=>Gt(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Ut,(t,e)=>n.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ht=(0,n.K2)(async(t,e)=>It(await Vt(t,e),e),"renderKatexSanitized"),Xt={getRows:St,sanitizeText:It,sanitizeTextOrArray:Dt,hasBreaks:Nt,splitBreaks:Mt,lineBreakRegex:Et,removeScript:Rt,getUrl:Pt,evaluate:at,getMax:Bt,getMin:Ft},Zt=(0,n.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Qt=(0,n.K2)(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},"calculateSvgSizeAttrs"),Jt=(0,n.K2)(function(t,e,r,n){const i=Qt(e,r,n);Zt(t,i)},"configureSvgSize"),te=(0,n.K2)(function(t,e,r,i){const a=e.node().getBBox(),o=a.width,s=a.height;n.Rm.info(`SVG bounds: ${o}x${s}`,a);let l=0,c=0;n.Rm.info(`Graph bounds: ${l}x${c}`,t),l=o+2*r,c=s+2*r,n.Rm.info(`Calculated bounds: ${l}x${c}`),Jt(e,c,l,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),ee={};function re(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,n.K2)(re,"cssStyleSheetToString");var ne=(0,n.K2)((t,e,r,i)=>{let a="";return t in ee&&ee[t]?a=ee[t]({...r,svgId:i}):n.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${a}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),ie=(0,n.K2)((t,e)=>{void 0!==e&&(ee[t]=e)},"addStylesForDiagram"),ae=ne,oe={};(0,n.VA)(oe,{clear:()=>ue,getAccDescription:()=>ge,getAccTitle:()=>pe,getDiagramTitle:()=>ye,setAccDescription:()=>fe,setAccTitle:()=>de,setDiagramTitle:()=>me});var se="",le="",ce="",he=(0,n.K2)(t=>It(t,gt()),"sanitizeText"),ue=(0,n.K2)(()=>{se="",ce="",le=""},"clear"),de=(0,n.K2)(t=>{se=he(t).replace(/^\s+/g,"")},"setAccTitle"),pe=(0,n.K2)(()=>se,"getAccTitle"),fe=(0,n.K2)(t=>{ce=he(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ge=(0,n.K2)(()=>ce,"getAccDescription"),me=(0,n.K2)(t=>{le=he(t)},"setDiagramTitle"),ye=(0,n.K2)(()=>le,"getDiagramTitle"),ve=n.Rm,be=n.He,xe=gt,Te=ft,we=it,ke=(0,n.K2)(t=>It(t,xe()),"sanitizeText"),Ce=te,Ee=(0,n.K2)(()=>oe,"getCommonDb"),Se={},_e=(0,n.K2)((t,e,r)=>{Se[t]&&ve.warn(`Diagram with id ${t} already registered. Overwriting.`),Se[t]=e,r&&w(t,r),ie(t,e.styles),e.injectUtils?.(ve,be,xe,ke,Ce,Ee(),()=>{})},"registerDiagram"),Ae=(0,n.K2)(t=>{if(t in Se)return Se[t];throw new Re(t)},"getDiagram"),Re=class extends Error{static{(0,n.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},2501(t,e,r){"use strict";r.d(e,{o:()=>n});var n=(0,r(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},6615(t,e,r){"use strict";r.d(e,{IU:()=>x,Jo:()=>D,T_:()=>C,g0:()=>it,jP:()=>w});var n=r(1334),i=r(2654),a=r(5105),o=r(8013),s=r(1240),l=r(8221),c=r(1123),h=r(797),u=r(1444),d=r(2274),p=(0,h.K2)((t,e,r,n,i,a=!1,o)=>{e.arrowTypeStart&&m(t,"start",e.arrowTypeStart,r,n,i,a,o),e.arrowTypeEnd&&m(t,"end",e.arrowTypeEnd,r,n,i,a,o)},"addEdgeMarkers"),f={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],m=(0,h.K2)((t,e,r,n,i,a,o=!1,s)=>{const l=f[r],c=l&&g.includes(l.type);if(!l)return void h.Rm.warn(`Unknown arrow type: ${r}`);const u=`${i}_${a}-${l.type}${"start"===e?"Start":"End"}${o&&c?"-margin":""}`;if(s&&""!==s.trim()){const r=`${u}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(u);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),l.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${n}#${r})`)}else t.attr(`marker-${e}`,`url(${n}#${u})`)},"addEdgeMarker"),y=(0,h.K2)(t=>"string"==typeof t?t:(0,c.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),v=new Map,b=new Map,x=(0,h.K2)(()=>{v.clear(),b.clear()},"clear"),T=(0,h.K2)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),w=(0,h.K2)(async(t,e)=>{const r=(0,c.D7)();let a=(0,c.E)(r);const{labelStyles:l}=(0,o.GX)(e);e.labelStyle=l;const d=t.insert("g").attr("class","edgeLabel"),p=d.insert("g").attr("class","label").attr("data-id",e.id),f="markdown"===e.labelType,g=await(0,s.GZ)(t,e.label,{style:T(e.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:f,width:void 0},r);p.node().appendChild(g),h.Rm.info("abc82",e,e.labelType);let m,y=g.getBBox(),x=y;if(a){const t=g.children[0],e=(0,u.Ltv)(g);y=t.getBoundingClientRect(),x=y,e.attr("width",y.width),e.attr("height",y.height)}else{const t=(0,u.Ltv)(g).select("text").node();t&&"function"==typeof t.getBBox&&(x=t.getBBox())}if(p.attr("transform",(0,n.Wg)(x,a)),v.set(e.id,d),e.width=y.width,e.height=y.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(o,e.startLabelLeft,T(e.labelStyle)||"",!1,!1);m=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).startLeft=r,k(m,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(o,e.startLabelRight,T(e.labelStyle)||"",!1,!1);m=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).startRight=r,k(m,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(r,e.endLabelLeft,T(e.labelStyle)||"",!1,!1);m=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).endLeft=r,k(m,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),s=await(0,i.DA)(r,e.endLabelRight,T(e.labelStyle)||"",!1,!1);m=s;let l=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}o.attr("transform",(0,n.Wg)(l,a)),b.get(e.id)||b.set(e.id,{}),b.get(e.id).endRight=r,k(m,e.endLabelRight)}return g},"insertEdgeLabel");function k(t,e){(0,c.E)((0,c.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,h.K2)(k,"setTerminalWidth");var C=(0,h.K2)((t,e)=>{h.Rm.debug("Moving label abc88 ",t.id,t.label,v.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,c.D7)(),{subGraphTitleTotalMargin:i}=(0,a.O)(n);if(t.label){const n=v.get(t.id);let a=t.x,o=t.y;if(r){const n=l._K.calcLabelPosition(r);h.Rm.debug("Moving label "+t.label+" from (",a,",",o,") to (",n.x,",",n.y,") abc88"),e.updatedPath&&(a=n.x,o=n.y)}n.attr("transform",`translate(${a}, ${o+i/2})`)}if(t.startLabelLeft){const e=b.get(t.id).startLeft;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.startLabelRight){const e=b.get(t.id).startRight;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelLeft){const e=b.get(t.id).endLeft;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}if(t.endLabelRight){const e=b.get(t.id).endRight;let n=t.x,i=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=e.x,i=e.y}e.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),E=(0,h.K2)((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,s=t.height/2;return i>=o||a>=s},"outsideNode"),S=(0,h.K2)((t,e,r)=>{h.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),o=t.width/2;let s=r.x<e.x?o-a:o+a;const l=t.height/2,c=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*o>Math.abs(n-e.x)*l){let t=r.y<e.y?e.y-l-i:i-l-e.y;s=u*t/c;const n={x:r.x<e.x?r.x+s:r.x-u+s,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===s&&(n.x=e.x,n.y=e.y),0===u&&(n.x=e.x),0===c&&(n.y=e.y),h.Rm.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${u}, r ${s}`,n),n}{s=r.x<e.x?e.x-o-n:n-o-e.x;let t=c*s/u,i=r.x<e.x?r.x+u-s:r.x-u+s,a=r.y<e.y?r.y+t:r.y-t;return h.Rm.debug(`sides calc abc89, Q ${c}, q ${t}, R ${u}, r ${s}`,{_x:i,_y:a}),0===s&&(i=e.x,a=e.y),0===u&&(i=e.x),0===c&&(a=e.y),{x:i,y:a}}},"intersection"),_=(0,h.K2)((t,e)=>{h.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(t=>{if(h.Rm.info("abc88 checking point",t,e),E(e,t)||i)h.Rm.warn("abc88 outside",t,n),n=t,i||r.push(t);else{const a=S(e,n,t);h.Rm.debug("abc88 inside",t,n,a),h.Rm.debug("abc88 intersection",a,e);let o=!1;r.forEach(t=>{o=o||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?h.Rm.warn("abc88 no intersect",a,r):r.push(a),i=!0}}),h.Rm.debug("returning points",r),r},"cutPathAtIntersect");function A(t){const e=[],r=[];for(let n=1;n<t.length-1;n++){const i=t[n-1],a=t[n],o=t[n+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}(0,h.K2)(A,"extractCornerPoints");var R=(0,h.K2)(function(t,e,r){const n=e.x-t.x,i=e.y-t.y,a=r/Math.sqrt(n*n+i*i);return{x:e.x-a*n,y:e.y-a*i}},"findAdjacentPoint"),L=(0,h.K2)(function(t){const{cornerPointPositions:e}=A(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){const e=t[n-1],i=t[n+1],a=t[n],o=R(e,a,5),s=R(i,a,5),l=s.x-o.x,c=s.y-o.y;r.push(o);const u=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(i.x-e.x)>10&&Math.abs(i.y-e.y)>=10){h.Rm.debug("Corner point fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));const t=5;d=a.x===o.x?{x:l<0?o.x-t+u:o.x+t-u,y:c<0?o.y-u:o.y+u}:{x:l<0?o.x-u:o.x+u,y:c<0?o.y-t+u:o.y+t-u}}else h.Rm.debug("Corner point skipping fixing",Math.abs(i.x-e.x),Math.abs(i.y-e.y));r.push(d,s)}else r.push(t[n]);return r},"fixCorners"),I=(0,h.K2)((t,e,r)=>{const n=t-e-r,i=Math.floor(n/4);return`0 ${e} ${Array(i).fill("2 2").join(" ")} ${r}`},"generateDashArray"),D=(0,h.K2)(function(t,e,r,i,a,s,f,g=!1){if(!f)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:m}=(0,c.D7)();let v=e.points,b=!1;const x=a;var T=s;const w=[];for(const n in e.cssCompiledStyles)(0,o.KX)(n)||w.push(e.cssCompiledStyles[n]);h.Rm.debug("UIO intersect check",e.points,T.x,x.x),T.intersect&&x.intersect&&!g&&(v=v.slice(1,e.points.length-1),v.unshift(x.intersect(v[0])),h.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,v[v.length-1],T,T.intersect(v[v.length-1])),v.push(T.intersect(v[v.length-1])));const k=btoa(JSON.stringify(v));e.toCluster&&(h.Rm.info("to cluster abc88",r.get(e.toCluster)),v=_(e.points,r.get(e.toCluster).node),b=!0),e.fromCluster&&(h.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(v,null,2)),v=_(v.reverse(),r.get(e.fromCluster).node).reverse(),b=!0);let C=v.filter(t=>!Number.isNaN(t.y));const E=y(e.curve);"rounded"!==E&&(C=L(C));let S=u.lUB;switch(E){case"linear":case"rounded":S=u.lUB;break;case"basis":default:S=u.qrM;break;case"cardinal":S=u.y8u;break;case"bumpX":S=u.Wi0;break;case"bumpY":S=u.PGM;break;case"catmullRom":S=u.oDi;break;case"monotoneX":S=u.nVG;break;case"monotoneY":S=u.uxU;break;case"natural":S=u.Xf2;break;case"step":S=u.GZz;break;case"stepAfter":S=u.UPb;break;case"stepBefore":S=u.dyv}const{x:A,y:R}=(0,n.RI)(e),D=(0,u.n8j)().x(A).y(R).curve(S);let M,$;switch(e.thickness){case"normal":default:M="edge-thickness-normal";break;case"thick":M="edge-thickness-thick";break;case"invisible":M="edge-thickness-invisible"}switch(e.pattern){case"solid":default:M+=" edge-pattern-solid";break;case"dotted":M+=" edge-pattern-dotted";break;case"dashed":M+=" edge-pattern-dashed"}let P="rounded"===E?N(O(C,e),5):D(C);const B=Array.isArray(e.style)?e.style:[e.style];let F=B.find(t=>t?.startsWith("stroke:")),z="";e.animate&&(z="edge-animation-fast"),e.animation&&(z="edge-animation-"+e.animation);let K=!1;if("handDrawn"===e.look){const r=d.A.svg(t);Object.assign([],C);const n=r.path(P,{roughness:.3,seed:m});M+=" transition",$=(0,u.Ltv)(n).select("path").attr("id",`${f}-${e.id}`).attr("class"," "+M+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",B?B.reduce((t,e)=>t+";"+e,""):"");let i=$.attr("d");$.attr("d",i),t.node().appendChild($.node())}else{const r=w.join(";"),i=B?B.reduce((t,e)=>t+e+";",""):"",a=(r?r+";"+i+";":i)+";"+(B?B.reduce((t,e)=>t+";"+e,""):"");$=t.append("path").attr("d",P).attr("id",`${f}-${e.id}`).attr("class"," "+M+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",a),F=a.match(/stroke:([^;]+)/)?.[1],K=!0===e.animate||!!e.animation||r.includes("animation");const o=$.node(),s="function"==typeof o.getTotalLength?o.getTotalLength():0,l=n.Nq[e.arrowTypeStart]||0,c=n.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!K){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?I(s,l,c):`0 ${l} ${s-l-c} ${c}`}; stroke-dashoffset: 0;`;$.attr("style",t+$.attr("style"))}}$.attr("data-edge",!0),$.attr("data-et","edge"),$.attr("data-id",e.id),$.attr("data-points",k),$.attr("data-look",(0,l.KL)(e.look)),e.showPoints&&C.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let j="";((0,c.D7)().flowchart.arrowMarkerAbsolute||(0,c.D7)().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.Rm.info("arrowTypeStart",e.arrowTypeStart),h.Rm.info("arrowTypeEnd",e.arrowTypeEnd);p($,e,j,f,i,!K&&"neo"===e?.look,F);const q=v[Math.floor(v.length/2)];l._K.isLabelCoordinateInPath(q,$.attr("d"))||(b=!0);let W={};return b&&(W.updatedPath=v),W.originalPath=e.points,W},"insertEdge");function N(t,e){if(t.length<2)return"";let r="";const n=t.length,i=1e-5;for(let a=0;a<n;a++){const o=t[a],s=t[a-1],l=t[a+1];if(0===a)r+=`M${o.x},${o.y}`;else if(a===n-1)r+=`L${o.x},${o.y}`;else{const t=o.x-s.x,n=o.y-s.y,a=l.x-o.x,c=l.y-o.y,h=Math.hypot(t,n),u=Math.hypot(a,c);if(h<i||u<i){r+=`L${o.x},${o.y}`;continue}const d=t/h,p=n/h,f=a/u,g=c/u,m=d*f+p*g,y=Math.max(-1,Math.min(1,m)),v=Math.acos(y);if(v<i||Math.abs(Math.PI-v)<i){r+=`L${o.x},${o.y}`;continue}const b=Math.min(e/Math.sin(v/2),h/2,u/2),x=o.x-d*b,T=o.y-p*b,w=o.x+f*b,k=o.y+g*b;r+=`L${x},${T}`,r+=`Q${o.x},${o.y} ${w},${k}`}}return r}function M(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,n=e.y-t.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}function O(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&n.hq[e.arrowTypeStart]){const i=n.hq[e.arrowTypeStart],a=t[0],o=t[1],{angle:s}=M(a,o),l=i*Math.cos(s),c=i*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+c}const i=t.length;if(i>=2&&n.hq[e.arrowTypeEnd]){const a=n.hq[e.arrowTypeEnd],o=t[i-1],s=t[i-2],{angle:l}=M(s,o),c=a*Math.cos(l),h=a*Math.sin(l);r[i-1].x=o.x-c,r[i-1].y=o.y-h}return r}(0,h.K2)(N,"generateRoundedPath"),(0,h.K2)(M,"calculateDeltaAndAngle"),(0,h.K2)(O,"applyMarkerOffsetsToPoints");var $=(0,h.K2)((t,e,r,n)=>{e.forEach(e=>{nt[e](t,r,n)})},"insertMarkers"),P=(0,h.K2)((t,e,r)=>{h.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),B=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),F=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),z=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),K=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),j=(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),q=(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),W=(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),U=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),G=(0,h.K2)((t,e,r)=>{const n=(0,c.zj)(),{themeVariables:i}=n,{transitionColor:a}=i;t.append("defs").append("marker").attr("id",r+"_"+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 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),Y=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),V=(0,h.K2)((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),H=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").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",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),X=(0,h.K2)((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Z=(0,h.K2)((t,e,r)=>{const n=(0,c.zj)(),{themeVariables:i}=n,{strokeWidth:a}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Q=(0,h.K2)((t,e,r)=>{const n=(0,c.zj)(),{themeVariables:i}=n,{strokeWidth:a,mainBkg:o}=i,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),J=(0,h.K2)((t,e,r)=>{const n=(0,c.zj)(),{themeVariables:i}=n,{strokeWidth:a}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),tt=(0,h.K2)((t,e,r)=>{const n=(0,c.zj)(),{themeVariables:i}=n,{strokeWidth:a,mainBkg:o}=i,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),et=(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),rt=(0,h.K2)((t,e,r)=>{const n=(0,c.zj)(),{themeVariables:i}=n,{strokeWidth:a}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),nt={extension:P,composition:B,aggregation:F,dependency:z,lollipop:K,point:j,circle:q,cross:W,barb:U,barbNeo:G,only_one:Y,zero_or_one:V,one_or_more:H,zero_or_more:X,only_one_neo:Z,zero_or_one_neo:Q,one_or_more_neo:J,zero_or_more_neo:tt,requirement_arrow:et,requirement_contains:(0,h.K2)((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:rt,requirement_contains_neo:(0,h.K2)((t,e,r)=>{const n=(0,c.zj)(),{themeVariables:i}=n,{strokeWidth:a}=i,o=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo")},it=$},5105(t,e,r){"use strict";r.d(e,{O:()=>o,X:()=>s});var n=r(8221),i=r(1123),a=r(797),o=(0,a.K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function s(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const o=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",o){const e=(0,i.D7)().fontSize?(0,i.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[a=i.UI.fontSize]=(0,n.I5)(e),o=a*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}(0,a.K2)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}(0,a.K2)(s,"configureLabelImages")},3848(t,e,r){"use strict";r.d(e,{XX:()=>u,q7:()=>d,sO:()=>h});var n=r(6615),i=r(2654),a=r(8221),o=r(1123),s=r(797),l={common:o.Y2,getConfig:o.zj,insertCluster:i.U,insertEdge:n.Jo,insertEdgeLabel:n.jP,insertMarkers:n.g0,insertNode:i.on,interpolateToCurve:a.Ib,labelHelper:i.Zk,log:s.Rm,positionEdgeLabel:n.T_},c={},h=(0,s.K2)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,s.K2)(()=>{h([{name:"dagre",loader:(0,s.K2)(async()=>await Promise.resolve().then(r.bind(r,1708)),"loader")},{name:"cose-bilkent",loader:(0,s.K2)(async()=>await Promise.resolve().then(r.bind(r,7928)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,s.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const l of t.nodes){const e=l.domId||l.id;l.domId=`${t.diagramId}-${e}`}const r=c[t.layoutAlgorithm],n=await r.loader(),{theme:i,themeVariables:a}=t.config,{useGradient:o,gradientStart:s,gradientStop:h}=a,u=e.attr("id");if(e.append("defs").append("filter").attr("id",`${u}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(i?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${u}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(i?.includes("dark")?"#FFFFFF":"#000000")),o){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",s).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}return n.render(t,e,l,{algorithm:r.algorithm})},"render"),d=(0,s.K2)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return s.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},8343(t,e,r){"use strict";r.d(e,{CP:()=>u,Ck:()=>f,HT:()=>p,PB:()=>d,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>s});var n=r(1123),i=r(797),a=r(6750),o=r(1444),s=(0,i.K2)((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),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(const n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),l=(0,i.K2)((t,e)=>{const r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};s(t,r).lower()},"drawBackgroundRect"),c=(0,i.K2)((t,e)=>{const r=e.text.replace(n.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(r),i},"drawText"),h=(0,i.K2)((t,e,r,n)=>{const i=t.append("image");i.attr("x",e),i.attr("y",r);const o=(0,a.J)(n);i.attr("xlink:href",o)},"drawImage"),u=(0,i.K2)((t,e,r,n)=>{const i=t.append("use");i.attr("x",e),i.attr("y",r);const o=(0,a.J)(n);i.attr("xlink:href",`#${o}`)},"drawEmbeddedImage"),d=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),f=(0,i.K2)(()=>{let t=(0,o.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,o.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},8013(t,e,r){"use strict";r.d(e,{Fr:()=>h,GX:()=>c,KX:()=>l,WW:()=>o,ue:()=>a});var n=r(1123),i=r(797),a=(0,i.K2)(t=>{const{handDrawnSeed:e}=(0,n.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),o=(0,i.K2)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,i.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,n]=t.split(":");e.set(r.trim(),n?.trim())}),e},"styles2Map"),l=(0,i.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,i.K2)(t=>{const{stylesArray:e}=o(t),r=[],n=[],i=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),h=(0,i.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=(0,n.D7)(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:l}=o(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:i,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,i.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},1240(t,e,r){"use strict";r.d(e,{W6:()=>ae,GZ:()=>he,WY:()=>Wt,pC:()=>Kt,Gc:()=>Bt});var n=r(8221),i=r(1123),a=r(797);const o=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...s,...l}),h=Object.freeze({...c,body:"",hidden:!1});function u(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}(t,e);for(const n in h)n in l?n in t&&!(n in r)&&(r[n]=l[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function d(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let a={};function o(t){a=u(n[t]||i[t],a)}return o(e),r.forEach(o),u(t,a)}function p(t,e){if(t.icons[e])return d(t,e,[]);const r=function(t,e){const r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);return(e||Object.keys(r).concat(Object.keys(n))).forEach(function t(e){if(r[e])return i[e]=[];if(!(e in i)){i[e]=null;const r=n[e]&&n[e].parent,a=r&&t(r);a&&(i[e]=[r].concat(a))}return i[e]}),i}(t,[e])[e];return r?d(t,e,r):null}const f=Object.freeze({width:null,height:null}),g=Object.freeze({...f,...l}),m=/(-?[0-9.]*[0-9]+[0-9.]*)/g,y=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function v(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const n=t.split(m);if(null===n||!n.length)return t;const i=[];let a=n.shift(),o=y.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?i.push(a):i.push(Math.ceil(t*e*r)/r)}else i.push(a);if(a=n.shift(),void 0===a)return i.join("");o=!o}}const b=/\sid="(\S+)"/g,x=new Map;function T(t){const e=[];let r;for(;r=b.exec(t);)e.push(r[1]);if(!e.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=x.get(t)||0;return x.set(t,e+1),e?`${t}${e}`:t}(e),i=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var w=r(1444);function k(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var C={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function E(t){C=t}var S={exec:()=>null};function _(t,e=""){let r="string"==typeof t?t:t.source,n={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(R.caret,"$1"),r=r.replace(t,i),n},getRegex:()=>new RegExp(r,e)};return n}var A=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,I=/(?:[*+-]|\d{1,9}[.)])/,D=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,N=_(D).replace(/bull/g,I).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),M=_(D).replace(/bull/g,I).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),O=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,P=_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B=_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,I).getRegex(),F="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,K=_("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",z).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),j=_(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),q={blockquote:_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",j).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:P,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:L,html:K,lheading:N,list:B,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:j,table:S,text:/^[^\n]+/},W=_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),U={...q,lheading:M,table:W,paragraph:_(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",W).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex()},G={...q,html:_("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_(O).replace("hr",L).replace("heading"," *#{1,6} *[^\n]").replace("lheading",N).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Y=/^( {2,}|\\)\n(?!\s*$)/,V=/[\p{P}\p{S}]/u,H=/[\s\p{P}\p{S}]/u,X=/[^\s\p{P}\p{S}]/u,Z=_(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,H).getRegex(),Q=/(?!~)[\p{P}\p{S}]/u,J=_(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",A?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,et=_(tt,"u").replace(/punct/g,V).getRegex(),rt=_(tt,"u").replace(/punct/g,Q).getRegex(),nt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",it=_(nt,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,H).replace(/punct/g,V).getRegex(),at=_(nt,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Q).getRegex(),ot=_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,H).replace(/punct/g,V).getRegex(),st=_(/\\(punct)/,"gu").replace(/punct/g,V).getRegex(),lt=_(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ct=_(z).replace("(?:--\x3e|$)","--\x3e").getRegex(),ht=_("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ut=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,dt=_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ut).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pt=_(/^!?\[(label)\]\[(ref)\]/).replace("label",ut).replace("ref",$).getRegex(),ft=_(/^!?\[(ref)\](?:\[\])?/).replace("ref",$).getRegex(),gt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mt={_backpedal:S,anyPunctuation:st,autolink:lt,blockSkip:J,br:Y,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:S,emStrongLDelim:et,emStrongRDelimAst:it,emStrongRDelimUnd:ot,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:dt,nolink:ft,punctuation:Z,reflink:pt,reflinkSearch:_("reflink|nolink(?!\\()","g").replace("reflink",pt).replace("nolink",ft).getRegex(),tag:ht,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:S},yt={...mt,link:_(/^!?\[(label)\]\((.*?)\)/).replace("label",ut).getRegex(),reflink:_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ut).getRegex()},vt={...mt,emStrongRDelimAst:at,emStrongLDelim:rt,url:_(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",gt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:_(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",gt).getRegex()},bt={...vt,br:_(Y).replace("{2,}","*").getRegex(),text:_(vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xt={normal:q,gfm:U,pedantic:G},Tt={normal:mt,gfm:vt,breaks:bt,pedantic:yt},wt={"&":"&","<":"<",">":">",'"':""","'":"'"},kt=t=>wt[t];function Ct(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,kt)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,kt);return t}function Et(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function St(t,e){let r=t.replace(R.findPipe,(t,e,r)=>{let n=!1,i=e;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(R.splitPipe),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(R.slashPipe,"|");return r}function _t(t,e,r){let n=t.length;if(0===n)return"";let i=0;for(;i<n;){let a=t.charAt(n-i-1);if(a!==e||r){if(a===e||!r)break;i++}else i++}return t.slice(0,n-i)}function At(t,e,r,n,i){let a=e.href,o=e.title||null,s=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}var Rt=class{options;rules;lexer;constructor(t){this.options=t||C}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:_t(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(null===n)return e;let i=n[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[n]=e;return n.length>=i.length?t.slice(i.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=_t(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:_t(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=_t(e[0],"\n").split("\n"),r="",n="",i=[];for(;t.length>0;){let e,a=!1,o=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))o.push(t[e]),a=!0;else{if(a)break;o.push(t[e])}t=t.slice(e);let s=o.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;let h=i.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),o=this.blockquote(a);i[i.length-1]=o,r=r.substring(0,r.length-e.raw.length)+o.raw,n=n.substring(0,n.length-e.text.length)+o.text;break}if("list"===h?.type){let e=h,a=e.raw+"\n"+t.join("\n"),o=this.list(a);i[i.length-1]=o,r=r.substring(0,r.length-h.raw.length)+o.raw,n=n.substring(0,n.length-e.raw.length)+o.raw,t=a.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:i,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;t;){let r=!1,n="",s="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;n=e[0],t=t.substring(n.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,s=l.slice(u),u+=e[1].length),h&&this.rules.other.blankLine.test(c)&&(n+=c+"\n",t=t.substring(c.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),i=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),o=this.rules.other.htmlBeginRegex(u);for(;t;){let d,p=t.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),i.test(c)||a.test(c)||o.test(c)||e.test(c)||r.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!c.trim())s+="\n"+d.slice(u);else{if(h||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||r.test(l))break;s+="\n"+c}!h&&!c.trim()&&(h=!0),n+=p+"\n",t=t.substring(p.length+1),l=d.slice(u)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(o=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:n,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),i.raw+=n}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){let e=i.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));i.loose=r}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=St(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let t of n)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<r.length;t++)a.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:a.align[t]});for(let t of i)a.rows.push(St(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=_t(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let n=0;n<t.length;n++)if("\\"===t[n])n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],n="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],n=t[3])}else n=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),At(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return At(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){let r,i,a=[...n[0]].length-1,o=a,s=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(n=l.exec(e));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(i=[...r].length,n[3]||n[4]){o+=i;continue}if((n[5]||n[6])&&a%3&&!((a+i)%3)){s+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+s);let e=[...n[0]][0].length,l=t.slice(0,a+n.index+e+i);if(Math.min(a,i)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let n;do{n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(n!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Lt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||C,this.options.tokenizer=this.options.tokenizer||new Rt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:R,block:xt.normal,inline:Tt.normal};this.options.pedantic?(e.block=xt.pedantic,e.inline=Tt.pedantic):this.options.gfm&&(e.block=xt.gfm,this.options.breaks?e.inline=Tt.breaks:e.inline=Tt.gfm),this.tokenizer.rules=e}static get rules(){return{block:xt,inline:Tt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(R.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(R.tabCharGlobal," ").replace(R.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let r=e.at(-1);1===n.raw.length&&void 0!==r?r.raw+="\n":e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+n.raw,r.text+="\n"+n.text,this.inlineQueue.at(-1).src=r.text):e.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+n.raw,r.text+="\n"+n.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},e.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),e.push(n);continue}let i=t;if(this.options.extensions?.startBlock){let e,r=1/0,n=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},n),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(i=t.substring(0,r+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+n.raw,a.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(n),r=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(n);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,n=t,i=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(n));)t.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(n));)r=i[2]?i[2].length:0,n=n.slice(0,i.index+r)+"["+"a".repeat(i[0].length-r-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o="";for(;t;){let r;if(a||(o=""),a=!1,this.options.extensions?.inline?.some(n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let n=e.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,n,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startInline){let e,r=1/0,n=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},n),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(i=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),a=!0;let n=e.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},It=class{options;parser;constructor(t){this.options=t||C}space(t){return""}code({text:t,lang:e,escaped:r}){let n=(e||"").match(R.notSpaceStart)?.[0],i=t.replace(R.endingNewline,"")+"\n";return n?'<pre><code class="language-'+Ct(n)+'">'+(r?i:Ct(i,!0))+"</code></pre>\n":"<pre><code>"+(r?i:Ct(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,n="";for(let a=0;a<t.items.length;a++){let e=t.items[a];n+=this.listitem(e)}let i=e?"ol":"ul";return"<"+i+(e&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+i+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+Ct(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);e+=this.tablerow({text:r});let n="";for(let i=0;i<t.rows.length;i++){let e=t.rows[i];r="";for(let t=0;t<e.length;t++)r+=this.tablecell(e[t]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+n+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ct(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=Et(t);if(null===i)return n;let a='<a href="'+(t=i)+'"';return e&&(a+=' title="'+Ct(e)+'"'),a+=">"+n+"</a>",a}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=Et(t);if(null===i)return Ct(r);let a=`<img src="${t=i}" alt="${r}"`;return e&&(a+=` title="${Ct(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ct(t.text)}},Dt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Nt=class t{options;renderer;textRenderer;constructor(t){this.options=t||C,this.options.renderer=this.options.renderer||new It,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dt}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let a=i;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"def":r+=this.renderer.def(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let i=a,o=this.renderer.text(i);for(;n+1<t.length&&"text"===t[n+1].type;)i=t[++n],o+="\n"+this.renderer.text(i);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=t||"";continue}}let a=i;switch(a.type){case"escape":case"text":r+=e.text(a);break;case"html":r+=e.html(a);break;case"link":r+=e.link(a);break;case"image":r+=e.image(a);break;case"strong":r+=e.strong(a);break;case"em":r+=e.em(a);break;case"codespan":r+=e.codespan(a);break;case"br":r+=e.br(a);break;case"del":r+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},Mt=class{options;block;constructor(t){this.options=t||C}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Lt.lex:Lt.lexInline}provideParser(){return this.block?Nt.parse:Nt.parseInline}},Ot=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Nt;Renderer=It;TextRenderer=Dt;Lexer=Lt;Tokenizer=Rt;Hooks=Mt;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let n of t)switch(r=r.concat(e.call(this,n)),n.type){case"table":{let t=n;for(let n of t.header)r=r.concat(this.walkTokens(n.tokens,e));for(let n of t.rows)for(let t of n)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=n;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=n;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(n=>{let i=t[n].flat(1/0);r=r.concat(this.walkTokens(i,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let n=t.renderer.apply(this,e);return!1===n&&(n=r.apply(this,e)),n}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new It(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=r,i=t.renderer[n],a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Rt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=r,i=t.tokenizer[n],a=e[n];e[n]=(...t)=>{let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Mt;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=r,i=t.hooks[n],a=e[n];Mt.passThroughHooks.has(r)?e[n]=t=>{if(this.defaults.async&&Mt.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await i.call(e,t);return a.call(e,r)})();let n=i.call(e,t);return a.call(e,n)}:e[n]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await i.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=i.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,n=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(n.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Lt.lex(t,e??this.defaults)}parser(t,e){return Nt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let r=i.hooks?await i.hooks.preprocess(e):e,n=await(i.hooks?await i.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(r,i),a=i.hooks?await i.hooks.processAllTokens(n):n;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():t?Nt.parse:Nt.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let r=(i.hooks?i.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(e,i);i.hooks&&(r=i.hooks.processAllTokens(r)),i.walkTokens&&this.walkTokens(r,i.walkTokens);let n=(i.hooks?i.hooks.provideParser():t?Nt.parse:Nt.parseInline)(r,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(o){return a(o)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+Ct(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function $t(t,e){return Ot.parse(t,e)}$t.options=$t.setOptions=function(t){return Ot.setOptions(t),$t.defaults=Ot.defaults,E($t.defaults),$t},$t.getDefaults=k,$t.defaults=C,$t.use=function(...t){return Ot.use(...t),$t.defaults=Ot.defaults,E($t.defaults),$t},$t.walkTokens=function(t,e){return Ot.walkTokens(t,e)},$t.parseInline=Ot.parseInline,$t.Parser=Nt,$t.parser=Nt.parse,$t.Renderer=It,$t.TextRenderer=Dt,$t.Lexer=Lt,$t.lexer=Lt.lex,$t.Tokenizer=Rt,$t.Hooks=Mt,$t.parse=$t;$t.options,$t.setOptions,$t.use,$t.walkTokens,$t.parseInline,Nt.parse,Lt.lex;var Pt=r(513),Bt={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Ft=new Map,zt=new Map,Kt=(0,a.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)zt.set(e.name,e.loader);else{if(!("icons"in e))throw a.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ft.set(e.name,e.icons)}}},"registerIconPacks"),jt=(0,a.K2)(async(t,e)=>{const r=((t,e,r,n="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),r=i.pop(),a={provider:i.length>0?i[0]:n,prefix:r,name:t};return e&&!o(a)?null:a}const a=i[0],s=a.split("-");if(s.length>1){const t={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(r&&""===n){const t={provider:n,prefix:"",name:a};return e&&!o(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=Ft.get(n);if(!i){const t=zt.get(n);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await t(),prefix:n},Ft.set(n,i)}catch(l){throw a.Rm.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=p(i,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),qt=(0,a.K2)(async t=>{try{return await jt(t),!0}catch{return!1}},"isIconAvailable"),Wt=(0,a.K2)(async(t,e,r)=>{let n;try{n=await jt(t,e?.fallbackPrefix)}catch(l){a.Rm.error(l),n=Bt}const o=function(t,e){const r={...c,...t},n={...g,...e},i={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,n].forEach(t=>{const e=[],r=t.hFlip,n=t.vFlip;let o,s=t.rotate;switch(r?n?s+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):n&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=i.height/2+i.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:o=i.width/2+i.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(i.left!==i.top&&(o=i.left,i.left=i.top,i.top=o),i.width!==i.height&&(o=i.width,i.width=i.height,i.height=o)),e.length&&(a=function(t,e,r){const n=function(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const i=t.indexOf(">",n),a=t.indexOf("</"+e);if(-1===i||-1===a)break;const o=t.indexOf(">",a);if(-1===o)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return i=n.defs,a=e+n.content+r,i?"<defs>"+i+"</defs>"+a:a;var i,a}(a,'<g transform="'+e.join(" ")+'">',"</g>"))});const o=n.width,s=n.height,l=i.width,h=i.height;let u,d;null===o?(d=null===s?"1em":"auto"===s?h:s,u=v(d,l/h)):(u="auto"===o?l:o,d=null===s?v(u,h/l):"auto"===s?h:s);const p={},f=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};f("width",u),f("height",d);const m=[i.left,i.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}(n,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(T(o.body),{...o.attributes,...r});return(0,i.jZ)(s,(0,i.zj)())},"getIconSVG");function Ut(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,Pt.T)(r)}function Gt(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function Yt(t,e={}){const r=Ut(t,e),n=$t.lexer(r),i=[[]];let o=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&i[o].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&i[o].push({content:t.text,type:"normal"})}return(0,a.K2)(s,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?i[o].push({content:t.text,type:"normal"}):i[o].push({content:t.raw,type:"normal"})}),i}function Vt(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Ht(t,{markdownAutoWrap:e}={}){const r=$t.lexer(t);function n(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(n).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(n).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(n).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(n,"output"),r.map(n).join("")}function Xt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Zt(t,e){return Qt(t,[],Xt(e.content),e.type)}function Qt(t,e,r,n){if(0===r.length)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...a]=r,o=[...e,i];return t([{content:o.join(""),type:n}])?Qt(t,o,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function Jt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return te(t,e)}function te(t,e,r=[],n=[]){if(0===t.length)return n.length>0&&r.push(n),r.length>0?r:[];let i="";" "===t[0].content&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...n];if(""!==i&&o.push({content:i,type:"normal"}),o.push(a),e(o))return te(t,e,r,o);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){const[n,i]=Zt(e,a);r.push([n]),i.content&&t.unshift(i)}return te(t,e,r)}function ee(t,e){e&&t.attr("style",e)}(0,a.K2)(Ut,"preprocessMarkdown"),(0,a.K2)(Gt,"nonMarkdownToLines"),(0,a.K2)(Yt,"markdownToLines"),(0,a.K2)(Vt,"nonMarkdownToHTML"),(0,a.K2)(Ht,"markdownToHTML"),(0,a.K2)(Xt,"splitTextToChars"),(0,a.K2)(Zt,"splitWordToFitWidth"),(0,a.K2)(Qt,"splitWordToFitWidthRecursion"),(0,a.K2)(Jt,"splitLineToFitWidth"),(0,a.K2)(te,"splitLineToFitWidthRecursion"),(0,a.K2)(ee,"applyStyle");async function re(t,e,r,n,a=!1,o=(0,i.zj)()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const l=s.append("xhtml:div"),c=(0,i.Wi)(e.label)?await(0,i.dj)(e.label.replace(i.Y2.lineBreakRegex,"\n"),o):(0,i.jZ)(e.label,o),h=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(c),ee(u,e.labelStyle),u.attr("class",`${h} ${n}`),ee(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()}function ne(t,e,r,n=!1){const i=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return n&&i.attr("text-anchor","middle"),i}function ie(t,e,r){const n=t.append("text"),i=ne(n,1,e);le(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}function ae(t,e,r){const n=t.append("text"),i=ne(n,1,e);le(i,[{content:r,type:"normal"}]);const a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function oe(t,e,r,n=!1,i=!1){const o=e.append("g"),s=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");i&&l.attr("text-anchor","middle");let c=0;for(const h of r){const e=(0,a.K2)(e=>ie(o,1.1,e)<=t,"checkWidth"),r=e(h)?[h]:Jt(h,e);for(const t of r){le(ne(l,c,1.1,i),t),c++}}if(n){const t=l.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),o.node()}return l.node()}function se(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function le(t,e){t.text(""),e.forEach((e,r)=>{const n=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?n.text(se(e.content)):n.text(" "+se(e.content))})}async function ce(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,n,a)=>(r.push((async()=>{const r=`${n}:${a}`;return await qt(r)?await Wt(r,void 0,{class:"label-icon"}):`<i class='${(0,i.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}(0,a.K2)(re,"addHtmlSpan"),(0,a.K2)(ne,"createTspan"),(0,a.K2)(ie,"computeWidthOfText"),(0,a.K2)(ae,"computeDimensionOfText"),(0,a.K2)(oe,"createFormattedText"),(0,a.K2)(se,"decodeHTMLEntities"),(0,a.K2)(le,"updateTextContentAndStyles"),(0,a.K2)(ce,"replaceIconSubstring");var he=(0,a.K2)(async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,markdown:c=!0,isNode:h=!0,width:u=200,addSvgBackground:d=!1}={},p)=>{if(a.Rm.debug("XYZ createText",e,r,o,s,l,h,"addSvgBackground: ",d),l){const a=c?Ht(e,p):Vt(e),o=await ce((0,n.Sm)(a),p),l=e.replace(/\\\\/g,"\\"),f={isNode:h,label:(0,i.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await re(t,f,u,s,d,p)}{const i=(0,n.Sm)(e.replace(/<br\s*\/?>/g,"<br/>")),a=oe(u,t,c?Yt(i.replace("<br>","<br/>"),p):Gt(i),!!e&&d,!h);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,w.Ltv)(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,w.Ltv)(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,w.Ltv)(a).select("text").attr("style",e)}return o?(0,w.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,w.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText")},2938(t,e,r){"use strict";r.d(e,{m:()=>i});var n=r(797),i=class{constructor(t){this.init=t,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},594(t,e,r){"use strict";r.d(e,{D:()=>o});var n=r(1123),i=r(797),a=r(1444),o=(0,i.K2)(t=>{const{securityLevel:e}=(0,n.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),n=e.node()?.contentDocument??document;r=(0,a.Ltv)(n.body)}return r.select(`#${t}`)},"selectSvgElement")},3283(t,e,r){"use strict";r.d(e,{H:()=>nr,r:()=>rr});var n=r(797);function i(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:i(t)?[]:[t]}function s(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;r<n;r+=1)t[i=a[r]]=e[i];return t}function l(t,e){var r,n="";for(r=0;r<e;r+=1)n+=t;return n}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}(0,n.K2)(i,"isNothing"),(0,n.K2)(a,"isObject"),(0,n.K2)(o,"toArray"),(0,n.K2)(s,"extend"),(0,n.K2)(l,"repeat"),(0,n.K2)(c,"isNegativeZero");var h={isNothing:i,isObject:a,toArray:o,repeat:l,isNegativeZero:c,extend:s};function u(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+="\n\n"+t.mark.snippet),n+" "+r):n}function d(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=u(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(0,n.K2)(u,"formatError"),(0,n.K2)(d,"YAMLException$1"),d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.toString=(0,n.K2)(function(t){return this.name+": "+u(this,t)},"toString");var p=d;function f(t,e,r,n,i){var a="",o="",s=Math.floor(i/2)-1;return n-e>s&&(e=n-s+(a=" ... ").length),r-n>s&&(r=n+s-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:n-e+a.length}}function g(t,e){return h.repeat(" ",e-t.length)+t}function m(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=f(t.buffer,i[o-s],a[o-s],t.position-(i[o]-i[o-s]),d),c=h.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=f(t.buffer,i[o],a[o],t.position,d),c+=h.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",c+=h.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=f(t.buffer,i[o+s],a[o+s],t.position-(i[o]-i[o+s]),d),c+=h.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,n.K2)(f,"getLine"),(0,n.K2)(g,"padStart"),(0,n.K2)(m,"makeSnippet");var y=m,v=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function x(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function T(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===v.indexOf(e))throw new p('Unknown option "'+e+'" 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(t){return t},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=x(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,n.K2)(x,"compileStyleAliases"),(0,n.K2)(T,"Type$1");var w=T;function k(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,n){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=n)}),r[e]=t}),r}function C(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,n.K2)(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function E(t){return this.extend(t)}(0,n.K2)(k,"compileList"),(0,n.K2)(C,"compileMap"),(0,n.K2)(E,"Schema$1"),E.prototype.extend=(0,n.K2)(function(t){var e=[],r=[];if(t instanceof w)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new p("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new p("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new p("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof w))throw new p("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(E.prototype);return n.implicit=(this.implicit||[]).concat(e),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=k(n,"implicit"),n.compiledExplicit=k(n,"explicit"),n.compiledTypeMap=C(n.compiledImplicit,n.compiledExplicit),n},"extend");var S=new E({explicit:[new w("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,n.K2)(function(t){return null!==t?t:""},"construct")}),new w("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,n.K2)(function(t){return null!==t?t:[]},"construct")}),new w("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,n.K2)(function(t){return null!==t?t:{}},"construct")})]});function _(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function A(){return null}function R(t){return null===t}(0,n.K2)(_,"resolveYamlNull"),(0,n.K2)(A,"constructYamlNull"),(0,n.K2)(R,"isNull");var L=new w("tag:yaml.org,2002:null",{kind:"scalar",resolve:_,construct:A,predicate:R,represent:{canonical:(0,n.K2)(function(){return"~"},"canonical"),lowercase:(0,n.K2)(function(){return"null"},"lowercase"),uppercase:(0,n.K2)(function(){return"NULL"},"uppercase"),camelcase:(0,n.K2)(function(){return"Null"},"camelcase"),empty:(0,n.K2)(function(){return""},"empty")},defaultStyle:"lowercase"});function I(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function D(t){return"true"===t||"True"===t||"TRUE"===t}function N(t){return"[object Boolean]"===Object.prototype.toString.call(t)}(0,n.K2)(I,"resolveYamlBoolean"),(0,n.K2)(D,"constructYamlBoolean"),(0,n.K2)(N,"isBoolean");var M=new w("tag:yaml.org,2002:bool",{kind:"scalar",resolve:I,construct:D,predicate:N,represent:{lowercase:(0,n.K2)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,n.K2)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,n.K2)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function O(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function $(t){return 48<=t&&t<=55}function P(t){return 48<=t&&t<=57}function B(t){if(null===t)return!1;var e,r=t.length,n=0,i=!1;if(!r)return!1;if("-"!==(e=t[n])&&"+"!==e||(e=t[++n]),"0"===e){if(n+1===r)return!0;if("b"===(e=t[++n])){for(n++;n<r;n++)if("_"!==(e=t[n])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!O(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}if("o"===e){for(n++;n<r;n++)if("_"!==(e=t[n])){if(!$(t.charCodeAt(n)))return!1;i=!0}return i&&"_"!==e}}if("_"===e)return!1;for(;n<r;n++)if("_"!==(e=t[n])){if(!P(t.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===e)}function F(t){var e,r=t,n=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(n=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return n*parseInt(r.slice(2),2);if("x"===r[1])return n*parseInt(r.slice(2),16);if("o"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)}function z(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!h.isNegativeZero(t)}(0,n.K2)(O,"isHexCode"),(0,n.K2)($,"isOctCode"),(0,n.K2)(P,"isDecCode"),(0,n.K2)(B,"resolveYamlInteger"),(0,n.K2)(F,"constructYamlInteger"),(0,n.K2)(z,"isInteger");var K=new w("tag:yaml.org,2002:int",{kind:"scalar",resolve:B,construct:F,predicate:z,represent:{binary:(0,n.K2)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,n.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,n.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,n.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),j=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function q(t){return null!==t&&!(!j.test(t)||"_"===t[t.length-1])}function W(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,n.K2)(q,"resolveYamlFloat"),(0,n.K2)(W,"constructYamlFloat");var U=/^[-+]?[0-9]+e/;function G(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(h.isNegativeZero(t))return"-0.0";return r=t.toString(10),U.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||h.isNegativeZero(t))}(0,n.K2)(G,"representYamlFloat"),(0,n.K2)(Y,"isFloat");var V=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:q,construct:W,predicate:Y,represent:G,defaultStyle:"lowercase"}),H=S.extend({implicit:[L,M,K,V]}),X=H,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=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 J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,n,i,a,o,s,l,c=0,h=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)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(a=+e[4],o=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(r,n,i,a,o,s,c)),h&&l.setTime(l.getTime()-h),l}function et(t){return t.toISOString()}(0,n.K2)(J,"resolveYamlTimestamp"),(0,n.K2)(tt,"constructYamlTimestamp"),(0,n.K2)(et,"representYamlTimestamp");var rt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function nt(t){return"<<"===t||null===t}(0,n.K2)(nt,"resolveYamlMerge");var it=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nt}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(t){if(null===t)return!1;var e,r,n=0,i=t.length,a=at;for(r=0;r<i;r++)if(!((e=a.indexOf(t.charAt(r)))>64)){if(e<0)return!1;n+=6}return n%8==0}function st(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=at,o=0,s=[];for(e=0;e<i;e++)e%4==0&&e&&(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(n.charAt(e));return 0===(r=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,r,n="",i=0,a=t.length,o=at;for(e=0;e<a;e++)e%3==0&&e&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+t[e];return 0===(r=a%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function ct(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,n.K2)(ot,"resolveYamlBinary"),(0,n.K2)(st,"constructYamlBinary"),(0,n.K2)(lt,"representYamlBinary"),(0,n.K2)(ct,"isBinary");var ht=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ct,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,n,i,a,o=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(n=s[e],a=!1,"[object Object]"!==dt.call(n))return!1;for(i in n)if(ut.call(n,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==o.indexOf(i))return!1;o.push(i)}return!0}function ft(t){return null!==t?t:[]}(0,n.K2)(pt,"resolveYamlOmap"),(0,n.K2)(ft,"constructYamlOmap");var gt=new w("tag:yaml.org,2002:omap",{kind:"sequence",resolve:pt,construct:ft}),mt=Object.prototype.toString;function yt(t){if(null===t)return!0;var e,r,n,i,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(n=o[e],"[object Object]"!==mt.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;a[e]=[i[0],n[i[0]]]}return!0}function vt(t){if(null===t)return[];var e,r,n,i,a,o=t;for(a=new Array(o.length),e=0,r=o.length;e<r;e+=1)n=o[e],i=Object.keys(n),a[e]=[i[0],n[i[0]]];return a}(0,n.K2)(yt,"resolveYamlPairs"),(0,n.K2)(vt,"constructYamlPairs");var bt=new w("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:yt,construct:vt}),xt=Object.prototype.hasOwnProperty;function Tt(t){if(null===t)return!0;var e,r=t;for(e in r)if(xt.call(r,e)&&null!==r[e])return!1;return!0}function wt(t){return null!==t?t:{}}(0,n.K2)(Tt,"resolveYamlSet"),(0,n.K2)(wt,"constructYamlSet");var kt=new w("tag:yaml.org,2002:set",{kind:"mapping",resolve:Tt,construct:wt}),Ct=X.extend({implicit:[rt,it],explicit:[ht,gt,bt,kt]}),Et=Object.prototype.hasOwnProperty,St=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_t=/[\x85\u2028\u2029]/,At=/[,\[\]\{\}]/,Rt=/^(?:!|!!|![a-z\-]+!)$/i,Lt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function It(t){return Object.prototype.toString.call(t)}function Dt(t){return 10===t||13===t}function Nt(t){return 9===t||32===t}function Mt(t){return 9===t||32===t||10===t||13===t}function Ot(t){return 44===t||91===t||93===t||123===t||125===t}function $t(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function Pt(t){return 120===t?2:117===t?4:85===t?8:0}function Bt(t){return 48<=t&&t<=57?t-48:-1}function Ft(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"
":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function zt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Kt(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,n.K2)(It,"_class"),(0,n.K2)(Dt,"is_EOL"),(0,n.K2)(Nt,"is_WHITE_SPACE"),(0,n.K2)(Mt,"is_WS_OR_EOL"),(0,n.K2)(Ot,"is_FLOW_INDICATOR"),(0,n.K2)($t,"fromHexCode"),(0,n.K2)(Pt,"escapedHexLen"),(0,n.K2)(Bt,"fromDecimalCode"),(0,n.K2)(Ft,"simpleEscapeSequence"),(0,n.K2)(zt,"charFromCodepoint"),(0,n.K2)(Kt,"setProperty");var jt,qt=new Array(256),Wt=new Array(256);for(jt=0;jt<256;jt++)qt[jt]=Ft(jt)?1:0,Wt[jt]=Ft(jt);function Ut(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Ct,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 Gt(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=y(r),new p(e,r)}function Yt(t,e){throw Gt(t,e)}function Vt(t,e){t.onWarning&&t.onWarning.call(null,Gt(t,e))}(0,n.K2)(Ut,"State$1"),(0,n.K2)(Gt,"generateError"),(0,n.K2)(Yt,"throwError"),(0,n.K2)(Vt,"throwWarning");var Ht={YAML:(0,n.K2)(function(t,e,r){var n,i,a;null!==t.version&&Yt(t,"duplication of %YAML directive"),1!==r.length&&Yt(t,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Yt(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&Yt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Vt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,n.K2)(function(t,e,r){var n,i;2!==r.length&&Yt(t,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Rt.test(n)||Yt(t,"ill-formed tag handle (first argument) of the TAG directive"),Et.call(t.tagMap,n)&&Yt(t,'there is a previously declared suffix for "'+n+'" tag handle'),Lt.test(i)||Yt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(a){Yt(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i},"handleTagDirective")};function Xt(t,e,r,n){var i,a,o,s;if(e<r){if(s=t.input.slice(e,r),n)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||Yt(t,"expected valid JSON character");else St.test(s)&&Yt(t,"the stream contains non-printable characters");t.result+=s}}function Zt(t,e,r,n){var i,a,o,s;for(h.isObject(r)||Yt(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(i=Object.keys(r)).length;o<s;o+=1)a=i[o],Et.call(e,a)||(Kt(e,a,r[a]),n[a]=!0)}function Qt(t,e,r,n,i,a,o,s,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&Yt(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===It(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===It(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)Zt(t,e,a[c],r);else Zt(t,e,a,r);else t.json||Et.call(r,i)||!Et.call(e,i)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,Yt(t,"duplicated mapping key")),Kt(e,i,a),delete r[i];return e}function Jt(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Yt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function te(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);0!==i;){for(;Nt(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)do{i=t.input.charCodeAt(++t.position)}while(10!==i&&13!==i&&0!==i);if(!Dt(i))break;for(Jt(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==r&&0!==n&&t.lineIndent<r&&Vt(t,"deficient indentation"),n}function ee(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Mt(e)))}function re(t,e){1===e?t.result+=" ":e>1&&(t.result+=h.repeat("\n",e-1))}function ne(t,e,r){var n,i,a,o,s,l,c,h,u=t.kind,d=t.result;if(Mt(h=t.input.charCodeAt(t.position))||Ot(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Mt(n=t.input.charCodeAt(t.position+1))||r&&Ot(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,o=!1;0!==h;){if(58===h){if(Mt(n=t.input.charCodeAt(t.position+1))||r&&Ot(n))break}else if(35===h){if(Mt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ee(t)||r&&Ot(h))break;if(Dt(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,te(t,!1,-1),t.lineIndent>=e){o=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=c;break}}o&&(Xt(t,i,a,!1),re(t,t.line-s),i=a=t.position,o=!1),Nt(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Xt(t,i,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ie(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Xt(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else Dt(r)?(Xt(t,n,i,!0),re(t,te(t,!1,e)),n=i=t.position):t.position===t.lineStart&&ee(t)?Yt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Yt(t,"unexpected end of the stream within a single quoted scalar")}function ae(t,e){var r,n,i,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Xt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Xt(t,r,t.position,!0),Dt(s=t.input.charCodeAt(++t.position)))te(t,!1,e);else if(s<256&&qt[s])t.result+=Wt[s],t.position++;else if((o=Pt(s))>0){for(i=o,a=0;i>0;i--)(o=$t(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Yt(t,"expected hexadecimal character");t.result+=zt(a),t.position++}else Yt(t,"unknown escape sequence");r=n=t.position}else Dt(s)?(Xt(t,r,n,!0),re(t,te(t,!1,e)),r=n=t.position):t.position===t.lineStart&&ee(t)?Yt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Yt(t,"unexpected end of the stream within a double quoted scalar")}function oe(t,e){var r,n,i,a,o,s,l,c,h,u,d,p,f=!0,g=t.tag,m=t.anchor,y=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,c=!1,a=[];else{if(123!==p)return!1;o=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(te(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=m,t.kind=c?"mapping":"sequence",t.result=a,!0;f?44===p&&Yt(t,"expected the node content, but found ','"):Yt(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Mt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,te(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,pe(t,e,1,!1,!0),u=t.tag,h=t.result,te(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),te(t,!0,e),pe(t,e,1,!1,!0),d=t.result),c?Qt(t,a,y,u,h,d,r,n,i):s?a.push(Qt(t,null,y,u,h,d,r,n,i)):a.push(h),te(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Yt(t,"unexpected end of the stream within a flow collection")}function se(t,e){var r,n,i,a,o=1,s=!1,l=!1,c=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))n=!1;else{if(62!==a)return!1;n=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:Yt(t,"repeat of a chomping mode identifier");else{if(!((i=Bt(a))>=0))break;0===i?Yt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Yt(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(Nt(a)){do{a=t.input.charCodeAt(++t.position)}while(Nt(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Dt(a)&&0!==a)}for(;0!==a;){for(Jt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<c)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>c&&(c=t.lineIndent),Dt(a))u++;else{if(t.lineIndent<c){3===o?t.result+=h.repeat("\n",s?1+u:u):1===o&&s&&(t.result+="\n");break}for(n?Nt(a)?(d=!0,t.result+=h.repeat("\n",s?1+u:u)):d?(d=!1,t.result+=h.repeat("\n",u+1)):0===u?s&&(t.result+=" "):t.result+=h.repeat("\n",u):t.result+=h.repeat("\n",s?1+u:u),s=!0,l=!0,u=0,r=t.position;!Dt(a)&&0!==a;)a=t.input.charCodeAt(++t.position);Xt(t,r,t.position,!1)}}return!0}function le(t,e){var r,n,i=t.tag,a=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),45===n)&&Mt(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,te(t,!0,-1)&&t.lineIndent<=e)o.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,pe(t,e,3,!1,!0),o.push(t.result),te(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)Yt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=i,t.anchor=a,t.kind="sequence",t.result=o,!0)}function ce(t,e,r){var n,i,a,o,s,l,c,h=t.tag,u=t.anchor,d={},p=Object.create(null),f=null,g=null,m=null,y=!1,v=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Yt(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!Mt(n)){if(o=t.line,s=t.lineStart,l=t.position,!pe(t,r,2,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);Nt(c);)c=t.input.charCodeAt(++t.position);if(58===c)Mt(c=t.input.charCodeAt(++t.position))||Yt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Qt(t,d,p,f,g,null,o,s,l),f=g=m=null),v=!0,y=!1,i=!1,f=t.tag,g=t.result;else{if(!v)return t.tag=h,t.anchor=u,!0;Yt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=h,t.anchor=u,!0;Yt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Qt(t,d,p,f,g,null,o,s,l),f=g=m=null),v=!0,y=!0,i=!0):y?(y=!1,i=!0):Yt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=n;if((t.line===a||t.lineIndent>e)&&(y&&(o=t.line,s=t.lineStart,l=t.position),pe(t,e,4,!0,i)&&(y?g=t.result:m=t.result),y||(Qt(t,d,p,f,g,m,o,s,l),f=g=m=null),te(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Yt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Qt(t,d,p,f,g,null,o,s,l),v&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),v}function he(t){var e,r,n,i,a=!1,o=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Yt(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(a=!0,i=t.input.charCodeAt(++t.position)):33===i?(o=!0,r="!!",i=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(n=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):Yt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!Mt(i);)33===i&&(o?Yt(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Rt.test(r)||Yt(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),At.test(n)&&Yt(t,"tag suffix cannot contain flow indicator characters")}n&&!Lt.test(n)&&Yt(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch(s){Yt(t,"tag name is malformed: "+n)}return a?t.tag=n:Et.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:"!"===r?t.tag="!"+n:"!!"===r?t.tag="tag:yaml.org,2002:"+n:Yt(t,'undeclared tag handle "'+r+'"'),!0}function ue(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Yt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Mt(r)&&!Ot(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function de(t){var e,r,n;if(42!==(n=t.input.charCodeAt(t.position)))return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Mt(n)&&!Ot(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Yt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Et.call(t.anchorMap,r)||Yt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],te(t,!0,-1),!0}function pe(t,e,r,n,i){var a,o,s,l,c,h,u,d,p,f=1,g=!1,m=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=o=s=4===r||3===r,n&&te(t,!0,-1)&&(g=!0,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)),1===f)for(;he(t)||ue(t);)te(t,!0,-1)?(g=!0,s=a,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)):s=!1;if(s&&(s=g||i),1!==f&&4!==r||(d=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===f?s&&(le(t,p)||ce(t,p,d))||oe(t,d)?m=!0:(o&&se(t,d)||ie(t,d)||ae(t,d)?m=!0:de(t)?(m=!0,null===t.tag&&null===t.anchor||Yt(t,"alias node should not have any properties")):ne(t,d,1===r)&&(m=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(m=s&&le(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Yt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((u=t.implicitTypes[l]).resolve(t.result)){t.result=u.construct(t.result),t.tag=u.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(Et.call(t.typeMap[t.kind||"fallback"],t.tag))u=t.typeMap[t.kind||"fallback"][t.tag];else for(u=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){u=h[l];break}u||Yt(t,"unknown tag !<"+t.tag+">"),null!==t.result&&u.kind!==t.kind&&Yt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Yt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function fe(t){var e,r,n,i,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(te(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(o=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Mt(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&Yt(t,"directive name must not be less than one character in length");0!==i;){for(;Nt(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!Dt(i));break}if(Dt(i))break;for(e=t.position;0!==i&&!Mt(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&Jt(t),Et.call(Ht,r)?Ht[r](t,r,n):Vt(t,'unknown document directive "'+r+'"')}te(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,te(t,!0,-1)):o&&Yt(t,"directives end mark is expected"),pe(t,t.lineIndent-1,4,!1,!0),te(t,!0,-1),t.checkLineBreaks&&_t.test(t.input.slice(a,t.position))&&Vt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ee(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,te(t,!0,-1)):t.position<t.length-1&&Yt(t,"end of the stream or a document separator is expected")}function ge(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new Ut(t,e),n=t.indexOf("\0");for(-1!==n&&(r.position=n,Yt(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)fe(r);return r.documents}function me(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var n=ge(t,r);if("function"!=typeof e)return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i])}function ye(t,e){var r=ge(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new p("expected a single document in the stream, but found more")}}(0,n.K2)(Xt,"captureSegment"),(0,n.K2)(Zt,"mergeMappings"),(0,n.K2)(Qt,"storeMappingPair"),(0,n.K2)(Jt,"readLineBreak"),(0,n.K2)(te,"skipSeparationSpace"),(0,n.K2)(ee,"testDocumentSeparator"),(0,n.K2)(re,"writeFoldedLines"),(0,n.K2)(ne,"readPlainScalar"),(0,n.K2)(ie,"readSingleQuotedScalar"),(0,n.K2)(ae,"readDoubleQuotedScalar"),(0,n.K2)(oe,"readFlowCollection"),(0,n.K2)(se,"readBlockScalar"),(0,n.K2)(le,"readBlockSequence"),(0,n.K2)(ce,"readBlockMapping"),(0,n.K2)(he,"readTagProperty"),(0,n.K2)(ue,"readAnchorProperty"),(0,n.K2)(de,"readAlias"),(0,n.K2)(pe,"composeNode"),(0,n.K2)(fe,"readDocument"),(0,n.K2)(ge,"loadDocuments"),(0,n.K2)(me,"loadAll$1"),(0,n.K2)(ye,"load$1");var ve={loadAll:me,load:ye},be=Object.prototype.toString,xe=Object.prototype.hasOwnProperty,Te=65279,we={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},ke=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Ce=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ee(t,e){var r,n,i,a,o,s,l;if(null===e)return{};for(r={},i=0,a=(n=Object.keys(e)).length;i<a;i+=1)o=n[i],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&xe.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function Se(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else{if(!(t<=4294967295))throw new p("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}return"\\"+r+h.repeat("0",n-e.length)+e}(0,n.K2)(Ee,"compileStyleMap"),(0,n.K2)(Se,"encodeHex");function _e(t){this.schema=t.schema||Ct,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=h.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Ee(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ae(t,e){for(var r,n=h.repeat(" ",e),i=0,a=-1,o="",s=t.length;i<s;)-1===(a=t.indexOf("\n",i))?(r=t.slice(i),i=s):(r=t.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(o+=n),o+=r;return o}function Re(t,e){return"\n"+h.repeat(" ",t.indent*e)}function Le(t,e){var r,n;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function Ie(t){return 32===t||9===t}function De(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==Te||65536<=t&&t<=1114111}function Ne(t){return De(t)&&t!==Te&&13!==t&&10!==t}function Me(t,e,r){var n=Ne(t),i=n&&!Ie(t);return(r?n:n&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||Ne(e)&&!Ie(e)&&35===t||58===e&&i}function Oe(t){return De(t)&&t!==Te&&!Ie(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function $e(t){return!Ie(t)&&58!==t}function Pe(t,e){var r,n=t.charCodeAt(e);return n>=55296&&n<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Be(t){return/^\n* /.test(t)}(0,n.K2)(_e,"State"),(0,n.K2)(Ae,"indentString"),(0,n.K2)(Re,"generateNextLine"),(0,n.K2)(Le,"testImplicitResolving"),(0,n.K2)(Ie,"isWhitespace"),(0,n.K2)(De,"isPrintable"),(0,n.K2)(Ne,"isNsCharOrWhitespace"),(0,n.K2)(Me,"isPlainSafe"),(0,n.K2)(Oe,"isPlainSafeFirst"),(0,n.K2)($e,"isPlainSafeLast"),(0,n.K2)(Pe,"codePointAt"),(0,n.K2)(Be,"needIndentIndicator");function Fe(t,e,r,n,i,a,o,s){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,f=-1,g=Oe(Pe(t,0))&&$e(Pe(t,t.length-1));if(e||o)for(l=0;l<t.length;c>=65536?l+=2:l++){if(!De(c=Pe(t,l)))return 5;g=g&&Me(c,h,s),h=c}else{for(l=0;l<t.length;c>=65536?l+=2:l++){if(10===(c=Pe(t,l)))u=!0,p&&(d=d||l-f-1>n&&" "!==t[f+1],f=l);else if(!De(c))return 5;g=g&&Me(c,h,s),h=c}d=d||p&&l-f-1>n&&" "!==t[f+1]}return u||d?r>9&&Be(t)?5:o?2===a?5:2:d?4:3:!g||o||i(t)?2===a?5:2:1}function ze(t,e,r,i,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==ke.indexOf(e)||Ce.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=i||t.flowLevel>-1&&r>=t.flowLevel;function c(e){return Le(t,e)}switch((0,n.K2)(c,"testAmbiguity"),Fe(e,l,t.indent,s,c,t.quotingType,t.forceQuotes&&!i,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Ke(e,t.indent)+je(Ae(e,o));case 4:return">"+Ke(e,t.indent)+je(Ae(qe(e,s),o));case 5:return'"'+Ue(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Ke(t,e){var r=Be(t)?String(e):"",n="\n"===t[t.length-1];return r+(n&&("\n"===t[t.length-2]||"\n"===t)?"+":n?"":"-")+"\n"}function je(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function qe(t,e){for(var r,n,i,a=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,We(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];i=a.exec(t);){var l=i[1],c=i[2];n=" "===c[0],o+=l+(s||n||""===c?"":"\n")+We(c,e),s=n}return o}function We(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,o=0,s=0,l="";r=i.exec(t);)(s=r.index)-a>e&&(n=o>a?o:s,l+="\n"+t.slice(a,n),a=n+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function Ue(t){for(var e,r="",n=0,i=0;i<t.length;n>=65536?i+=2:i++)n=Pe(t,i),!(e=we[n])&&De(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||Se(n);return r}function Ge(t,e,r){var n,i,a,o="",s=t.tag;for(n=0,i=r.length;n<i;n+=1)a=r[n],t.replacer&&(a=t.replacer.call(r,String(n),a)),(Ze(t,e,a,!1,!1)||void 0===a&&Ze(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=s,t.dump="["+o+"]"}function Ye(t,e,r,n){var i,a,o,s="",l=t.tag;for(i=0,a=r.length;i<a;i+=1)o=r[i],t.replacer&&(o=t.replacer.call(r,String(i),o)),(Ze(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Ze(t,e+1,null,!0,!0,!1,!0))&&(n&&""===s||(s+=Re(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=l,t.dump=s||"[]"}function Ve(t,e,r){var n,i,a,o,s,l="",c=t.tag,h=Object.keys(r);for(n=0,i=h.length;n<i;n+=1)s="",""!==l&&(s+=", "),t.condenseFlow&&(s+='"'),o=r[a=h[n]],t.replacer&&(o=t.replacer.call(r,a,o)),Ze(t,e,a,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function He(t,e,r,n){var i,a,o,s,l,c,h="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(i=0,a=d.length;i<a;i+=1)c="",n&&""===h||(c+=Re(t,e)),s=r[o=d[i]],t.replacer&&(s=t.replacer.call(r,o,s)),Ze(t,e+1,o,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Re(t,e)),Ze(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Xe(t,e,r){var n,i,a,o,s,l;for(a=0,o=(i=r?t.explicitTypes:t.implicitTypes).length;a<o;a+=1)if(((s=i[a]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag="?",s.represent){if(l=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===be.call(s.represent))n=s.represent(e,l);else{if(!xe.call(s.represent,l))throw new p("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');n=s.represent[l](e,l)}t.dump=n}return!0}return!1}function Ze(t,e,r,n,i,a,o){t.tag=null,t.dump=r,Xe(t,r,!1)||Xe(t,r,!0);var s,l=be.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(i=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)n&&0!==Object.keys(t.dump).length?(He(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ve(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)n&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ye(t,e-1,t.dump,i):Ye(t,e,t.dump,i),u&&(t.dump="&ref_"+h+t.dump)):(Ge(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ze(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Qe(t,e){var r,n,i=[],a=[];for(Je(t,i,a),r=0,n=a.length;r<n;r+=1)e.duplicates.push(i[a[r]]);e.usedDuplicates=new Array(n)}function Je(t,e,r){var n,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)Je(t[i],e,r);else for(i=0,a=(n=Object.keys(t)).length;i<a;i+=1)Je(t[n[i]],e,r)}function tr(t,e){var r=new _e(e=e||{});r.noRefs||Qe(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ze(r,0,n,!0,!0)?r.dump+"\n":""}(0,n.K2)(Fe,"chooseScalarStyle"),(0,n.K2)(ze,"writeScalar"),(0,n.K2)(Ke,"blockHeader"),(0,n.K2)(je,"dropEndingNewline"),(0,n.K2)(qe,"foldString"),(0,n.K2)(We,"foldLine"),(0,n.K2)(Ue,"escapeString"),(0,n.K2)(Ge,"writeFlowSequence"),(0,n.K2)(Ye,"writeBlockSequence"),(0,n.K2)(Ve,"writeFlowMapping"),(0,n.K2)(He,"writeBlockMapping"),(0,n.K2)(Xe,"detectType"),(0,n.K2)(Ze,"writeNode"),(0,n.K2)(Qe,"getDuplicateReferences"),(0,n.K2)(Je,"inspectNode"),(0,n.K2)(tr,"dump$1");function er(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}(0,n.K2)(er,"renamed");var rr=H,nr=ve.load;er("safeLoad","load"),er("safeLoadAll","loadAll"),er("safeDump","dump")},8320(t,e,r){"use strict";r.d(e,{diagram:()=>a});var n=r(4787),i=(r(2501),r(8343),r(9625),r(4345),r(3848),r(6615),r(1334),r(2654),r(5105),r(8013),r(1240),r(8221),r(1123),r(797)),a={parser:n._$,get db(){return new n.NM},renderer:n.Lh,styles:n.tM,init:(0,i.K2)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},2438(t,e,r){"use strict";r.d(e,{diagram:()=>a});var n=r(4787),i=(r(2501),r(8343),r(9625),r(4345),r(3848),r(6615),r(1334),r(2654),r(5105),r(8013),r(1240),r(8221),r(1123),r(797)),a={parser:n._$,get db(){return new n.NM},renderer:n.Lh,styles:n.tM,init:(0,i.K2)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},7928(t,e,r){"use strict";r.r(e),r.d(e,{render:()=>f});var n=r(797),i=r(165),a=r(3457),o=r(1444);function s(t,e){t.forEach(t=>{const r={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(r[e]=t[e])}),e.add({group:"nodes",data:r,position:{x:t.x??0,y:t.y??0}})})}function l(t,e){t.forEach(t=>{const r={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(r[e]=t[e])}),e.add({group:"edges",data:r})})}function c(t){return new Promise(e=>{const r=(0,o.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),a=(0,i.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),s(t.nodes,a),l(t.edges,a),a.nodes().forEach(function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}});a.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),a.ready(t=>{n.Rm.info("Cytoscape ready",t),e(a)})})}function h(t){return t.nodes().map(t=>{const e=t.data(),r=t.position(),n={id:e.id,x:r.x,y:r.y};return Object.keys(e).forEach(t=>{"id"!==t&&(n[t]=e[t])}),n})}function u(t){return t.edges().map(t=>{const e=t.data(),r=t._private.rscratch,n={id:e.id,source:e.source,target:e.target,startX:r.startX,startY:r.startY,midX:r.midX,midY:r.midY,endX:r.endX,endY:r.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(n[t]=e[t])}),n})}async function d(t,e){n.Rm.debug("Starting cose-bilkent layout algorithm");try{p(t);const e=await c(t),r=h(e),i=u(e);return n.Rm.debug(`Layout completed: ${r.length} nodes, ${i.length} edges`),{nodes:r,edges:i}}catch(r){throw n.Rm.error("Error in cose-bilkent layout algorithm:",r),r}}function p(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}i.A.use(a),(0,n.K2)(s,"addNodes"),(0,n.K2)(l,"addEdges"),(0,n.K2)(c,"createCytoscapeInstance"),(0,n.K2)(h,"extractPositionedNodes"),(0,n.K2)(u,"extractPositionedEdges"),(0,n.K2)(d,"executeCoseBilkentLayout"),(0,n.K2)(p,"validateLayoutData");var f=(0,n.K2)(async(t,e,{insertCluster:r,insertEdge:n,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:l},{algorithm:c})=>{const h={},u={},p=e.select("g");a(p,t.markers,t.type,t.diagramId);const f=p.insert("g").attr("class","subgraphs"),g=p.insert("g").attr("class","edgePaths"),m=p.insert("g").attr("class","edgeLabels"),y=p.insert("g").attr("class","nodes");s.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){const t={...e};u[e.id]=t,h[e.id]=t,await r(f,e)}else{const r={...e};h[e.id]=r;const n=await o(y,e,{config:t.config,dir:t.direction||"TB"}),i=n.node().getBBox();r.width=i.width,r.height=i.height,r.domId=n,s.debug(`Node ${e.id} dimensions: ${i.width}x${i.height}`)}})),s.debug("Running cose-bilkent layout algorithm");const v={...t,nodes:t.nodes.map(t=>{const e=h[t.id];return{...t,width:e.width,height:e.height}})},b=await d(v,t.config);s.debug("Positioning nodes based on layout results"),b.nodes.forEach(t=>{const e=h[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,s.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),b.edges.forEach(e=>{const r=t.edges.find(t=>t.id===e.id);r&&(r.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),s.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await i(m,e);const r=h[e.start??""],a=h[e.end??""];if(r&&a){const i=b.edges.find(t=>t.id===e.id);if(i){s.debug("APA01 positionedEdge",i);const o={...e},c=n(g,o,u,t.type,r,a,t.diagramId);l(o,c)}else{const i={...e,points:[{x:r.x||0,y:r.y||0},{x:a.x||0,y:a.y||0}]},o=n(g,i,u,t.type,r,a,t.diagramId);l(i,o)}}})),s.debug("Cose-bilkent rendering completed")},"render")},1708(t,e,r){"use strict";r.r(e),r.d(e,{render:()=>N});var n=r(6615),i=(r(1334),r(2654)),a=r(5105),o=(r(8013),r(1240),r(8221),r(1123)),s=r(797),l=r(5422),c=r(9592),h=r(970);const u=function(t){return(0,h.A)(t,4)};var d=r(4722);r(2857);function p(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:f(t),edges:g(t)};return c.A(t.graph())||(e.value=u(t.graph())),e}function f(t){return d.A(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return c.A(r)||(i.value=r),c.A(n)||(i.parent=n),i})}function g(t){return d.A(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return c.A(e.name)||(n.name=e.name),c.A(r)||(n.value=r),n})}var m=r(697),y=new Map,v=new Map,b=new Map,x=(0,s.K2)(()=>{v.clear(),b.clear(),y.clear()},"clear"),T=(0,s.K2)((t,e)=>{const r=v.get(e)||[];return s.Rm.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),w=(0,s.K2)((t,e)=>{const r=v.get(e)||[];return s.Rm.info("Descendants of ",e," is ",r),s.Rm.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||T(t.v,e)||T(t.w,e)||r.includes(t.w):(s.Rm.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),k=(0,s.K2)((t,e,r,n)=>{s.Rm.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const i=e.children(t)||[];t!==n&&i.push(t),s.Rm.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(i=>{if(e.children(i).length>0)k(i,e,r,n);else{const a=e.node(i);s.Rm.info("cp ",i," to ",n," with parent ",t),r.setNode(i,a),n!==e.parent(i)&&(s.Rm.warn("Setting parent",i,e.parent(i)),r.setParent(i,e.parent(i))),t!==n&&i!==t?(s.Rm.debug("Setting parent",i,t),r.setParent(i,t)):(s.Rm.info("In copy ",t,"root",n,"data",e.node(t),n),s.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",t!==n,"node!==clusterId",i!==t));const o=e.edges(i);s.Rm.debug("Copying Edges",o),o.forEach(i=>{s.Rm.info("Edge",i);const a=e.edge(i.v,i.w,i.name);s.Rm.info("Edge data",a,n);try{w(i,n)?(s.Rm.info("Copying as ",i.v,i.w,a,i.name),r.setEdge(i.v,i.w,a,i.name),s.Rm.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):s.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",n," clusterId:",t)}catch(o){s.Rm.error(o)}})}s.Rm.debug("Removing node",i),e.removeNode(i)})},"copy"),C=(0,s.K2)((t,e)=>{const r=e.children(t);let n=[...r];for(const i of r)b.set(i,t),n=[...n,...C(i,e)];return n},"extractDescendants"),E=(0,s.K2)((t,e,r)=>{const n=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===r||t.w===r),a=n.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),o=i.map(t=>({v:t.v,w:t.w}));return a.filter(t=>o.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),S=(0,s.K2)((t,e,r)=>{const n=e.children(t);if(s.Rm.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(const a of n){const t=S(a,e,r),n=E(e,r,t);if(t){if(!(n.length>0))return t;i=t}}return i},"findNonClusterChild"),_=(0,s.K2)(t=>y.has(t)&&y.get(t).externalConnections&&y.has(t)?y.get(t).id:t,"getAnchorId"),A=(0,s.K2)((t,e)=>{if(!t||e>10)s.Rm.debug("Opting out, no graph ");else{s.Rm.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(s.Rm.warn("Cluster identified",e," Replacement id in edges: ",S(e,t,e)),v.set(e,C(e,t)),y.set(e,{id:S(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){const r=t.children(e),n=t.edges();r.length>0?(s.Rm.debug("Cluster identified",e,v),n.forEach(t=>{T(t.v,e)^T(t.w,e)&&(s.Rm.warn("Edge: ",t," leaves cluster ",e),s.Rm.warn("Descendants of XXX ",e,": ",v.get(e)),y.get(e).externalConnections=!0)})):s.Rm.debug("Not a cluster ",e,v)});for(let e of y.keys()){const r=y.get(e).id,n=t.parent(r);n!==e&&y.has(n)&&!y.get(n).externalConnections&&(y.get(e).id=n)}t.edges().forEach(function(e){const r=t.edge(e);s.Rm.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),s.Rm.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let n=e.v,i=e.w;if(s.Rm.warn("Fix XXX",y,"ids:",e.v,e.w,"Translating: ",y.get(e.v)," --- ",y.get(e.w)),y.get(e.v)||y.get(e.w)){if(s.Rm.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),n=_(e.v),i=_(e.w),t.removeEdge(e.v,e.w,e.name),n!==e.v){const i=t.parent(n);y.get(i).externalConnections=!0,r.fromCluster=e.v}if(i!==e.w){const n=t.parent(i);y.get(n).externalConnections=!0,r.toCluster=e.w}s.Rm.warn("Fix Replacing with XXX",n,i,e.name),t.setEdge(n,i,r,e.name)}}),s.Rm.warn("Adjusted Graph",p(t)),R(t,0),s.Rm.trace(y)}},"adjustClustersAndEdges"),R=(0,s.K2)((t,e)=>{if(s.Rm.warn("extractor - ",e,p(t),t.children("D")),e>10)return void s.Rm.error("Bailing out");let r=t.nodes(),n=!1;for(const i of r){const e=t.children(i);n=n||e.length>0}if(n){s.Rm.debug("Nodes = ",r,e);for(const n of r)if(s.Rm.debug("Extracting node",n,y,y.has(n)&&!y.get(n).externalConnections,!t.parent(n),t.node(n),t.children("D")," Depth ",e),y.has(n))if(!y.get(n).externalConnections&&t.children(n)&&t.children(n).length>0){s.Rm.warn("Cluster without external connections, without a parent and with children",n,e);let r="TB"===t.graph().rankdir?"LR":"TB";y.get(n)?.clusterData?.dir&&(r=y.get(n).clusterData.dir,s.Rm.warn("Fixing dir",y.get(n).clusterData.dir,r));const i=new m.T({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});s.Rm.warn("Old graph before copy",p(t)),k(n,t,i,n),t.setNode(n,{clusterNode:!0,id:n,clusterData:y.get(n).clusterData,label:y.get(n).label,graph:i}),s.Rm.warn("New graph after copy node: (",n,")",p(i)),s.Rm.debug("Old graph after copy",p(t))}else s.Rm.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!y.get(n).externalConnections," no parent: ",!t.parent(n)," children ",t.children(n)&&t.children(n).length>0,t.children("D"),e),s.Rm.debug(y);else s.Rm.debug("Not a cluster",n,e);r=t.nodes(),s.Rm.warn("New list of nodes",r);for(const n of r){const r=t.node(n);s.Rm.warn(" Now next level",n,r),r?.clusterNode&&R(r.graph,e+1)}}else s.Rm.debug("Done, no node has children",t.nodes())},"extractor"),L=(0,s.K2)((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{const n=t.children(e),i=L(t,n);r=[...r,...i]}),r},"sorter"),I=(0,s.K2)(t=>L(t,t.children()),"sortNodesByHierarchy"),D=(0,s.K2)(async(t,e,r,o,c,h)=>{s.Rm.warn("Graph in recursive render:XAX",p(e),c);const u=e.graph().rankdir;s.Rm.trace("Dir in recursive render - dir:",u);const d=t.insert("g").attr("class","root");e.nodes()?s.Rm.info("Recursive render XXX",e.nodes()):s.Rm.info("No nodes found for",e),e.edges().length>0&&s.Rm.info("Recursive edges",e.edge(e.edges()[0]));const f=d.insert("g").attr("class","clusters"),g=d.insert("g").attr("class","edgePaths"),m=d.insert("g").attr("class","edgeLabels"),v=d.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(t){const n=e.node(t);if(void 0!==c){const r=JSON.parse(JSON.stringify(c.clusterData));s.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",t,"\n data=",r.height,"\nParent cluster",c.height),e.setNode(c.id,r),e.parent(t)||(s.Rm.trace("Setting parent",t,c.id),e.setParent(t,c.id,r))}if(s.Rm.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),n?.clusterNode){s.Rm.info("Cluster identified XBX",t,n.width,e.node(t));const{ranksep:a,nodesep:l}=e.graph();n.graph.setGraph({...n.graph.graph(),ranksep:a+25,nodesep:l});const c=await D(v,n.graph,r,o,e.node(t),h),u=c.elem;(0,i.lC)(n,u),n.diff=c.diff||0,s.Rm.info("New compound node after recursive render XAX",t,"width",n.width,"height",n.height),(0,i.U7)(u,n)}else e.children(t).length>0?(s.Rm.trace("Cluster - the non recursive path XBX",t,n.id,n,n.width,"Graph:",e),s.Rm.trace(S(n.id,e)),y.set(n.id,{id:S(n.id,e),node:n})):(s.Rm.trace("Node - the non recursive path XAX",t,v,e.node(t),u),await(0,i.on)(v,e.node(t),{config:h,dir:u}))}));const b=(0,s.K2)(async()=>{const t=e.edges().map(async function(t){const r=e.edge(t.v,t.w,t.name);s.Rm.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),s.Rm.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),s.Rm.info("Fix",y,"ids:",t.v,t.w,"Translating: ",y.get(t.v),y.get(t.w)),await(0,n.jP)(m,r)});await Promise.all(t)},"processEdges");await b(),s.Rm.info("Graph before layout:",JSON.stringify(p(e))),s.Rm.info("############################################# XXX"),s.Rm.info("### Layout ### XXX"),s.Rm.info("############################################# XXX"),(0,l.Zp)(e),s.Rm.info("Graph after layout:",JSON.stringify(p(e)));let x=0,{subGraphTitleTotalMargin:T}=(0,a.O)(h);return await Promise.all(I(e).map(async function(t){const r=e.node(t);if(s.Rm.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode)r.y+=T,s.Rm.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,e.parent(t)),y.get(r.id).node=r,(0,i.U_)(r);else if(e.children(t).length>0){s.Rm.info("A pure cluster node XBX1",t,r.id,r.x,r.y,r.width,r.height,e.parent(t)),r.height+=T,e.node(r.parentId);const n=r?.padding/2||0,a=r?.labelBBox?.height||0,o=a-n||0;s.Rm.debug("OffsetY",o,"labelHeight",a,"halfPadding",n),await(0,i.U)(f,r),y.get(r.id).node=r}else{const t=e.node(r.parentId);r.y+=T/2,s.Rm.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",t,t?.offsetY,r),(0,i.U_)(r)}})),e.edges().forEach(function(t){const i=e.edge(t);s.Rm.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i),i),i.points.forEach(t=>t.y+=T/2);const a=e.node(t.v);var l=e.node(t.w);const c=(0,n.Jo)(g,i,y,r,a,l,o);(0,n.T_)(i,c)}),e.nodes().forEach(function(t){const r=e.node(t);s.Rm.info(t,r.type,r.diff),r.isGroup&&(x=r.diff)}),s.Rm.warn("Returning from recursive render XAX",d,x),{elem:d,diff:x}},"recursiveRender"),N=(0,s.K2)(async(t,e)=>{const r=new m.T({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=e.select("g");(0,n.g0)(a,t.markers,t.type,t.diagramId),(0,i.gh)(),(0,n.IU)(),(0,i.IU)(),x(),t.nodes.forEach(t=>{r.setNode(t.id,{...t}),t.parentId&&r.setParent(t.id,t.parentId)}),s.Rm.debug("Edges:",t.edges),t.edges.forEach(t=>{if(t.start===t.end){const e=t.start,n=e+"---"+e+"---1",i=e+"---"+e+"---2",a=r.node(e);r.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(n,a.parentId),r.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(i,a.parentId);const o=structuredClone(t),s=structuredClone(t),l=structuredClone(t);o.label="",o.arrowTypeEnd="none",o.endLabelLeft="",o.endLabelRight="",o.startLabelLeft="",o.id=e+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-mid",l.label="",l.startLabelRight="",l.startLabelLeft="",l.arrowTypeStart="none",a.isGroup&&(o.fromCluster=e,l.toCluster=e),l.id=e+"-cyclic-special-2",l.arrowTypeStart="none",r.setEdge(e,n,o,e+"-cyclic-special-0"),r.setEdge(n,i,s,e+"-cyclic-special-1"),r.setEdge(i,e,l,e+"-cyc<lic-special-2")}else r.setEdge(t.start,t.end,{...t},t.id)}),s.Rm.warn("Graph at first:",JSON.stringify(p(r))),A(r),s.Rm.warn("Graph after XAX:",JSON.stringify(p(r)));const l=(0,o.D7)();await D(a,r,t.type,t.diagramId,void 0,l)},"render")},6678(t,e,r){"use strict";r.d(e,{diagram:()=>M});var n=r(594),i=r(5871),a=r(8221),o=r(1123),s=r(797),l=r(8731),c={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},h={axes:[],curves:[],options:c},u=structuredClone(h),d=o.UI.radar,p=(0,s.K2)(()=>(0,a.$t)({...d,...(0,o.zj)().radar}),"getConfig"),f=(0,s.K2)(()=>u.axes,"getAxes"),g=(0,s.K2)(()=>u.curves,"getCurves"),m=(0,s.K2)(()=>u.options,"getOptions"),y=(0,s.K2)(t=>{u.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),v=(0,s.K2)(t=>{u.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:b(t.entries)}))},"setCurves"),b=(0,s.K2)(t=>{if(null==t[0].axis)return t.map(t=>t.value);const e=f();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(e=>{const r=t.find(t=>t.axis?.$refText===e.name);if(void 0===r)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),x={getAxes:f,getCurves:g,getOptions:m,setAxes:y,setCurves:v,setOptions:(0,s.K2)(t=>{const e=t.reduce((t,e)=>(t[e.name]=e,t),{});u.options={showLegend:e.showLegend?.value??c.showLegend,ticks:e.ticks?.value??c.ticks,max:e.max?.value??c.max,min:e.min?.value??c.min,graticule:e.graticule?.value??c.graticule}},"setOptions"),getConfig:p,clear:(0,s.K2)(()=>{(0,o.IU)(),u=structuredClone(h)},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI},T=(0,s.K2)(t=>{(0,i.S)(t,x);const{axes:e,curves:r,options:n}=t;x.setAxes(e),x.setCurves(r),x.setOptions(n)},"populate"),w={parse:(0,s.K2)(async t=>{const e=await(0,l.qg)("radar",t);s.Rm.debug(e),T(e)},"parse")},k=(0,s.K2)((t,e,r,i)=>{const a=i.db,o=a.getAxes(),s=a.getCurves(),l=a.getOptions(),c=a.getConfig(),h=a.getDiagramTitle(),u=(0,n.D)(e),d=C(u,c),p=l.max??Math.max(...s.map(t=>Math.max(...t.entries))),f=l.min,g=Math.min(c.width,c.height)/2;E(d,o,g,l.ticks,l.graticule),S(d,o,g,c),_(d,o,s,f,p,l.graticule,c),L(d,s,l.showLegend,c),d.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),C=(0,s.K2)((t,e)=>{const r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i=e.marginLeft+e.width/2,a=e.marginTop+e.height/2;return(0,o.a$)(t,n,r,e.useMaxWidth??!0),t.attr("viewBox",`0 0 ${r} ${n}`),t.append("g").attr("transform",`translate(${i}, ${a})`)},"drawFrame"),E=(0,s.K2)((t,e,r,n,i)=>{if("circle"===i)for(let a=0;a<n;a++){const e=r*(a+1)/n;t.append("circle").attr("r",e).attr("class","radarGraticule")}else if("polygon"===i){const i=e.length;for(let a=0;a<n;a++){const o=r*(a+1)/n,s=e.map((t,e)=>{const r=2*e*Math.PI/i-Math.PI/2;return`${o*Math.cos(r)},${o*Math.sin(r)}`}).join(" ");t.append("polygon").attr("points",s).attr("class","radarGraticule")}}},"drawGraticule"),S=(0,s.K2)((t,e,r,n)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a].label,s=2*a*Math.PI/i-Math.PI/2;t.append("line").attr("x1",0).attr("y1",0).attr("x2",r*n.axisScaleFactor*Math.cos(s)).attr("y2",r*n.axisScaleFactor*Math.sin(s)).attr("class","radarAxisLine"),t.append("text").text(o).attr("x",r*n.axisLabelFactor*Math.cos(s)).attr("y",r*n.axisLabelFactor*Math.sin(s)).attr("class","radarAxisLabel")}},"drawAxes");function _(t,e,r,n,i,a,o){const s=e.length,l=Math.min(o.width,o.height)/2;r.forEach((e,r)=>{if(e.entries.length!==s)return;const c=e.entries.map((t,e)=>{const r=2*Math.PI*e/s-Math.PI/2,a=A(t,n,i,l);return{x:a*Math.cos(r),y:a*Math.sin(r)}});"circle"===a?t.append("path").attr("d",R(c,o.curveTension)).attr("class",`radarCurve-${r}`):"polygon"===a&&t.append("polygon").attr("points",c.map(t=>`${t.x},${t.y}`).join(" ")).attr("class",`radarCurve-${r}`)})}function A(t,e,r,n){return n*(Math.min(Math.max(t,e),r)-e)/(r-e)}function R(t,e){const r=t.length;let n=`M${t[0].x},${t[0].y}`;for(let i=0;i<r;i++){const a=t[(i-1+r)%r],o=t[i],s=t[(i+1)%r],l=t[(i+2)%r],c={x:o.x+(s.x-a.x)*e,y:o.y+(s.y-a.y)*e},h={x:s.x-(l.x-o.x)*e,y:s.y-(l.y-o.y)*e};n+=` C${c.x},${c.y} ${h.x},${h.y} ${s.x},${s.y}`}return`${n} Z`}function L(t,e,r,n){if(!r)return;const i=3*(n.width/2+n.marginRight)/4,a=3*-(n.height/2+n.marginTop)/4;e.forEach((e,r)=>{const n=t.append("g").attr("transform",`translate(${i}, ${a+20*r})`);n.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${r}`),n.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}(0,s.K2)(_,"drawCurves"),(0,s.K2)(A,"relativeRadius"),(0,s.K2)(R,"closedRoundCurve"),(0,s.K2)(L,"drawLegend");var I={draw:k},D=(0,s.K2)((t,e)=>{let r="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const i=t[`cScale${n}`];r+=`\n\t\t.radarCurve-${n} {\n\t\t\tcolor: ${i};\n\t\t\tfill: ${i};\n\t\t\tfill-opacity: ${e.curveOpacity};\n\t\t\tstroke: ${i};\n\t\t\tstroke-width: ${e.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${n} {\n\t\t\tfill: ${i};\n\t\t\tfill-opacity: ${e.curveOpacity};\n\t\t\tstroke: ${i};\n\t\t}\n\t\t`}return r},"genIndexStyles"),N=(0,s.K2)(t=>{const e=(0,o.P$)(),r=(0,o.zj)(),n=(0,a.$t)(e,r.themeVariables);return{themeVariables:n,radarOptions:(0,a.$t)(n.radar,t)}},"buildRadarStyleOptions"),M={parser:w,db:x,renderer:I,styles:(0,s.K2)(({radar:t}={})=>{const{themeVariables:e,radarOptions:r}=N(t);return`\n\t.radarTitle {\n\t\tfont-size: ${e.fontSize};\n\t\tcolor: ${e.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${r.axisColor};\n\t\tstroke-width: ${r.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${r.axisLabelFontSize}px;\n\t\tcolor: ${r.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${r.graticuleColor};\n\t\tfill-opacity: ${r.graticuleOpacity};\n\t\tstroke: ${r.graticuleColor};\n\t\tstroke-width: ${r.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${r.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${D(e,r)}\n\t`},"styles")}},3088(t,e,r){"use strict";r.d(e,{diagram:()=>k});var n=r(594),i=r(5871),a=r(2938),o=r(8221),s=r(1123),l=r(797),c=r(8731),h=new a.m(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),u=(0,l.K2)(()=>{h.reset(),(0,s.IU)()},"clear"),d=(0,l.K2)(()=>h.records.stack[0],"getRoot"),p=(0,l.K2)(()=>h.records.cnt,"getCount"),f=s.UI.treeView,g=(0,l.K2)(()=>(0,o.$t)(f,(0,s.zj)().treeView),"getConfig"),m={clear:u,addNode:(0,l.K2)((t,e)=>{for(;t<=h.records.stack[h.records.stack.length-1].level;)h.records.stack.pop();const r={id:h.records.cnt++,level:t,name:e,children:[]};h.records.stack[h.records.stack.length-1].children.push(r),h.records.stack.push(r)},"addNode"),getRoot:d,getCount:p,getConfig:g,getAccTitle:s.iN,getAccDescription:s.m7,getDiagramTitle:s.ab,setAccDescription:s.EI,setAccTitle:s.SV,setDiagramTitle:s.ke},y=(0,l.K2)(t=>{(0,i.S)(t,m),t.nodes.map(t=>m.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),v={parse:(0,l.K2)(async t=>{const e=await(0,c.qg)("treeView",t);l.Rm.debug(e),y(e)},"parse")},b=(0,l.K2)((t,e,r,n,i)=>{const a=n.append("text").text(r.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:o,width:s}=a.node().getBBox(),l=o+2*i.paddingY,c=s+2*i.paddingX;a.attr("x",t+i.paddingX),a.attr("y",e+l/2),r.BBox={x:t,y:e,width:c,height:l}},"positionLabel"),x=(0,l.K2)((t,e,r,n,i,a)=>t.append("line").attr("x1",e).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),T=(0,l.K2)((t,e,r)=>{let n=0,i=0;const a=(0,l.K2)((t,e,r,a)=>{const o=a*(r.rowIndent+r.paddingX);b(o,n,e,t,r);const{height:s,width:l}=e.BBox;x(t,o-r.rowIndent,n+s/2,o,n+s/2,r.lineThickness),i=Math.max(i,o+l),n+=s},"drawNode"),o=(0,l.K2)((e,n=0)=>{a(t,e,r,n),e.children.forEach(t=>{o(t,n+1)});const{x:i,y:s,height:l}=e.BBox;if(e.children.length){const{y:n,height:a}=e.children[e.children.length-1].BBox;x(t,i+r.paddingX,s+l,i+r.paddingX,n+a/2+r.lineThickness/2,r.lineThickness)}},"processNode");return o(e),{totalHeight:n,totalWidth:i}},"drawTree"),w={labelFontSize:"16px",labelColor:"black",lineColor:"black"},k={db:m,renderer:{draw:(0,l.K2)((t,e,r,i)=>{l.Rm.debug("Rendering treeView diagram\n"+t);const a=i.db,o=a.getRoot(),c=a.getConfig(),h=(0,n.D)(e),u=h.append("g");u.attr("class","tree-view");const{totalHeight:d,totalWidth:p}=T(u,o,c);h.attr("viewBox",`-${c.lineThickness/2} 0 ${p} ${d}`),(0,s.a$)(h,d,p,c.useMaxWidth)},"draw")},parser:v,styles:(0,l.K2)(({treeView:t})=>{const{labelFontSize:e,labelColor:r,lineColor:n}=(0,o.$t)(w,t);return`\n .treeView-node-label {\n font-size: ${e};\n fill: ${r};\n }\n .treeView-node-line {\n stroke: ${n};\n }\n `},"styles")}},1844(t,e,r){"use strict";r.d(e,{diagram:()=>rt});var n=r(5871),i=r(8221),a=r(1123),o=r(797),s=r(8731),l=r(1444),c="position frame",h="frame positioned",u="position relation",d="relation positioned",p=(0,o.K2)(function(t){o.Rm.debug("options str",t)},"setOptions"),f=(0,o.K2)(function(){return{}},"getOptions"),g=(0,o.K2)(function(){m(),(0,a.IU)()},"clear");function m(){b={}}(0,o.K2)(m,"reset");var y=a.UI.eventmodeling,v=(0,o.K2)(()=>(0,i.$t)({...y,...(0,a.zj)().eventmodeling}),"getConfig"),b={};function x(){let t=C;const{ast:e}=b,r=k();if(!e)throw new Error("No data for EventModel");return e.frames.forEach((n,i)=>{const a=I(n,e.dataEntities,r);let s;t=Y(t,{$kind:c,index:i,frame:n,textProps:a}),B(n)?(o.Rm.debug("source frame",n.sourceFrames),s=e.frames.filter(t=>n.sourceFrames.some(e=>e.$refText===t.name)),s.forEach(e=>{t=Y(t,{$kind:u,index:i,frame:n,sourceFrame:e})})):t=Y(t,{$kind:u,index:i,frame:n})}),t={...t,sortedSwimlanesArray:O(t.swimlanes)},t}function T(t){b.ast=t}(0,o.K2)(x,"getState"),(0,o.K2)(T,"setAst");var w={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function k(){return w}(0,o.K2)(k,"getDiagramProps");var C={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function E(t){const e=t.split(".");if(2===e.length)return e[0]}function S(t){const e=t.split(".");return 2===e.length?e[1]:t}function _(t,e){if(e&&0!==e.length)return Object.values(t).find(t=>t.namespace===e)}function A(t,e,r){return Math.max(e,...Object.keys(t).filter(t=>{const n=Number.parseInt(t);return n>e&&n<r}).map(t=>Number.parseInt(t)))+1}function R(t,e){const r=E(t.entityIdentifier),n=_(e,r);switch(t.modelEntityType){case"ui":case"pcr":case"processor":return n?{index:n.index,label:n.namespace||w.labelUiAutomation}:r?{index:A(e,0,100),label:w.labelUiAutomationPrefix+r}:{index:0,label:w.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return n?{index:n.index,label:n.namespace||w.labelCommandReadModel}:r?{index:A(e,100,200),label:w.labelCommandReadModelPrefix+r}:{index:100,label:w.labelCommandReadModel};default:return n?{index:n.index,label:n.namespace||w.labelEvents}:r?{index:A(e,200,300),label:w.labelEventsPrefix+r}:{index:200,label:w.labelEvents}}}function L(t){const{themeVariables:e}=(0,a.zj)();switch(t.modelEntityType){case"ui":return{fill:e.emUiFill??"white",stroke:e.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:e.emProcessorFill??"#edb3f6",stroke:e.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:e.emReadModelFill??"#d3f1a2",stroke:e.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:e.emCommandFill??"#bcd6fe",stroke:e.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:e.emEventFill??"#ffb778",stroke:e.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function I(t,e,r){const n=(0,a.zj)(),s=(0,a.jZ)(S(t.entityIdentifier)??"",n);let l;const c={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let h=`<b>${(0,i.bH)(s,r.textMaxWidth,c)}</b>`;if(t.dataInlineValue&&(l=t.dataInlineValue,l=l.substring(l.indexOf("{")+1),l=l.substring(0,l.lastIndexOf("}")-1),l=(0,a.jZ)(l,n),l=(0,i.bH)(l,r.textMaxWidth,c),l=l.replaceAll(" "," ")),t.dataReference){const o=e.find(e=>e.name===t.dataReference?.$refText);o&&(l=o.dataBlockValue,l=l.substring(l.indexOf("{\n")+2),l=l.substring(0,l.lastIndexOf("}")-1),l=(0,a.jZ)(l,n),l=(0,i.bH)(l,r.textMaxWidth,c),l=l.replaceAll(" "," "),l+="<br/>")}const u=void 0!==l;u&&(h+=`<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${l}</code>`);const d={fontSize:c.fontSize,fontWeight:c.fontWeight,fontFamily:c.fontFamily},p=(0,i.PX)(h,d),f={content:h,width:u?p.width/3:p.width,height:p.height};return o.Rm.debug(`[${t.name}] ${t.entityIdentifier} text`,f),f}function D(t,e){const r=e,n=L(r.frame),i={width:r.textProps.width+2*w.boxTextPadding,height:r.textProps.height+2*w.boxTextPadding};return[{$kind:h,frame:r.frame,index:r.index,visual:n,dimension:i,textProps:r.textProps}]}function N(t,e,r){return void 0===e?w.contentStartX:e.index===t.index&&t.r?t.r+w.boxPadding:void 0===r?w.contentStartX:r.r-w.boxOverlap+w.boxPadding}function M(t,e){const r=[...t.map(t=>t.r),e];return Math.max(...r)}function O(t){return Object.values(t).sort((t,e)=>t.index-e.index)}function $(t,e){const r=e,n=R(r.frame,t.swimlanes);let i;i=n.index in t.swimlanes?t.swimlanes[n.index]:{index:n.index,label:n.label,r:0,y:n.index*w.swimlaneMinHeight+w.swimlaneGap,height:w.swimlaneMinHeight,maxHeight:w.swimlaneMinHeight};const a=t.boxes.length>0?t.boxes[t.boxes.length-1]:void 0,o=void 0!==t.previousSwimlaneNumber?t.swimlanes[t.previousSwimlaneNumber]:void 0,s={width:Math.max(w.boxMinWidth,Math.min(w.boxMaxWidth,r.dimension.width))+2*w.boxPadding,height:Math.max(w.boxMinHeight,Math.min(w.boxMaxHeight,r.dimension.height))+2*w.boxPadding},l=N(i,o,a),c=l+s.width+w.boxPadding,h=M(Object.values(t.swimlanes),c);i.r=l+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(w.swimlaneMinHeight,i.maxHeight)+2*w.swimlanePadding;const u={x:l,y:w.swimlanePadding+i.y,r:c,dimension:s,leftSibling:!1,swimlane:i,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index},d={...t,boxes:[...t.boxes,u],swimlanes:{...t.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:n.index,previousFrame:r.frame,maxR:h},p=O(d.swimlanes);p.length>0&&(p[0].y=0);for(let f=1;f<p.length;f++){const t=p[f],e=p[f-1];t.y=e.y+e.height+w.swimlaneGap}return d}function P(t,e){return 0===t&&0===e.sourceFrames.length}function B(t){return void 0!==t.sourceFrames&&null!==t.sourceFrames&&t.sourceFrames.length>0}function F(t,e){if(null!=e)return t.find(t=>t.frame.name===e.name)}function z(t,e,r){if(!(r<0))for(let n=r;n>=0;n--){const r=t[n];if(r.swimlane.index!==e)return r}}function K(t,e){const r=e;if((0,s.F5)(r.frame)||P(r.index,r.frame))return[];const n=F(t.boxes,r.frame);if(void 0===n)throw new Error(`Target box not found for frame ${r.frame.name}`);let i;if(i=r.sourceFrame?F(t.boxes,r.sourceFrame):z(t.boxes,n.swimlane.index,r.index-1),void 0===i)return[];return[{$kind:d,frame:r.frame,index:r.index,sourceBox:i,targetBox:n}]}function j(t,e){const r=e,n={visual:{fill:"none",stroke:"#000"},source:{x:r.sourceBox.x,y:r.sourceBox.y},target:{x:r.targetBox.x,y:r.targetBox.y},sourceBox:r.sourceBox,targetBox:r.targetBox};return{...t,relations:[...t.relations,n]}}(0,o.K2)(E,"extractNamespace"),(0,o.K2)(S,"extractName"),(0,o.K2)(_,"findSwimlaneByNamespace"),(0,o.K2)(A,"findNextAvailableIndex"),(0,o.K2)(R,"calculateSwimlaneProps"),(0,o.K2)(L,"calculateEntityVisualProps"),(0,o.K2)(I,"calculateTextProps"),(0,o.K2)(D,"decidePositionFrame"),(0,o.K2)(N,"calculateX"),(0,o.K2)(M,"calculateMaxRight"),(0,o.K2)(O,"sortedSwimlanesArray"),(0,o.K2)($,"evolveFramePositioned"),(0,o.K2)(P,"isFirstFrame"),(0,o.K2)(B,"hasSourceFrame"),(0,o.K2)(F,"findBoxByFrame"),(0,o.K2)(z,"findBoxByLineIndex"),(0,o.K2)(K,"decidePositionRelation"),(0,o.K2)(j,"evolveRelationPositioned");var q={[c]:D,[u]:K},W={[h]:$,[d]:j};function U(t,e){const r=q[e.$kind];if(null==r)return[];const n=r(t,e);return o.Rm.debug("decided events",n),n}function G(t,e){const r=e.reduce((t,e)=>{const r=W[e.$kind];return null==r?t:r(t,e)},t);return o.Rm.debug("evolve events",{state:t,newState:r,events:e}),r}function Y(t,e){return G(t,U(t,e))}(0,o.K2)(U,"decide"),(0,o.K2)(G,"evolve"),(0,o.K2)(Y,"dispatch");var V={getConfig:v,setOptions:p,getOptions:f,clear:g,setAccTitle:a.SV,getAccTitle:a.iN,getAccDescription:a.m7,setAccDescription:a.EI,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setAst:T,getDiagramProps:k,getState:x},H={parse:(0,o.K2)(async t=>{const e=await(0,s.qg)("eventmodeling",t);o.Rm.debug(e),V.setAst(e),(0,n.S)(e,V)},"parse")};var X=(0,a.D7)(),Z=X?.eventmodeling;function Q(t,e){return r=>{const n=r.swimlane.y+e.swimlanePadding,i=t.append("g").attr("class","em-box");i.append("rect").attr("x",r.x).attr("y",n).attr("rx","3").attr("width",r.dimension.width).attr("height",r.dimension.height).attr("stroke",r.visual.stroke).attr("fill",r.visual.fill);i.append("foreignObject").attr("x",r.x+e.boxPadding).attr("y",n+10).attr("width",r.dimension.width-2*e.boxPadding).attr("height",r.dimension.height-2*e.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(r.text)}}function J(t,e){return t>e}function tt(t,e,r,n){return i=>{const a=i.sourceBox.swimlane.y+e.swimlanePadding,s=i.targetBox.swimlane.y+e.swimlanePadding,l=J(a,s),c=i.sourceBox.x+2*i.sourceBox.dimension.width/3,h=i.targetBox.x+i.targetBox.dimension.width/3;let u,d;o.Rm.debug(`rendering relation up=${l} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),l?(u=a,d=s+i.targetBox.dimension.height):(u=a+i.sourceBox.dimension.height,d=s);const p=n.emRelationStroke??i.visual.stroke;t.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${r})`).attr("d",`M${c} ${u} L${h} ${d}`)}}function et(t,e,r,n){return i=>{const a=t.append("g").attr("class","em-swimlane"),o=n.emSwimlaneBackgroundOdd??"rgb(250,250,250)",s=n.emSwimlaneBackgroundStroke??"rgb(240,240,240)";a.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",e+r.swimlanePadding).attr("height",i.height).attr("fill",o).attr("stroke",s),a.append("text").attr("font-weight",r.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}(0,o.K2)(Q,"renderD3Box"),(0,o.K2)(J,"dirUpwards"),(0,o.K2)(tt,"renderD3Relation"),(0,o.K2)(et,"renderD3Swimlane");var rt={parser:H,db:V,renderer:{draw:(0,o.K2)(function(t,e,r,n){if(o.Rm.debug("in eventmodeling renderer",t+"\n","id:",e,r),!Z)throw new Error("EventModeling config not found");const i=n.db,{themeVariables:s,eventmodeling:c}=(0,a.D7)(),h=(0,l.Ltv)(`[id="${e}"]`),u=i.getDiagramProps(),d=i.getState(),p=`em-arrowhead-${e}`,f=s.emArrowhead??"#000000";d.sortedSwimlanesArray.forEach(et(h,d.maxR,u,s)),d.boxes.forEach(Q(h,u)),d.relations.forEach(tt(h,u,p,s));h.append("defs").append("marker").attr("id",p).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),(0,a.mj)(void 0,h,c?.padding??30,c?.useMaxWidth)},"draw")},styles:(0,o.K2)(t=>"","getStyles")}},9299(t,e,r){"use strict";r.d(e,{diagram:()=>b});var n=r(594),i=r(5871),a=r(8221),o=r(1123),s=r(797),l=r(8731),c=o.UI.packet,h=class{constructor(){this.packet=[],this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,s.K2)(this,"PacketDB")}getConfig(){const t=(0,a.$t)({...c,...(0,o.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,o.IU)(),this.packet=[]}},u=(0,s.K2)((t,e)=>{(0,i.S)(t,e);let r=-1,n=[],a=1;const{bitsPerRow:o}=e.getConfig();for(let{start:i,end:l,bits:c,label:h}of t.blocks){if(void 0!==i&&void 0!==l&&l<i)throw new Error(`Packet block ${i} - ${l} is invalid. End must be greater than start.`);if(i??=r+1,i!==r+1)throw new Error(`Packet block ${i} - ${l??i} is not contiguous. It should start from ${r+1}.`);if(0===c)throw new Error(`Packet block ${i} is invalid. Cannot have a zero bit field.`);for(l??=i+(c??1)-1,c??=l-i+1,r=l,s.Rm.debug(`Packet block ${i} - ${r} with label ${h}`);n.length<=o+1&&e.getPacket().length<1e4;){const[t,r]=d({start:i,end:l,bits:c,label:h},a,o);if(n.push(t),t.end+1===a*o&&(e.pushWord(n),n=[],a++),!r)break;({start:i,end:l,bits:c,label:h}=r)}}e.pushWord(n)},"populate"),d=(0,s.K2)((t,e,r)=>{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const n=e*r-1,i=e*r;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),p={parser:{yy:void 0},parse:(0,s.K2)(async t=>{const e=await(0,l.qg)("packet",t),r=p.parser?.yy;if(!(r instanceof h))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");s.Rm.debug(e),u(e,r)},"parse")},f=(0,s.K2)((t,e,r,i)=>{const a=i.db,s=a.getConfig(),{rowHeight:l,paddingY:c,bitWidth:h,bitsPerRow:u}=s,d=a.getPacket(),p=a.getDiagramTitle(),f=l+c,m=f*(d.length+1)-(p?0:l),y=h*u+2,v=(0,n.D)(e);v.attr("viewBox",`0 0 ${y} ${m}`),(0,o.a$)(v,m,y,s.useMaxWidth);for(const[n,o]of d.entries())g(v,o,n,s);v.append("text").text(p).attr("x",y/2).attr("y",m-f/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),g=(0,s.K2)((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:l})=>{const c=t.append("g"),h=r*(n+a)+a;for(const u of e){const t=u.start%s*o+1,e=(u.end-u.start+1)*o-i;if(c.append("rect").attr("x",t).attr("y",h).attr("width",e).attr("height",n).attr("class","packetBlock"),c.append("text").attr("x",t+e/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(u.label),!l)continue;const r=u.end===u.start,a=h-2;c.append("text").attr("x",t+(r?e/2:0)).attr("y",a).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",r?"middle":"start").text(u.start),r||c.append("text").attr("x",t+e).attr("y",a).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(u.end)}},"drawWord"),m={draw:f},y={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},v=(0,s.K2)(({packet:t}={})=>{const e=(0,a.$t)(y,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`},"styles"),b={parser:p,get db(){return new h},renderer:m,styles:v}},7059(t,e,r){"use strict";r.d(e,{diagram:()=>T});var n=r(594),i=r(4345),a=r(8013),o=r(5871),s=r(8221),l=r(1123),c=r(797),h=r(8731),u=r(1444),d=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getAccDescription=l.m7,this.setAccDescription=l.EI}static{(0,c.K2)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const t=l.UI,e=(0,l.zj)();return(0,s.$t)({...t.treemap,...e.treemap??{}})}addNode(t,e){this.nodes.push(t),this.levels.set(t,e),0===e&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,e){const r=this.classes.get(t)??{id:t,styles:[],textStyles:[]},n=e.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(t=>{(0,a.KX)(t)&&(r?.textStyles?r.textStyles.push(t):r.textStyles=[t]),r?.styles?r.styles.push(t):r.styles=[t]}),this.classes.set(t,r)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){(0,l.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function p(t){if(!t.length)return[];const e=[],r=[];return t.forEach(t=>{const n={name:t.name,children:"Leaf"===t.type?void 0:[]};for(n.classSelector=t?.classSelector,t?.cssCompiledStyles&&(n.cssCompiledStyles=t.cssCompiledStyles),"Leaf"===t.type&&void 0!==t.value&&(n.value=t.value);r.length>0&&r[r.length-1].level>=t.level;)r.pop();if(0===r.length)e.push(n);else{const t=r[r.length-1].node;t.children?t.children.push(n):t.children=[n]}"Leaf"!==t.type&&r.push({node:n,level:t.level})}),e}(0,c.K2)(p,"buildHierarchy");var f=(0,c.K2)((t,e)=>{(0,o.S)(t,e);const r=[];for(const a of t.TreemapRows??[])"ClassDefStatement"===a.$type&&e.addClass(a.className??"",a.styleText??"");for(const a of t.TreemapRows??[]){const t=a.item;if(!t)continue;const n=a.indent?parseInt(a.indent):0,i=g(t),o=t.classSelector?e.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,l={level:n,name:i,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(l)}const n=p(r),i=(0,c.K2)((t,r)=>{for(const n of t)e.addNode(n,r),n.children&&n.children.length>0&&i(n.children,r+1)},"addNodesRecursively");i(n,0)},"populate"),g=(0,c.K2)(t=>t.name?String(t.name):"","getItemName"),m={parser:{yy:void 0},parse:(0,c.K2)(async t=>{try{const e=h.qg,r=await e("treemap",t);c.Rm.debug("Treemap AST:",r);const n=m.parser?.yy;if(!(n instanceof d))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(r,n)}catch(e){throw c.Rm.error("Error parsing treemap:",e),e}},"parse")},y=10,v={draw:(0,c.K2)((t,e,r,o)=>{const s=o.db,h=s.getConfig(),d=h.padding??10,p=s.getDiagramTitle(),f=s.getRoot(),{themeVariables:g}=(0,l.zj)();if(!f)return;const m=p?30:0,v=(0,n.D)(e),b=h.nodeWidth?h.nodeWidth*y:960,x=h.nodeHeight?h.nodeHeight*y:500,T=b,w=x+m;let k;v.attr("viewBox",`0 0 ${T} ${w}`),(0,l.a$)(v,w,T,h.useMaxWidth);try{const t=h.valueFormat||",";if("$0,0"===t)k=(0,c.K2)(t=>"$"+(0,u.GPZ)(",")(t),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const e=/\.\d+/.exec(t),r=e?e[0]:"";k=(0,c.K2)(t=>"$"+(0,u.GPZ)(","+r)(t),"valueFormat")}else if(t.startsWith("$")){const e=t.substring(1);k=(0,c.K2)(t=>"$"+(0,u.GPZ)(e||"")(t),"valueFormat")}else k=(0,u.GPZ)(t)}catch(O){c.Rm.error("Error creating format function:",O),k=(0,u.GPZ)(",")}const C=(0,u.UMr)().range(["transparent",g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),E=(0,u.UMr)().range(["transparent",g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),S=(0,u.UMr)().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);p&&v.append("text").attr("x",T/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(p);const _=v.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),A=(0,u.Sk5)(f).sum(t=>t.value??0).sort((t,e)=>(e.value??0)-(t.value??0)),R=(0,u.hkb)().size([b,x]).paddingTop(t=>t.children&&t.children.length>0?35:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?y:0).paddingRight(t=>t.children&&t.children.length>0?y:0).paddingBottom(t=>t.children&&t.children.length>0?y:0).round(!0)(A),L=R.descendants().filter(t=>t.children&&t.children.length>0),I=_.selectAll(".treemapSection").data(L).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);I.append("rect").attr("width",t=>t.x1-t.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>0===t.depth?"display: none;":""),I.append("clipPath").attr("id",(t,r)=>`clip-section-${e}-${r}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",25),I.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,e)=>`treemapSection section${e}`).attr("fill",t=>C(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>E(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(0===t.depth)return"display: none;";const e=(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles});return e.nodeStyles+";"+e.borderStyles.join(";")}),I.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(t=>0===t.depth?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(0===t.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+S(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(t){if(0===t.depth)return;const e=(0,u.Ltv)(this),r=t.data.name;e.text(r);const n=t.x1-t.x0;let i;if(!1!==h.showValues&&t.value){i=n-10-30-10-6}else{i=n-6-6}const a=Math.max(15,i),o=e.node();if(o.getComputedTextLength()>a){const t="...";let n=r;for(;n.length>0;){if(n=r.substring(0,n.length-1),0===n.length){e.text(t),o.getComputedTextLength()>a&&e.text("");break}if(e.text(n+t),o.getComputedTextLength()<=a)break}}}),!1!==h.showValues&&I.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?k(t.value):"").attr("font-style","italic").attr("style",t=>{if(0===t.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+S(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const D=R.leaves(),N=_.selectAll(".treemapLeafGroup").data(D).enter().append("g").attr("class",(t,e)=>`treemapNode treemapLeafGroup leaf${e}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);N.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?C(t.parent.data.name):C(t.data.name)).attr("style",t=>(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?C(t.parent.data.name):C(t.data.name)).attr("stroke-width",3),N.append("clipPath").attr("id",(t,r)=>`clip-${e}-${r}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4));if(N.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+S(t.data.name)+";"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,r)=>`url(#clip-${e}-${r})`).text(t=>t.data.name).each(function(t){const e=(0,u.Ltv)(this),r=t.x1-t.x0,n=t.y1-t.y0,i=e.node(),a=r-8,o=n-8;if(a<10||o<10)return void e.style("display","none");let s=parseInt(e.style("font-size"),10);for(;i.getComputedTextLength()>a&&s>8;)s--,e.style("font-size",`${s}px`);let l=Math.max(6,Math.min(28,Math.round(.6*s))),c=s+2+l;for(;c>o&&s>8&&(s--,l=Math.max(6,Math.min(28,Math.round(.6*s))),!(l<6&&8===s));)e.style("font-size",`${s}px`),c=s+2+l;e.style("font-size",`${s}px`),(i.getComputedTextLength()>a||s<8||o<s)&&e.style("display","none")}),!1!==h.showValues){N.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+S(t.data.name)+";"+(0,a.GX)({cssCompiledStyles:t.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(t,r)=>`url(#clip-${e}-${r})`).text(t=>t.value?k(t.value):"").each(function(t){const e=(0,u.Ltv)(this),r=this.parentNode;if(!r)return void e.style("display","none");const n=(0,u.Ltv)(r).select(".treemapLabel");if(n.empty()||"none"===n.style("display"))return void e.style("display","none");const i=parseFloat(n.style("font-size")),a=Math.max(6,Math.min(28,Math.round(.6*i)));e.style("font-size",`${a}px`);const o=(t.y1-t.y0)/2+i/2+2;e.attr("y",o);const s=t.x1-t.x0,l=t.y1-t.y0-4,c=s-8;e.node().getComputedTextLength()>c||o+a>l||a<6?e.style("display","none"):e.style("display",null)})}const M=h.diagramPadding??8;(0,i.P)(v,M,"flowchart",h?.useMaxWidth||!1)},"draw"),getClasses:(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses")},b={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},x=(0,c.K2)(({treemap:t}={})=>{const e=(0,l.P$)(),r=(0,l.zj)(),n=(0,s.$t)(e,r.themeVariables),i=(0,s.$t)(b,t),a=i.titleColor??n.titleColor,o=i.labelColor??n.textColor,c=i.valueColor??n.textColor;return`\n .treemapNode.section {\n stroke: ${i.sectionStrokeColor};\n stroke-width: ${i.sectionStrokeWidth};\n fill: ${i.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${i.leafStrokeColor};\n stroke-width: ${i.leafStrokeWidth};\n fill: ${i.leafFillColor};\n }\n .treemapLabel {\n fill: ${o};\n font-size: ${i.labelFontSize};\n }\n .treemapValue {\n fill: ${c};\n font-size: ${i.valueFontSize};\n }\n .treemapTitle {\n fill: ${a};\n font-size: ${i.titleFontSize};\n }\n `},"getStyles"),T={parser:m,get db(){return new d},renderer:v,styles:x}},253(t,e,r){"use strict";r.d(e,{diagram:()=>T});var n=r(9625),i=r(4345),a=r(3848),o=(r(6615),r(1334),r(2654),r(5105),r(8013),r(1240),r(8221)),s=r(1123),l=r(797),c=r(1444),h=r(5582),u=r(5937),d=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],n=[1,11],i=[1,12],a=[1,13],o=[1,23],s=[1,24],c=[1,25],h=[1,26],u=[1,27],d=[1,19],p=[1,28],f=[1,29],g=[1,20],m=[1,18],y=[1,21],v=[1,22],b=[1,36],x=[1,37],T=[1,38],w=[1,39],k=[1,40],C=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],E=[1,45],S=[1,46],_=[1,55],A=[40,48,50,51,52,70,71],R=[1,66],L=[1,64],I=[1,61],D=[1,65],N=[1,67],M=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],O=[65,66,67,68,69],$=[1,84],P=[1,83],B=[1,81],F=[1,82],z=[6,10,42,47],K=[6,10,13,41,42,47,48,49],j=[1,92],q=[1,91],W=[1,90],U=[19,58],G=[1,101],Y=[1,100],V=[19,58,60,62],H={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:case 55:case 56:case 57:case 58:case 81:case 65:case 66:case 69:this.$=a[s];break;case 8:n.addEntity(a[s-4]),n.addEntity(a[s-2]),n.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:n.addEntity(a[s-8]),n.addEntity(a[s-4]),n.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),n.setClass([a[s-8]],a[s-6]),n.setClass([a[s-4]],a[s-2]);break;case 10:n.addEntity(a[s-6]),n.addEntity(a[s-2]),n.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),n.setClass([a[s-6]],a[s-4]);break;case 11:n.addEntity(a[s-6]),n.addEntity(a[s-4]),n.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),n.setClass([a[s-4]],a[s-2]);break;case 12:n.addEntity(a[s-3]),n.addAttributes(a[s-3],a[s-1]);break;case 13:n.addEntity(a[s-5]),n.addAttributes(a[s-5],a[s-1]),n.setClass([a[s-5]],a[s-3]);break;case 14:n.addEntity(a[s-2]);break;case 15:n.addEntity(a[s-4]),n.setClass([a[s-4]],a[s-2]);break;case 16:n.addEntity(a[s]);break;case 17:n.addEntity(a[s-2]),n.setClass([a[s-2]],a[s]);break;case 18:n.addEntity(a[s-6],a[s-4]),n.addAttributes(a[s-6],a[s-1]);break;case 19:n.addEntity(a[s-8],a[s-6]),n.addAttributes(a[s-8],a[s-1]),n.setClass([a[s-8]],a[s-3]);break;case 20:n.addEntity(a[s-5],a[s-3]);break;case 21:n.addEntity(a[s-7],a[s-5]),n.setClass([a[s-7]],a[s-2]);break;case 22:n.addEntity(a[s-3],a[s-1]);break;case 23:n.addEntity(a[s-5],a[s-3]),n.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=a[s-3],n.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:case 43:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],n.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],n.addCssStyles(a[s-2],a[s-1]);break;case 44:case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:case 70:this.$=a[s].replace(/"/g,"");break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=n.Cardinality.ZERO_OR_ONE;break;case 73:this.$=n.Cardinality.ZERO_OR_MORE;break;case 74:this.$=n.Cardinality.ONE_OR_MORE;break;case 75:this.$=n.Cardinality.ONLY_ONE;break;case 76:this.$=n.Cardinality.MD_PARENT;break;case 77:this.$=n.Identification.NON_IDENTIFYING;break;case 78:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:o,34:s,35:c,36:h,37:u,40:d,43:p,44:f,48:g,50:m,51:y,52:v},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:30,11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:o,34:s,35:c,36:h,37:u,40:d,43:p,44:f,48:g,50:m,51:y,52:v},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:b,66:x,67:T,68:w,69:k}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(C,[2,54]),t(C,[2,55]),t(C,[2,56]),t(C,[2,57]),t(C,[2,58]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:44,40:E,41:S},{16:47,40:E,41:S},{16:48,40:E,41:S},t(e,[2,4]),{11:49,40:d,48:g,50:m,51:y,52:v},{16:50,40:E,41:S},{18:51,19:[1,52],53:53,54:54,58:_},{11:56,40:d,48:g,50:m,51:y,52:v},{64:57,70:[1,58],71:[1,59]},t(A,[2,72]),t(A,[2,73]),t(A,[2,74]),t(A,[2,75]),t(A,[2,76]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:R,38:60,41:L,42:I,45:62,46:63,48:D,49:N},t(M,[2,37]),t(M,[2,38]),{16:68,40:E,41:S,42:I},{13:R,38:69,41:L,42:I,45:62,46:63,48:D,49:N},{13:[1,70],15:[1,71]},t(e,[2,17],{63:35,12:72,17:[1,73],42:I,65:b,66:x,67:T,68:w,69:k}),{19:[1,74]},t(e,[2,14]),{18:75,19:[2,59],53:53,54:54,58:_},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:b,66:x,67:T,68:w,69:k},t(O,[2,77]),t(O,[2,78]),{6:$,10:P,39:80,42:B,47:F},{40:[1,85],41:[1,86]},t(z,[2,43],{46:87,13:R,41:L,48:D,49:N}),t(K,[2,45]),t(K,[2,50]),t(K,[2,51]),t(K,[2,52]),t(K,[2,53]),t(e,[2,41],{42:I}),{6:$,10:P,39:88,42:B,47:F},{14:89,40:j,50:q,72:W},{16:93,40:E,41:S},{11:94,40:d,48:g,50:m,51:y,52:v},{18:95,19:[1,96],53:53,54:54,58:_},t(e,[2,12]),{19:[2,60]},t(U,[2,61],{56:97,57:98,59:99,61:G,62:Y}),t([19,58,61,62],[2,66]),t(e,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(e,[2,36]),{13:R,41:L,45:104,46:63,48:D,49:N},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(M,[2,39]),t(M,[2,40]),t(K,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,79]),t(e,[2,80]),t(e,[2,81]),{13:[1,105],42:I},{13:[1,107],15:[1,106]},{19:[1,108]},t(e,[2,15]),t(U,[2,62],{57:109,60:[1,110],62:Y}),t(U,[2,63]),t(V,[2,67]),t(U,[2,70]),t(V,[2,69]),{18:111,19:[1,112],53:53,54:54,58:_},{16:113,40:E,41:S},t(z,[2,44],{46:87,13:R,41:L,48:D,49:N}),{14:114,40:j,50:q,72:W},{16:115,40:E,41:S},{14:116,40:j,50:q,72:W},t(e,[2,13]),t(U,[2,64]),{59:117,61:G},{19:[1,118]},t(e,[2,20]),t(e,[2,23],{17:[1,119],42:I}),t(e,[2,11]),{13:[1,120],42:I},t(e,[2,10]),t(V,[2,68]),t(e,[2,18]),{18:121,19:[1,122],53:53,54:54,58:_},{14:123,40:j,50:q,72:W},{19:[1,124]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},X=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;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 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 61;case 25:case 26:return 58;case 27:return 62;case 29:return this.popState(),19;case 30:case 77:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 64:return 65;case 42:case 43:case 44:case 52:case 54:case 66:return 67;case 47:case 48:case 49:case 50:case 51:case 53:case 65:return 66;case 55:case 56:case 58:case 59:case 60:case 63:return 68;case 57:return 51;case 61:return 52;case 62:return 48;case 67:return 69;case 68:case 71:case 72:case 73:return 70;case 69:case 70:return 71;case 74:return 41;case 75:return 47;case 76:return 40;case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/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,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,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,70,71,72,73,76,77,78],inclusive:!0}}}}();function Z(){this.yy={}}return H.lexer=X,(0,l.K2)(Z,"Parser"),Z.prototype=H,H.Parser=Z,new Z}();d.parser=d;var p=d,f=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=s.SV,this.getAccTitle=s.iN,this.setAccDescription=s.EI,this.getAccDescription=s.m7,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.getConfig=(0,l.K2)(()=>(0,s.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,l.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,s.D7)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),l.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const r=this.addEntity(t);let n;for(n=e.length-1;n>=0;n--)e[n].keys||(e[n].keys=[]),e[n].comment||(e[n].comment=""),r.attributes.push(e[n]),l.Rm.debug("Added attribute ",e[n].name)}addRelationship(t,e,r,n){const i=this.entities.get(t),a=this.entities.get(r);if(!i||!a)return;const o={entityA:i.id,roleA:e,entityB:a.id,relSpec:n};this.relationships.push(o),l.Rm.debug("Added new relationship :",o)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const r of t){const t=this.classes.get(r);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const r of t){const t=this.entities.get(r);if(!e||!t)return;for(const r of e)t.cssStyles.push(r)}}addClass(t,e){t.forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");r.textStyles.push(e)}r.styles.push(t)})})}setClass(t,e){for(const r of t){const t=this.entities.get(r);if(t)for(const r of e)t.cssClasses+=" "+r}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,s.IU)()}getData(){const t=[],e=[],r=(0,s.D7)();let n=0;for(const a of this.entities.keys()){const e=this.entities.get(a);e&&(e.cssCompiledStyles=this.getCompiledStyles(e.cssClasses.split(" ")),e.colorIndex=n++,t.push(e))}let i=0;for(const a of this.relationships){const t={id:(0,o.rY)(a.entityA,a.entityB,{prefix:"id",counter:i++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==a.relSpec.relType?"solid":"dashed",look:r.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:r,direction:"TB"}}},g={};(0,l.VA)(g,{draw:()=>m});var m=(0,l.K2)(async function(t,e,r,h){l.Rm.info("REF0:"),l.Rm.info("Drawing er diagram (unified)",e);const{securityLevel:u,er:d,layout:p}=(0,s.D7)(),f=h.db.getData(),g=(0,n.A)(e,u);f.type=h.type,f.layoutAlgorithm=(0,a.q7)(p),f.config.flowchart.nodeSpacing=d?.nodeSpacing||140,f.config.flowchart.rankSpacing=d?.rankSpacing||80,f.direction=h.db.getDirection();const{config:m}=f,{look:y}=m;f.markers="neo"===y?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],f.diagramId=e,await(0,a.XX)(f,g),"elk"===f.layoutAlgorithm&&g.select(".edges").lower();const v=g.selectAll('[id*="-background"]');Array.from(v).length>0&&v.each(function(){const t=(0,c.Ltv)(this),e=t.attr("id").replace("-background",""),r=g.select(`#${CSS.escape(e)}`);if(!r.empty()){const e=r.attr("transform");t.attr("transform",e)}});o._K.insertTitle(g,"erDiagramTitleText",d?.titleTopMargin??25,h.db.getDiagramTitle()),(0,i.P)(g,8,"erDiagram",d?.useMaxWidth??!0)},"draw"),y=(0,l.K2)((t,e)=>{const r=u.A,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return h.A(n,i,a,e)},"fade"),v=new Set(["redux-color","redux-dark-color"]),b=(0,l.K2)(t=>{const{theme:e,look:r,bkgColorArray:n,borderColorArray:i}=t;if(!v.has(e))return"";const a=n?.length>0;let o="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)o+=`\n\n [data-look="${r}"][data-color-id="color-${s}"].node path {\n stroke: ${i[s]};\n ${a?`fill: ${n[s]};`:""}\n }\n\n [data-look="${r}"][data-color-id="color-${s}"].node rect {\n stroke: ${i[s]};\n ${a?`fill: ${n[s]};`:""}\n }\n `;return o},"genColor"),x=(0,l.K2)(t=>{const{look:e,theme:r,erEdgeLabelBackground:n,strokeWidth:i}=t;return`\n ${b(t)}\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${v.has(r)&&n?n:y(t.tertiaryColor,.5)};\n }\n\n .edgeLabel {\n background-color: ${v.has(r)&&n?n:t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${v.has(r)&&n?n:t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.textColor};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${"neo"===e?i:"1px"};\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: ${"neo"===e?i:"1px"};\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n [data-look=neo].labelBkg {\n background-color: ${y(t.tertiaryColor,.5)};\n }\n`},"getStyles"),T={parser:p,get db(){return new f},renderer:g,styles:x}},4219(t,e,r){"use strict";r.d(e,{diagram:()=>E});var n=r(2501),i=r(3283),a=r(8343),o=r(9625),s=r(4345),l=r(3848),c=(r(6615),r(1334),r(2654)),h=(r(5105),r(8013),r(1240),r(8221)),u=r(1123),d=r(797),p=r(1444),f=r(3047),g=r(5582),m=r(5937),y=class{constructor(){this.vertexCounter=0,this.config=(0,u.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=u.SV,this.setAccDescription=u.EI,this.setDiagramTitle=u.ke,this.getAccTitle=u.iN,this.getAccDescription=u.m7,this.getDiagramTitle=u.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,d.K2)(this,"FlowDB")}sanitizeText(t){return u.Y2.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,r,n,a,o,s={},l){if(!t||0===t.trim().length)return;let h;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",h=(0,i.H)(t,{schema:i.r})}const p=this.edges.find(e=>e.id===t);if(p){const t=h;return void 0!==t?.animate&&(p.animate=t.animate),void 0!==t?.animation&&(p.animation=t.animation),void(void 0!==t?.curve&&(p.interpolate=t.curve))}let f,g=this.vertices.get(t);if(void 0===g&&(void 0===e&&void 0===r&&null!=n&&d.Rm.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),g={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,g)),this.vertexCounter++,void 0!==e?(this.config=(0,u.D7)(),f=this.sanitizeText(e.text.trim()),g.labelType=e.type,f.startsWith('"')&&f.endsWith('"')&&(f=f.substring(1,f.length-1)),g.text=f):void 0===g.text&&(g.text=t),void 0!==r&&(g.type=r),null!=n&&n.forEach(t=>{g.styles.push(t)}),null!=a&&a.forEach(t=>{g.classes.push(t)}),void 0!==o&&(g.dir=o),void 0===g.props?g.props=s:void 0!==s&&Object.assign(g.props,s),void 0!==h){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!(0,c.aP)(h.shape))throw new Error(`No such shape: ${h.shape}.`);g.type=h?.shape}h?.label&&(g.text=h?.label,g.labelType=this.sanitizeNodeLabelType(h?.labelType)),h?.icon&&(g.icon=h?.icon,h.label?.trim()||g.text!==t||(g.text="")),h?.form&&(g.form=h?.form),h?.pos&&(g.pos=h?.pos),h?.img&&(g.img=h?.img,h.label?.trim()||g.text!==t||(g.text="")),h?.constraint&&(g.constraint=h.constraint),h.w&&(g.assetWidth=Number(h.w)),h.h&&(g.assetHeight=Number(h.h))}}addSingleLink(t,e,r,n){const i={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};d.Rm.info("abc78 Got edge...",i);const a=r.text;if(void 0!==a&&(i.text=this.sanitizeText(a.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=r.length>10?10:r.length),n&&!this.edges.some(t=>t.id===n))i.id=n,i.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===i.start&&t.end===i.end);0===t.length?i.id=(0,h.rY)(i.start,i.end,{counter:0,prefix:"L"}):i.id=(0,h.rY)(i.start,i.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);d.Rm.info("Pushing edge..."),this.edges.push(i)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,r){const n=this.isLinkData(r)?r.id.replace("@",""):void 0;d.Rm.info("addLink",t,e,n);for(const i of t)for(const a of e){const o=i===t[t.length-1],s=a===e[0];o&&s?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const r=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=r&&r.forEach(t=>{if(/color/.exec(t)){const r=t.replace("fill","bgFill");e.textStyles.push(r)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const r of t.split(",")){const t=this.vertices.get(r);t&&t.classes.push(e);const n=this.edges.find(t=>t.id===r);n&&n.classes.push(e);const i=this.subGraphLookup.get(r);i&&i.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const r of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,e)}}setClickFun(t,e,r){if("loose"!==(0,u.D7)().securityLevel)return;if(void 0===e)return;let n=[];if("string"==typeof r){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<n.length;t++){let e=n[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),n[t]=e}}0===n.length&&n.push(t);const i=this.vertices.get(t);i&&(i.haveCallback=!0,this.funs.push(()=>{const r=this.lookUpDomId(t),i=document.querySelector(`[id="${r}"]`);null!==i&&i.addEventListener("click",()=>{h._K.runFunc(e,...n)},!1)}))}setLink(t,e,r){t.split(",").forEach(t=>{const n=this.vertices.get(t);void 0!==n&&(n.link=h._K.formatUrl(e,this.config),n.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFun(t,e,r)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){const e=(0,a.Ck)();(0,p.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const r=(0,p.Ltv)(t.currentTarget),n=r.attr("title");if(null===n)return;const i=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(r.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.bottom+"px"),e.html(f.A.sanitize(n)),r.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,p.Ltv)(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=(0,u.D7)(),(0,u.IU)()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);const a=(0,d.K2)(t=>{const e={boolean:{},number:{},string:{}},r=[];let n;return{nodeList:t.filter(function(t){const i=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(i in e?!e[i].hasOwnProperty(t)&&(e[i][t]=!0):!r.includes(t)&&r.push(t))}),dir:n}},"uniq")(e.flat()),o=a.nodeList;let s=a.dir;const l=(0,u.D7)().flowchart??{};if(s=s??(l.inheritDir?this.getDirection()??(0,u.D7)().direction??void 0:void 0),"gen-1"===this.version)for(let h=0;h<o.length;h++)o[h]=this.lookUpDomId(o[h]);n=n??"subGraph"+this.subCount,i=i||"",i=this.sanitizeText(i),this.subCount=this.subCount+1;const c={id:n,nodes:o,title:i.trim(),classes:[],dir:s,labelType:this.sanitizeNodeLabelType(r?.type)};return d.Rm.info("Adding",c.id,c.nodes,c.dir),c.nodes=this.makeUniq(c,this.subGraphs).nodes,this.subGraphs.push(c),this.subGraphLookup.set(n,c),n}getPosForId(t){for(const[e,r]of this.subGraphs.entries())if(r.id===t)return e;return-1}indexNodes2(t,e){const r=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){const e=this.getPosForId(r[n]);if(e>=0){const r=this.indexNodes2(t,e);if(r.result)return{result:!0,count:i+r.count};i+=r.count}n+=1}return{result:!1,count:i}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(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)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}}countChar(t,e){const r=e.length;let n=0;for(let i=0;i<r;++i)e[i]===t&&++n;return n}destructEndLink(t){const e=t.trim();let r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");const o=this.countChar(".",r);return o&&(i="dotted",a=o),{type:n,stroke:i,length:a}}destructLink(t,e){const r=this.destructEndLink(t);let n;if(e){if(n=this.destructStartLink(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r}exists(t,e){for(const r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(t,e){const r=[];return t.nodes.forEach((n,i)=>{this.exists(e,n)||r.push(t.nodes[i])}),{nodes:r}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,n,i,a){const o=r.get(t.id),s=n.get(t.id)??!1,l=this.findNode(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=this.getCompiledStyles(t.classes),l.cssClasses=t.classes.join(" ");else{const r={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:o,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};s?e.push({...r,isGroup:!0,shape:"rect"}):e.push({...r,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let e=[];for(const r of t){const t=this.classes.get(r);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=(0,u.D7)(),e=[],r=[],n=this.getSubGraphs(),i=new Map,a=new Map;for(let s=n.length-1;s>=0;s--){const t=n[s];t.nodes.length>0&&a.set(t.id,!0);for(const e of t.nodes)i.set(e,t.id)}for(let s=n.length-1;s>=0;s--){const r=n[s];e.push({id:r.id,label:r.title,labelStyle:"",labelType:r.labelType,parentId:i.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssClasses:r.classes.join(" "),shape:"rect",dir:r.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(r=>{this.addNodeFromVertex(r,e,i,a,t,t.look||"classic")});const o=this.getEdges();return o.forEach((e,n)=>{const{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(e.type),s=[...o.defaultStyle??[]];e.style&&s.push(...e.style);const l={id:(0,h.rY)(e.start,e.end,{counter:n,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":i,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":a,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:s,style:s,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};r.push(l)}),{nodes:e,edges:r,other:{},config:t}}defaultConfig(){return u.ME.flowchart}},v={getClasses:(0,d.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,d.K2)(async function(t,e,r,n){d.Rm.info("REF0:"),d.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:i,flowchart:a,layout:c}=(0,u.D7)();n.db.setDiagramId(e),d.Rm.debug("Before getData: ");const p=n.db.getData();d.Rm.debug("Data: ",p);const f=(0,o.A)(e,i),g=n.db.getDirection();p.type=n.type,p.layoutAlgorithm=(0,l.q7)(c),"dagre"===p.layoutAlgorithm&&"elk"===c&&d.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),p.direction=g,p.nodeSpacing=a?.nodeSpacing||50,p.rankSpacing=a?.rankSpacing||50,p.markers=["point","circle","cross"],p.diagramId=e,d.Rm.debug("REF1:",p),await(0,l.XX)(p,f);const m=p.config.flowchart?.diagramPadding??8;h._K.insertTitle(f,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),(0,s.P)(f,m,"flowchart",a?.useMaxWidth||!1)},"draw")},b=function(){var t=(0,d.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],o=[1,13],s=[1,14],l=[1,15],c=[1,16],h=[1,23],u=[1,25],p=[1,26],f=[1,27],g=[1,50],m=[1,49],y=[1,29],v=[1,30],b=[1,31],x=[1,32],T=[1,33],w=[1,45],k=[1,47],C=[1,43],E=[1,48],S=[1,44],_=[1,51],A=[1,46],R=[1,52],L=[1,53],I=[1,34],D=[1,35],N=[1,36],M=[1,37],O=[1,38],$=[1,58],P=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],B=[1,62],F=[1,61],z=[1,63],K=[8,9,11,75,77,78],j=[1,79],q=[1,92],W=[1,97],U=[1,96],G=[1,93],Y=[1,89],V=[1,95],H=[1,91],X=[1,98],Z=[1,94],Q=[1,99],J=[1,90],tt=[8,9,10,11,40,75,77,78],et=[8,9,10,11,40,46,75,77,78],rt=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],nt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],it=[44,60,89,102,105,106,109,111,114,115,116],at=[1,122],ot=[1,123],st=[1,125],lt=[1,124],ct=[44,60,62,74,89,102,105,106,109,111,114,115,116],ht=[1,134],ut=[1,148],dt=[1,149],pt=[1,150],ft=[1,151],gt=[1,136],mt=[1,138],yt=[1,142],vt=[1,143],bt=[1,144],xt=[1,145],Tt=[1,146],wt=[1,147],kt=[1,152],Ct=[1,153],Et=[1,132],St=[1,133],_t=[1,140],At=[1,135],Rt=[1,139],Lt=[1,137],It=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Dt=[1,155],Nt=[1,157],Mt=[8,9,11],Ot=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],$t=[1,177],Pt=[1,173],Bt=[1,174],Ft=[1,178],zt=[1,175],Kt=[1,176],jt=[77,116,119],qt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Wt=[10,106],Ut=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Gt=[1,248],Yt=[1,246],Vt=[1,250],Ht=[1,244],Xt=[1,245],Zt=[1,247],Qt=[1,249],Jt=[1,251],te=[1,269],ee=[8,9,11,106],re=[8,9,10,11,60,84,105,106,109,110,111,112],ne={trace:(0,d.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:(0,d.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=a[s];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 33:this.$=n.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=n.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=n.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 43:case 133:this.$=a[s-1]+a[s];break;case 45:n.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),n.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 46:n.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 47:n.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 48:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 49:n.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:case 128:case 130:this.$=[a[s]];break;case 52:n.addVertex(a[s-5][a[s-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-4]),this.$=a[s-5].concat(a[s]);break;case 53:this.$=a[s-4].concat(a[s]);break;case 55:this.$=a[s-2],n.setClass(a[s-2],a[s]);break;case 56:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"square");break;case 57:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"doublecircle");break;case 58:this.$=a[s-5],n.addVertex(a[s-5],a[s-2],"circle");break;case 59:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"ellipse");break;case 60:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"stadium");break;case 61:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"subroutine");break;case 62:this.$=a[s-7],n.addVertex(a[s-7],a[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 63:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"cylinder");break;case 64:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"round");break;case 65:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"diamond");break;case 66:this.$=a[s-5],n.addVertex(a[s-5],a[s-2],"hexagon");break;case 67:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"odd");break;case 68:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"trapezoid");break;case 69:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 70:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"lean_right");break;case 71:this.$=a[s-3],n.addVertex(a[s-3],a[s-1],"lean_left");break;case 72:this.$=a[s],n.addVertex(a[s]);break;case 73:a[s-1].text=a[s],this.$=a[s-1];break;case 74:case 75:a[s-2].text=a[s-1],this.$=a[s-2];break;case 77:var l=n.destructLink(a[s],a[s-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[s-1]};break;case 78:l=n.destructLink(a[s],a[s-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[s-1],id:a[s-3]};break;case 79:case 86:case 101:case 103:this.$={text:a[s],type:"text"};break;case 80:case 87:case 102:this.$={text:a[s-1].text+""+a[s],type:a[s-1].type};break;case 81:case 88:this.$={text:a[s],type:"string"};break;case 82:case 89:case 104:this.$={text:a[s],type:"markdown"};break;case 83:l=n.destructLink(a[s]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:l=n.destructLink(a[s]);this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[s-1]};break;case 85:this.$=a[s-1];break;case 105:this.$=a[s-4],n.addClass(a[s-2],a[s]);break;case 106:this.$=a[s-4],n.setClass(a[s-2],a[s]);break;case 107:case 115:this.$=a[s-1],n.setClickEvent(a[s-1],a[s]);break;case 108:case 116:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-2]),n.setTooltip(a[s-3],a[s]);break;case 109:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 110:this.$=a[s-4],n.setClickEvent(a[s-4],a[s-3],a[s-2]),n.setTooltip(a[s-4],a[s]);break;case 111:this.$=a[s-2],n.setLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],n.setLink(a[s-4],a[s-2]),n.setTooltip(a[s-4],a[s]);break;case 113:this.$=a[s-4],n.setLink(a[s-4],a[s-2],a[s]);break;case 114:this.$=a[s-6],n.setLink(a[s-6],a[s-4],a[s]),n.setTooltip(a[s-6],a[s-2]);break;case 117:this.$=a[s-1],n.setLink(a[s-1],a[s]);break;case 118:this.$=a[s-3],n.setLink(a[s-3],a[s-2]),n.setTooltip(a[s-3],a[s]);break;case 119:this.$=a[s-3],n.setLink(a[s-3],a[s-2],a[s]);break;case 120:this.$=a[s-5],n.setLink(a[s-5],a[s-4],a[s]),n.setTooltip(a[s-5],a[s-2]);break;case 121:this.$=a[s-4],n.addVertex(a[s-2],void 0,void 0,a[s]);break;case 122:this.$=a[s-4],n.updateLink([a[s-2]],a[s]);break;case 123:this.$=a[s-4],n.updateLink(a[s-2],a[s]);break;case 124:this.$=a[s-8],n.updateLinkInterpolate([a[s-6]],a[s-2]),n.updateLink([a[s-6]],a[s]);break;case 125:this.$=a[s-8],n.updateLinkInterpolate(a[s-6],a[s-2]),n.updateLink(a[s-6],a[s]);break;case 126:this.$=a[s-6],n.updateLinkInterpolate([a[s-4]],a[s]);break;case 127:this.$=a[s-6],n.updateLinkInterpolate(a[s-4],a[s]);break;case 129:case 131:a[s-2].push(a[s]),this.$=a[s-2];break;case 182:case 184:this.$=a[s-1]+""+a[s];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:s,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:b,87:x,88:T,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L,121:I,122:D,123:N,124:M,125:O},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,55],9:[1,56],10:$,15:54,18:57},t(P,[2,3]),t(P,[2,4]),t(P,[2,5]),t(P,[2,6]),t(P,[2,7]),t(P,[2,8]),{8:B,9:F,11:z,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:B,9:F,11:z,21:68},{8:B,9:F,11:z,21:69},{8:B,9:F,11:z,21:70},{8:B,9:F,11:z,21:71},{8:B,9:F,11:z,21:72},{8:B,9:F,10:[1,73],11:z,21:74},t(P,[2,36]),{35:[1,75]},{37:[1,76]},t(P,[2,39]),t(K,[2,50],{18:77,39:78,10:$,40:j}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:q,44:W,60:U,80:[1,87],89:G,95:[1,84],97:[1,85],101:86,105:Y,106:V,109:H,111:X,114:Z,115:Q,116:J,120:88},t(P,[2,185]),t(P,[2,186]),t(P,[2,187]),t(P,[2,188]),t(P,[2,189]),t(tt,[2,51]),t(tt,[2,54],{46:[1,100]}),t(et,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:m,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:w,102:k,105:C,106:E,109:S,111:_,114:A,115:R,116:L}),t(rt,[2,181]),t(rt,[2,142]),t(rt,[2,143]),t(rt,[2,144]),t(rt,[2,145]),t(rt,[2,146]),t(rt,[2,147]),t(rt,[2,148]),t(rt,[2,149]),t(rt,[2,150]),t(rt,[2,151]),t(rt,[2,152]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,114]},t(nt,[2,26],{18:115,10:$}),t(P,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(it,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:at,81:ot,116:st,119:lt},{75:[1,126],77:[1,127]},t(ct,[2,83]),t(P,[2,28]),t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t(P,[2,32]),{10:ht,12:ut,14:dt,27:pt,28:128,32:ft,44:gt,60:mt,75:yt,80:[1,130],81:[1,131],83:141,84:vt,85:bt,86:xt,87:Tt,88:wt,89:kt,90:Ct,91:129,105:Et,109:St,111:_t,114:At,115:Rt,116:Lt},t(It,a,{5:154}),t(P,[2,37]),t(P,[2,38]),t(K,[2,48],{44:Dt}),t(K,[2,49],{18:156,10:$,40:Nt}),t(tt,[2,44]),{44:g,47:158,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},{44:g,47:163,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},t(Mt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(Mt,[2,115],{120:168,10:[1,167],14:q,44:W,60:U,89:G,105:Y,106:V,109:H,111:X,114:Z,115:Q,116:J}),t(Mt,[2,117],{10:[1,169]}),t(Ot,[2,183]),t(Ot,[2,170]),t(Ot,[2,171]),t(Ot,[2,172]),t(Ot,[2,173]),t(Ot,[2,174]),t(Ot,[2,175]),t(Ot,[2,176]),t(Ot,[2,177]),t(Ot,[2,178]),t(Ot,[2,179]),t(Ot,[2,180]),{44:g,47:170,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},{30:171,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:179,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:181,50:[1,180],67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:182,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:183,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:184,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{109:[1,185]},{30:186,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:187,65:[1,188],67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:189,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:190,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{30:191,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},t(rt,[2,182]),t(i,[2,20]),t(nt,[2,25]),t(K,[2,46],{39:192,18:193,10:$,40:j}),t(it,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{77:[1,197],79:198,116:st,119:lt},t(jt,[2,79]),t(jt,[2,81]),t(jt,[2,82]),t(jt,[2,168]),t(jt,[2,169]),{76:199,79:121,80:at,81:ot,116:st,119:lt},t(ct,[2,84]),{8:B,9:F,10:ht,11:z,12:ut,14:dt,21:201,27:pt,29:[1,200],32:ft,44:gt,60:mt,75:yt,83:141,84:vt,85:bt,86:xt,87:Tt,88:wt,89:kt,90:Ct,91:202,105:Et,109:St,111:_t,114:At,115:Rt,116:Lt},t(qt,[2,101]),t(qt,[2,103]),t(qt,[2,104]),t(qt,[2,157]),t(qt,[2,158]),t(qt,[2,159]),t(qt,[2,160]),t(qt,[2,161]),t(qt,[2,162]),t(qt,[2,163]),t(qt,[2,164]),t(qt,[2,165]),t(qt,[2,166]),t(qt,[2,167]),t(qt,[2,90]),t(qt,[2,91]),t(qt,[2,92]),t(qt,[2,93]),t(qt,[2,94]),t(qt,[2,95]),t(qt,[2,96]),t(qt,[2,97]),t(qt,[2,98]),t(qt,[2,99]),t(qt,[2,100]),{6:11,7:12,8:o,9:s,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,203],33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:b,87:x,88:T,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L,121:I,122:D,123:N,124:M,125:O},{10:$,18:204},{44:[1,205]},t(tt,[2,43]),{10:[1,206],44:g,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:113,114:A,115:R,116:L},{10:[1,207]},{10:[1,208],106:[1,209]},t(Wt,[2,128]),{10:[1,210],44:g,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:113,114:A,115:R,116:L},{10:[1,211],44:g,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:113,114:A,115:R,116:L},{80:[1,212]},t(Mt,[2,109],{10:[1,213]}),t(Mt,[2,111],{10:[1,214]}),{80:[1,215]},t(Ot,[2,184]),{80:[1,216],98:[1,217]},t(tt,[2,55],{113:113,44:g,60:m,89:w,102:k,105:C,106:E,109:S,111:_,114:A,115:R,116:L}),{31:[1,218],67:$t,82:219,116:Ft,117:zt,118:Kt},t(Ut,[2,86]),t(Ut,[2,88]),t(Ut,[2,89]),t(Ut,[2,153]),t(Ut,[2,154]),t(Ut,[2,155]),t(Ut,[2,156]),{49:[1,220],67:$t,82:219,116:Ft,117:zt,118:Kt},{30:221,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{51:[1,222],67:$t,82:219,116:Ft,117:zt,118:Kt},{53:[1,223],67:$t,82:219,116:Ft,117:zt,118:Kt},{55:[1,224],67:$t,82:219,116:Ft,117:zt,118:Kt},{57:[1,225],67:$t,82:219,116:Ft,117:zt,118:Kt},{60:[1,226]},{64:[1,227],67:$t,82:219,116:Ft,117:zt,118:Kt},{66:[1,228],67:$t,82:219,116:Ft,117:zt,118:Kt},{30:229,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},{31:[1,230],67:$t,82:219,116:Ft,117:zt,118:Kt},{67:$t,69:[1,231],71:[1,232],82:219,116:Ft,117:zt,118:Kt},{67:$t,69:[1,234],71:[1,233],82:219,116:Ft,117:zt,118:Kt},t(K,[2,45],{18:156,10:$,40:Nt}),t(K,[2,47],{44:Dt}),t(it,[2,75]),t(it,[2,74]),{62:[1,235],67:$t,82:219,116:Ft,117:zt,118:Kt},t(it,[2,77]),t(jt,[2,80]),{77:[1,236],79:198,116:st,119:lt},{30:237,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},t(It,a,{5:238}),t(qt,[2,102]),t(P,[2,35]),{43:239,44:g,45:40,47:41,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},{10:$,18:240},{10:Gt,60:Yt,84:Vt,92:241,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{10:Gt,60:Yt,84:Vt,92:252,104:[1,253],105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{10:Gt,60:Yt,84:Vt,92:254,104:[1,255],105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{105:[1,256]},{10:Gt,60:Yt,84:Vt,92:257,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{44:g,47:258,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},t(Mt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(Mt,[2,116]),t(Mt,[2,118],{10:[1,262]}),t(Mt,[2,119]),t(et,[2,56]),t(Ut,[2,87]),t(et,[2,57]),{51:[1,263],67:$t,82:219,116:Ft,117:zt,118:Kt},t(et,[2,64]),t(et,[2,59]),t(et,[2,60]),t(et,[2,61]),{109:[1,264]},t(et,[2,63]),t(et,[2,65]),{66:[1,265],67:$t,82:219,116:Ft,117:zt,118:Kt},t(et,[2,67]),t(et,[2,68]),t(et,[2,70]),t(et,[2,69]),t(et,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(it,[2,78]),{31:[1,266],67:$t,82:219,116:Ft,117:zt,118:Kt},{6:11,7:12,8:o,9:s,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,267],33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:b,87:x,88:T,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L,121:I,122:D,123:N,124:M,125:O},t(tt,[2,53]),{43:268,44:g,45:40,47:41,60:m,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L},t(Mt,[2,121],{106:te}),t(ee,[2,130],{108:270,10:Gt,60:Yt,84:Vt,105:Ht,109:Xt,110:Zt,111:Qt,112:Jt}),t(re,[2,132]),t(re,[2,134]),t(re,[2,135]),t(re,[2,136]),t(re,[2,137]),t(re,[2,138]),t(re,[2,139]),t(re,[2,140]),t(re,[2,141]),t(Mt,[2,122],{106:te}),{10:[1,271]},t(Mt,[2,123],{106:te}),{10:[1,272]},t(Wt,[2,129]),t(Mt,[2,105],{106:te}),t(Mt,[2,106],{113:113,44:g,60:m,89:w,102:k,105:C,106:E,109:S,111:_,114:A,115:R,116:L}),t(Mt,[2,110]),t(Mt,[2,112],{10:[1,273]}),t(Mt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:B,9:F,11:z,21:278},t(P,[2,34]),t(tt,[2,52]),{10:Gt,60:Yt,84:Vt,105:Ht,107:279,108:243,109:Xt,110:Zt,111:Qt,112:Jt},t(re,[2,133]),{14:q,44:W,60:U,89:G,101:280,105:Y,106:V,109:H,111:X,114:Z,115:Q,116:J,120:88},{14:q,44:W,60:U,89:G,101:281,105:Y,106:V,109:H,111:X,114:Z,115:Q,116:J,120:88},{98:[1,282]},t(Mt,[2,120]),t(et,[2,58]),{30:283,67:$t,80:Pt,81:Bt,82:172,116:Ft,117:zt,118:Kt},t(et,[2,66]),t(It,a,{5:284}),t(ee,[2,131],{108:270,10:Gt,60:Yt,84:Vt,105:Ht,109:Xt,110:Zt,111:Qt,112:Jt}),t(Mt,[2,126],{120:168,10:[1,285],14:q,44:W,60:U,89:G,105:Y,106:V,109:H,111:X,114:Z,115:Q,116:J}),t(Mt,[2,127],{120:168,10:[1,286],14:q,44:W,60:U,89:G,105:Y,106:V,109:H,111:X,114:Z,115:Q,116:J}),t(Mt,[2,114]),{31:[1,287],67:$t,82:219,116:Ft,117:zt,118:Kt},{6:11,7:12,8:o,9:s,10:l,11:c,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,288],33:24,34:u,36:p,38:f,42:28,43:39,44:g,45:40,47:41,60:m,84:y,85:v,86:b,87:x,88:T,89:w,102:k,105:C,106:E,109:S,111:_,113:42,114:A,115:R,116:L,121:I,122:D,123:N,124:M,125:O},{10:Gt,60:Yt,84:Vt,92:289,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},{10:Gt,60:Yt,84:Vt,92:290,105:Ht,107:242,108:243,109:Xt,110:Zt,111:Qt,112:Jt},t(et,[2,62]),t(P,[2,33]),t(Mt,[2,124],{106:te}),t(Mt,[2,125],{106:te})],defaultActions:{},parseError:(0,d.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,d.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",l=0,c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,d.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(c=p.yyleng,s=p.yytext,l=p.yylineno,m=p.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,c,l,f.yy,w[1],i,a].concat(u))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},ie=function(){return{EOF:1,parseError:(0,d.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,d.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,d.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,d.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K2)(function(){return this._more=!0,this},"more"),reject:(0,d.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K2)(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,"")},"upcomingInput"),showPosition:(0,d.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,d.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,d.K2)(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const r=/\n\s*/g;return e.yytext=e.yytext.replace(r,"<br/>"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:case 103:return 111;case 63:return 46;case 64:return 60;case 65:case 104:return 44;case 66:return 8;case 67:return 106;case 68:case 102:return 115;case 69:case 72:case 75:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:case 74:case 77:return 119;case 73:return this.pushState("thickEdgeText"),75;case 76:return this.pushState("dottedEdgeText"),75;case 78:return 77;case 79:return this.popState(),53;case 80:case 116:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}}}();function ae(){this.yy={}}return ne.lexer=ie,(0,d.K2)(ae,"Parser"),ae.prototype=ne,ne.Parser=ae,new ae}();b.parser=b;var x=b,T=Object.assign({},x);T.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return x.parse(e)};var w=T,k=(0,d.K2)((t,e)=>{const r=m.A,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return g.A(n,i,a,e)},"fade"),C=(0,d.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${k(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n ${(0,n.o)()}\n`,"getStyles"),E={parser:w,get db(){return new y},renderer:v,styles:C,init:(0,d.K2)(t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,u.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,u.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}},4045(t,e,r){"use strict";r.d(e,{diagram:()=>Ft});var n=r(8221),i=r(1123),a=r(797),o=r(6750),s=r(4353),l=r(8313),c=r(445),h=r(7375),u=r(3522),d=r(1444),p=function(){var t=(0,a.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],o=[1,29],s=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],f=[1,11],g=[1,12],m=[1,13],y=[1,14],v=[1,15],b=[1,16],x=[1,19],T=[1,20],w=[1,21],k=[1,22],C=[1,23],E=[1,25],S=[1,35],_={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,a.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 6:case 7:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 8:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:n.TopAxis(),this.$=a[s].substr(8);break;case 20:n.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:n.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:n.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:n.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:n.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:n.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:n.addTask(a[s-1],a[s]),this.$="task";break;case 34:this.$=a[s-1],n.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],null),n.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-2],a[s-1]),n.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],n.setClickEvent(a[s-2],a[s],null),n.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-1],a[s]),n.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],n.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+" "+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 44:case 46:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:o,16:s,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:f,25:g,26:m,27:y,28:v,29:b,30:x,31:T,33:w,35:k,36:C,37:24,38:E,40:S},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:o,16:s,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:f,25:g,26:m,27:y,28:v,29:b,30:x,31:T,33:w,35:k,36:C,37:24,38:E,40:S},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,a.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,a.K2)(function(t){var e=this,r=[0],n=[],i=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=o.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;o.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,o.length=o.length-t},"popStack"),(0,a.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),o.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,o].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),o=o.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),o.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},A=function(){return{EOF:1,parseError:(0,a.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(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,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function R(){this.yy={}}return _.lexer=A,(0,a.K2)(R,"Parser"),R.prototype=_,_.Parser=R,new R}();p.parser=p;var f=p;s.extend(l),s.extend(c),s.extend(h);var g,m,y={friday:5,saturday:6},v="",b="",x=void 0,T="",w=[],k=[],C=new Map,E=[],S=[],_="",A="",R=["active","done","crit","milestone","vert"],L=[],I="",D=!1,N=!1,M="sunday",O="saturday",$=0,P=(0,a.K2)(function(){E=[],S=[],_="",L=[],mt=0,g=void 0,m=void 0,xt=[],v="",b="",A="",x=void 0,T="",w=[],k=[],D=!1,N=!1,$=0,C=new Map,I="",(0,i.IU)(),M="sunday",O="saturday"},"clear"),B=(0,a.K2)(function(t){I=t},"setDiagramId"),F=(0,a.K2)(function(t){b=t},"setAxisFormat"),z=(0,a.K2)(function(){return b},"getAxisFormat"),K=(0,a.K2)(function(t){x=t},"setTickInterval"),j=(0,a.K2)(function(){return x},"getTickInterval"),q=(0,a.K2)(function(t){T=t},"setTodayMarker"),W=(0,a.K2)(function(){return T},"getTodayMarker"),U=(0,a.K2)(function(t){v=t},"setDateFormat"),G=(0,a.K2)(function(){D=!0},"enableInclusiveEndDates"),Y=(0,a.K2)(function(){return D},"endDatesAreInclusive"),V=(0,a.K2)(function(){N=!0},"enableTopAxis"),H=(0,a.K2)(function(){return N},"topAxisEnabled"),X=(0,a.K2)(function(t){A=t},"setDisplayMode"),Z=(0,a.K2)(function(){return A},"getDisplayMode"),Q=(0,a.K2)(function(){return v},"getDateFormat"),J=(0,a.K2)(function(t){w=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),tt=(0,a.K2)(function(){return w},"getIncludes"),et=(0,a.K2)(function(t){k=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),rt=(0,a.K2)(function(){return k},"getExcludes"),nt=(0,a.K2)(function(){return C},"getLinks"),it=(0,a.K2)(function(t){_=t,E.push(t)},"addSection"),at=(0,a.K2)(function(){return E},"getSections"),ot=(0,a.K2)(function(){let t=Et();let e=0;for(;!t&&e<10;)t=Et(),e++;return S=xt},"getTasks"),st=(0,a.K2)(function(t,e,r,n){const i=t.format(e.trim()),a=t.format("YYYY-MM-DD");return!n.includes(i)&&!n.includes(a)&&(!(!r.includes("weekends")||t.isoWeekday()!==y[O]&&t.isoWeekday()!==y[O]+1)||(!!r.includes(t.format("dddd").toLowerCase())||(r.includes(i)||r.includes(a))))},"isInvalidDate"),lt=(0,a.K2)(function(t){M=t},"setWeekday"),ct=(0,a.K2)(function(){return M},"getWeekday"),ht=(0,a.K2)(function(t){O=t},"setWeekend"),ut=(0,a.K2)(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i,a;i=t.startTime instanceof Date?s(t.startTime):s(t.startTime,e,!0),i=i.add(1,"d"),a=t.endTime instanceof Date?s(t.endTime):s(t.endTime,e,!0);const[o,l]=dt(i,a,e,r,n);t.endTime=o.toDate(),t.renderEndTime=l},"checkTaskDates"),dt=(0,a.K2)(function(t,e,r,n,i){let a=!1,o=null;const s=e.add(1e4,"d");for(;t<=e;){if(a||(o=e.toDate()),a=st(t,r,n,i),a&&(e=e.add(1,"d"))>s)throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,o]},"fixTaskDates"),pt=(0,a.K2)(function(t,e,r){r=r.trim();if((0,a.K2)(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(r))return new Date(Number(r));const n=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(const r of n.groups.ids.split(" ")){let e=kt(r);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let i=s(r,e.trim(),!0);if(i.isValid())return i.toDate();{a.Rm.debug("Invalid date:"+r),a.Rm.debug("With date format:"+e.trim());const t=new Date(r);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+r);return t}},"getStartDate"),ft=(0,a.K2)(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),gt=(0,a.K2)(function(t,e,r,n=!1){r=r.trim();const i=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(const r of i.groups.ids.split(" ")){let e=kt(r);void 0!==e&&(!t||e.startTime<t.startTime)&&(t=e)}if(t)return t.startTime;const e=new Date;return e.setHours(0,0,0,0),e}let a=s(r,e.trim(),!0);if(a.isValid())return n&&(a=a.add(1,"d")),a.toDate();let o=s(t);const[l,c]=ft(r);if(!Number.isNaN(l)){const t=o.add(l,c);t.isValid()&&(o=t)}return o.toDate()},"getEndDate"),mt=0,yt=(0,a.K2)(function(t){return void 0===t?"task"+(mt+=1):t},"parseId"),vt=(0,a.K2)(function(t,e){let r;r=":"===e.substr(0,1)?e.substr(1,e.length):e;const n=r.split(","),i={};Nt(n,i,R);for(let o=0;o<n.length;o++)n[o]=n[o].trim();let a="";switch(n.length){case 1:i.id=yt(),i.startTime=t.endTime,a=n[0];break;case 2:i.id=yt(),i.startTime=pt(void 0,v,n[0]),a=n[1];break;case 3:i.id=yt(n[0]),i.startTime=pt(void 0,v,n[1]),a=n[2]}return a&&(i.endTime=gt(i.startTime,v,a,D),i.manualEndTime=s(a,"YYYY-MM-DD",!0).isValid(),ut(i,v,k,w)),i},"compileData"),bt=(0,a.K2)(function(t,e){let r;r=":"===e.substr(0,1)?e.substr(1,e.length):e;const n=r.split(","),i={};Nt(n,i,R);for(let a=0;a<n.length;a++)n[a]=n[a].trim();switch(n.length){case 1:i.id=yt(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=yt(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=yt(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]}}return i},"parseData"),xt=[],Tt={},wt=(0,a.K2)(function(t,e){const r={section:_,type:_,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=bt(m,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=m,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,r.order=$,$++;const i=xt.push(r);m=r.id,Tt[r.id]=i-1},"addTask"),kt=(0,a.K2)(function(t){const e=Tt[t];return xt[e]},"findTaskById"),Ct=(0,a.K2)(function(t,e){const r={section:_,type:_,description:t,task:t,classes:[]},n=vt(g,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,r.vert=n.vert,g=r,S.push(r)},"addTaskOrg"),Et=(0,a.K2)(function(){const t=(0,a.K2)(function(t){const e=xt[t];let r="";switch(xt[t].raw.startTime.type){case"prevTaskEnd":{const t=kt(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":r=pt(void 0,v,xt[t].raw.startTime.startData),r&&(xt[t].startTime=r)}return xt[t].startTime&&(xt[t].endTime=gt(xt[t].startTime,v,xt[t].raw.endTime.data,D),xt[t].endTime&&(xt[t].processed=!0,xt[t].manualEndTime=s(xt[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ut(xt[t],v,k,w))),xt[t].processed},"compileTask");let e=!0;for(const[r,n]of xt.entries())t(r),e=e&&n.processed;return e},"compileTasks"),St=(0,a.K2)(function(t,e){let r=e;"loose"!==(0,i.D7)().securityLevel&&(r=(0,o.J)(e)),t.split(",").forEach(function(t){void 0!==kt(t)&&(Rt(t,()=>{window.open(r,"_self")}),C.set(t,r))}),_t(t,"clickable")},"setLink"),_t=(0,a.K2)(function(t,e){t.split(",").forEach(function(t){let r=kt(t);void 0!==r&&r.classes.push(e)})},"setClass"),At=(0,a.K2)(function(t,e,r){if("loose"!==(0,i.D7)().securityLevel)return;if(void 0===e)return;let a=[];if("string"==typeof r){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<a.length;t++){let e=a[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),a[t]=e}}0===a.length&&a.push(t),void 0!==kt(t)&&Rt(t,()=>{n._K.runFunc(e,...a)})},"setClickFun"),Rt=(0,a.K2)(function(t,e){L.push(function(){const r=I?`${I}-${t}`:t,n=document.querySelector(`[id="${r}"]`);null!==n&&n.addEventListener("click",function(){e()})},function(){const r=I?`${I}-${t}`:t,n=document.querySelector(`[id="${r}-text"]`);null!==n&&n.addEventListener("click",function(){e()})})},"pushFun"),Lt=(0,a.K2)(function(t,e,r){t.split(",").forEach(function(t){At(t,e,r)}),_t(t,"clickable")},"setClickEvent"),It=(0,a.K2)(function(t){L.forEach(function(e){e(t)})},"bindFunctions"),Dt={getConfig:(0,a.K2)(()=>(0,i.D7)().gantt,"getConfig"),clear:P,setDateFormat:U,getDateFormat:Q,enableInclusiveEndDates:G,endDatesAreInclusive:Y,enableTopAxis:V,topAxisEnabled:H,setAxisFormat:F,getAxisFormat:z,setTickInterval:K,getTickInterval:j,setTodayMarker:q,getTodayMarker:W,setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,setDiagramId:B,setDisplayMode:X,getDisplayMode:Z,setAccDescription:i.EI,getAccDescription:i.m7,addSection:it,getSections:at,getTasks:ot,addTask:wt,findTaskById:kt,addTaskOrg:Ct,setIncludes:J,getIncludes:tt,setExcludes:et,getExcludes:rt,setClickEvent:Lt,setLink:St,getLinks:nt,bindFunctions:It,parseDuration:ft,isInvalidDate:st,setWeekday:lt,getWeekday:ct,setWeekend:ht};function Nt(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(r){const i=new RegExp("^\\s*"+r+"\\s*$");t[0].match(i)&&(e[r]=!0,t.shift(1),n=!0)})}(0,a.K2)(Nt,"getTaskTags"),s.extend(u);var Mt,Ot=(0,a.K2)(function(){a.Rm.debug("Something is calling, setConf, remove the call")},"setConf"),$t={monday:d.ABi,tuesday:d.PGu,wednesday:d.GuW,thursday:d.Mol,friday:d.TUC,saturday:d.rGn,sunday:d.YPH},Pt=(0,a.K2)((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(const a of n)for(let t=0;t<r.length;t++)if(a.startTime>=r[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),Bt=1e4,Ft={parser:f,db:Dt,renderer:{setConf:Ot,draw:(0,a.K2)(function(t,e,r,n){const o=(0,i.D7)().gantt;n.db.setDiagramId(e);const l=(0,i.D7)().securityLevel;let c;"sandbox"===l&&(c=(0,d.Ltv)("#i"+e));const h="sandbox"===l?(0,d.Ltv)(c.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),u="sandbox"===l?c.nodes()[0].contentDocument:document,p=u.getElementById(e);void 0===(Mt=p.parentElement.offsetWidth)&&(Mt=1200),void 0!==o.useWidth&&(Mt=o.useWidth);const f=n.db.getTasks();let g=[];for(const i of f)g.push(i.type);g=A(g);const m={};let y=2*o.topPadding;if("compact"===n.db.getDisplayMode()||"compact"===o.displayMode){const t={};for(const r of f)void 0===t[r.section]?t[r.section]=[r]:t[r.section].push(r);let e=0;for(const r of Object.keys(t)){const n=Pt(t[r],e)+1;e+=n,y+=n*(o.barHeight+o.barGap),m[r]=n}}else{y+=f.length*(o.barHeight+o.barGap);for(const t of g)m[t]=f.filter(e=>e.type===t).length}p.setAttribute("viewBox","0 0 "+Mt+" "+y);const v=h.select(`[id="${e}"]`),b=(0,d.w7C)().domain([(0,d.jkA)(f,function(t){return t.startTime}),(0,d.T9B)(f,function(t){return t.endTime})]).rangeRound([0,Mt-o.leftPadding-o.rightPadding]);function x(t,e){const r=t.startTime,n=e.startTime;let i=0;return r>n?i=1:r<n&&(i=-1),i}function T(t,e,r){const i=o.barHeight,a=i+o.barGap,s=o.topPadding,l=o.leftPadding,c=(0,d.m4Y)().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(d.bEH);k(a,s,l,e,r,t,n.db.getExcludes(),n.db.getIncludes()),E(l,s,e,r),w(t,a,s,l,i,c,e),S(a,s),_(l,s,e,r)}function w(t,r,a,s,l,c,h){t.sort((t,e)=>t.vert===e.vert?0:t.vert?1:-1);const u=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));v.append("g").selectAll("rect").data(u).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+a-2}).attr("width",function(){return h-o.rightPadding/2}).attr("height",r).attr("class",function(t){for(const[e,r]of g.entries())if(t.type===r)return"section section"+e%o.numberSectionStyles;return"section section0"}).enter();const p=v.append("g").selectAll("rect").data(t).enter(),m=n.db.getLinks();p.append("rect").attr("id",function(t){return e+"-"+t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+s+.5*(b(t.endTime)-b(t.startTime))-.5*l:b(t.startTime)+s}).attr("y",function(t,e){return e=t.order,t.vert?o.gridLineStartPadding:e*r+a}).attr("width",function(t){return t.milestone?l:t.vert?.08*l:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",function(t){return t.vert?f.length*(o.barHeight+o.barGap)+2*o.barHeight:l}).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+s+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+a+.5*l).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let r=0;for(const[i,a]of g.entries())t.type===a&&(r=i%o.numberSectionStyles);let n="";return t.active?t.crit?n+=" activeCrit":n=" active":t.done?n=t.crit?" doneCrit":" done":t.crit&&(n+=" crit"),0===n.length&&(n=" task"),t.milestone&&(n=" milestone "+n),t.vert&&(n=" vert "+n),n+=r,n+=" "+e,"task"+n}),p.append("text").attr("id",function(t){return e+"-"+t.id+"-text"}).text(function(t){return t.task}).attr("font-size",o.fontSize).attr("x",function(t){let e=b(t.startTime),r=b(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(b(t.endTime)-b(t.startTime))-.5*l,r=e+l),t.vert)return b(t.startTime)+s;const n=this.getBBox().width;return n>r-e?r+n+1.5*o.leftPadding>h?e+s-5:r+s+5:(r-e)/2+e+s}).attr("y",function(t,e){return t.vert?o.gridLineStartPadding+f.length*(o.barHeight+o.barGap)+60:t.order*r+o.barHeight/2+(o.fontSize/2-2)+a}).attr("text-height",l).attr("class",function(t){const e=b(t.startTime);let r=b(t.endTime);t.milestone&&(r=e+l);const n=this.getBBox().width;let i="";t.classes.length>0&&(i=t.classes.join(" "));let a=0;for(const[l,c]of g.entries())t.type===c&&(a=l%o.numberSectionStyles);let s="";return t.active&&(s=t.crit?"activeCritText"+a:"activeText"+a),t.done?s=t.crit?s+" doneCritText"+a:s+" doneText"+a:t.crit&&(s=s+" critText"+a),t.milestone&&(s+=" milestoneText"),t.vert&&(s+=" vertText"),n>r-e?r+n+1.5*o.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+s:i+" taskTextOutsideRight taskTextOutside"+a+" "+s+" width-"+n:i+" taskText taskText"+a+" "+s+" width-"+n});if("sandbox"===(0,i.D7)().securityLevel){let t;t=(0,d.Ltv)("#i"+e);const r=t.nodes()[0].contentDocument;p.filter(function(t){return m.has(t.id)}).each(function(t){var n=r.querySelector("#"+CSS.escape(e+"-"+t.id)),i=r.querySelector("#"+CSS.escape(e+"-"+t.id+"-text"));const a=n.parentNode;var o=r.createElement("a");o.setAttribute("xlink:href",m.get(t.id)),o.setAttribute("target","_top"),a.appendChild(o),o.appendChild(n),o.appendChild(i)})}}function k(t,r,i,l,c,h,u,d){if(0===u.length&&0===d.length)return;let p,f;for(const{startTime:e,endTime:n}of h)(void 0===p||e<p)&&(p=e),(void 0===f||n>f)&&(f=n);if(!p||!f)return;if(s(f).diff(s(p),"year")>5)return void a.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const g=n.db.getDateFormat(),m=[];let y=null,x=s(p);for(;x.valueOf()<=f;)n.db.isInvalidDate(x,g,u,d)?y?y.end=x:y={start:x,end:x}:y&&(m.push(y),y=null),x=x.add(1,"d");v.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",t=>e+"-exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>b(t.start.startOf("day"))+i).attr("y",o.gridLineStartPadding).attr("width",t=>b(t.end.endOf("day"))-b(t.start.startOf("day"))).attr("height",c-r-o.gridLineStartPadding).attr("transform-origin",function(e,r){return(b(e.start)+i+.5*(b(e.end)-b(e.start))).toString()+"px "+(r*t+.5*c).toString()+"px"}).attr("class","exclude-range")}function C(t,e,r,n){if(r<=0||t>e)return 1/0;const i=e-t,a=s.duration({[n??"day"]:r}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}function E(t,e,r,i){const s=n.db.getDateFormat(),l=n.db.getAxisFormat();let c;c=l||("D"===s?"%d":o.axisFormat??"%Y-%m-%d");let h=(0,d.l78)(b).tickSize(-i+e+o.gridLineStartPadding).tickFormat((0,d.DCK)(c));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||o.tickInterval);if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)a.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],r=n.db.getWeekday()||o.weekday,i=b.domain(),s=C(i[0],i[1],t,e);if(s>Bt)a.Rm.warn(`The tick interval "${t}${e}" would generate ${s} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":h.ticks(d.t6C.every(t));break;case"second":h.ticks(d.ucG.every(t));break;case"minute":h.ticks(d.wXd.every(t));break;case"hour":h.ticks(d.Agd.every(t));break;case"day":h.ticks(d.UAC.every(t));break;case"week":h.ticks($t[r].every(t));break;case"month":h.ticks(d.Ui6.every(t))}}}if(v.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||o.topAxis){let r=(0,d.tlR)(b).tickSize(-i+e+o.gridLineStartPadding).tickFormat((0,d.DCK)(c));if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)a.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],i=n.db.getWeekday()||o.weekday,a=b.domain();if(C(a[0],a[1],t,e)<=Bt)switch(e){case"millisecond":r.ticks(d.t6C.every(t));break;case"second":r.ticks(d.ucG.every(t));break;case"minute":r.ticks(d.wXd.every(t));break;case"hour":r.ticks(d.Agd.every(t));break;case"day":r.ticks(d.UAC.every(t));break;case"week":r.ticks($t[i].every(t));break;case"month":r.ticks(d.Ui6.every(t))}}}v.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(r).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function S(t,e){let r=0;const n=Object.keys(m).map(t=>[t,m[t]]);v.append("g").selectAll("text").data(n).enter().append(function(t){const e=t[0].split(i.Y2.lineBreakRegex),r=-(e.length-1)/2,n=u.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",r+"em");for(const[i,a]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),i>0&&t.setAttribute("dy","1em"),t.textContent=a,n.appendChild(t)}return n}).attr("x",10).attr("y",function(i,a){if(!(a>0))return i[1]*t/2+e;for(let o=0;o<a;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("font-size",o.sectionFontSize).attr("class",function(t){for(const[e,r]of g.entries())if(t[0]===r)return"sectionTitle sectionTitle"+e%o.numberSectionStyles;return"sectionTitle"})}function _(t,e,r,i){const a=n.db.getTodayMarker();if("off"===a)return;const s=v.append("g").attr("class","today"),l=new Date,c=s.append("line");c.attr("x1",b(l)+t).attr("x2",b(l)+t).attr("y1",o.titleTopMargin).attr("y2",i-o.titleTopMargin).attr("class","today"),""!==a&&c.attr("style",a.replace(/,/g,";"))}function A(t){const e={},r=[];for(let n=0,i=t.length;n<i;++n)Object.prototype.hasOwnProperty.call(e,t[n])||(e[t[n]]=!0,r.push(t[n]));return r}(0,a.K2)(x,"taskCompare"),f.sort(x),T(f,Mt,y),(0,i.a$)(v,y,Mt,o.useMaxWidth),v.append("text").text(n.db.getDiagramTitle()).attr("x",Mt/2).attr("y",o.titleTopMargin).attr("class","titleText"),(0,a.K2)(T,"makeGantt"),(0,a.K2)(w,"drawRects"),(0,a.K2)(k,"drawExcludeDays"),(0,a.K2)(C,"getEstimatedTickCount"),(0,a.K2)(E,"makeGrid"),(0,a.K2)(S,"vertLabels"),(0,a.K2)(_,"drawToday"),(0,a.K2)(A,"checkUnique")},"draw")},styles:(0,a.K2)(t=>`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done task text displayed outside the bar sits against the diagram background,\n not against the done-task bar, so it must use the outside/contrast color. */\n .doneText0.taskTextOutsideLeft,\n .doneText0.taskTextOutsideRight,\n .doneText1.taskTextOutsideLeft,\n .doneText1.taskTextOutsideRight,\n .doneText2.taskTextOutsideLeft,\n .doneText2.taskTextOutsideRight,\n .doneText3.taskTextOutsideLeft,\n .doneText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done-crit task text outside the bar — same reasoning as doneText above. */\n .doneCritText0.taskTextOutsideLeft,\n .doneCritText0.taskTextOutsideRight,\n .doneCritText1.taskTextOutsideLeft,\n .doneCritText1.taskTextOutsideRight,\n .doneCritText2.taskTextOutsideLeft,\n .doneCritText2.taskTextOutsideRight,\n .doneCritText3.taskTextOutsideLeft,\n .doneCritText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")}},1795(t,e,r){"use strict";r.d(e,{diagram:()=>Lt});var n=r(5871),i=r(2938),a=r(8221),o=r(1123),s=r(797),l=r(8731),c=r(1444),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},u=o.UI.gitGraph,d=(0,s.K2)(()=>(0,a.$t)({...u,...(0,o.zj)().gitGraph}),"getConfig"),p=new i.m(()=>{const t=d(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function f(){return(0,a.yT)({length:7})}function g(t,e){const r=Object.create(null);return t.reduce((t,n)=>{const i=e(n);return r[i]||(r[i]=!0,t.push(n)),t},[])}(0,s.K2)(f,"getID"),(0,s.K2)(g,"uniqBy");var m=(0,s.K2)(function(t){p.records.direction=t},"setDirection"),y=(0,s.K2)(function(t){s.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{p.records.options=JSON.parse(t)}catch(e){s.Rm.error("error while parsing gitGraph options",e.message)}},"setOptions"),v=(0,s.K2)(function(){return p.records.options},"getOptions"),b=(0,s.K2)(function(t){let e=t.msg,r=t.id;const n=t.type;let i=t.tags;s.Rm.info("commit",e,r,n,i),s.Rm.debug("Entering commit:",e,r,n,i);const a=d();r=o.Y2.sanitizeText(r,a),e=o.Y2.sanitizeText(e,a),i=i?.map(t=>o.Y2.sanitizeText(t,a));const l={id:r||p.records.seq+"-"+f(),message:e,seq:p.records.seq++,type:n??h.NORMAL,tags:i??[],parents:null==p.records.head?[]:[p.records.head.id],branch:p.records.currBranch};p.records.head=l,s.Rm.info("main branch",a.mainBranchName),p.records.commits.has(l.id)&&s.Rm.warn(`Commit ID ${l.id} already exists`),p.records.commits.set(l.id,l),p.records.branches.set(p.records.currBranch,l.id),s.Rm.debug("in pushCommit "+l.id)},"commit"),x=(0,s.K2)(function(t){let e=t.name;const r=t.order;if(e=o.Y2.sanitizeText(e,d()),p.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);p.records.branches.set(e,null!=p.records.head?p.records.head.id:null),p.records.branchConfig.set(e,{name:e,order:r}),k(e),s.Rm.debug("in createBranch")},"branch"),T=(0,s.K2)(t=>{let e=t.branch,r=t.id;const n=t.type,i=t.tags,a=d();e=o.Y2.sanitizeText(e,a),r&&(r=o.Y2.sanitizeText(r,a));const l=p.records.branches.get(p.records.currBranch),c=p.records.branches.get(e),u=l?p.records.commits.get(l):void 0,g=c?p.records.commits.get(c):void 0;if(u&&g&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(p.records.currBranch===e){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(void 0===u||!u){const t=new Error(`Incorrect usage of "merge". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},t}if(!p.records.branches.has(e)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},t}if(void 0===g||!g){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},t}if(u===g){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},t}if(r&&p.records.commits.has(r)){const t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw t.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},t}const m=c||"",y={id:r||`${p.records.seq}-${f()}`,message:`merged branch ${e} into ${p.records.currBranch}`,seq:p.records.seq++,parents:null==p.records.head?[]:[p.records.head.id,m],branch:p.records.currBranch,type:h.MERGE,customType:n,customId:!!r,tags:i??[]};p.records.head=y,p.records.commits.set(y.id,y),p.records.branches.set(p.records.currBranch,y.id),s.Rm.debug(p.records.branches),s.Rm.debug("in mergeBranch")},"merge"),w=(0,s.K2)(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;s.Rm.debug("Entering cherryPick:",e,r,n);const a=d();if(e=o.Y2.sanitizeText(e,a),r=o.Y2.sanitizeText(r,a),n=n?.map(t=>o.Y2.sanitizeText(t,a)),i=o.Y2.sanitizeText(i,a),!e||!p.records.commits.has(e)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const l=p.records.commits.get(e);if(void 0===l||!l)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(l.parents)||!l.parents.includes(i))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const c=l.branch;if(l.type===h.MERGE&&!i){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!r||!p.records.commits.has(r)){if(c===p.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const t=p.records.branches.get(p.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const a=p.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${p.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},t}const o={id:p.records.seq+"-"+f(),message:`cherry-picked ${l?.message} into ${p.records.currBranch}`,seq:p.records.seq++,parents:null==p.records.head?[]:[p.records.head.id,l.id],branch:p.records.currBranch,type:h.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${l.id}${l.type===h.MERGE?`|parent:${i}`:""}`]};p.records.head=o,p.records.commits.set(o.id,o),p.records.branches.set(p.records.currBranch,o.id),s.Rm.debug(p.records.branches),s.Rm.debug("in cherryPick")}},"cherryPick"),k=(0,s.K2)(function(t){if(t=o.Y2.sanitizeText(t,d()),!p.records.branches.has(t)){const 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}`,expected:[`branch ${t}`]},e}{p.records.currBranch=t;const e=p.records.branches.get(p.records.currBranch);p.records.head=void 0!==e&&e?p.records.commits.get(e)??null:null}},"checkout");function C(t,e,r){const n=t.indexOf(e);-1===n?t.push(r):t.splice(n,1,r)}function E(t){const e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]);let r="";t.forEach(function(t){r+=t===e?"\t*":"\t|"});const n=[r,e.id,e.seq];for(const i in p.records.branches)p.records.branches.get(i)===e.id&&n.push(i);if(s.Rm.debug(n.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){const r=p.records.commits.get(e.parents[0]);C(t,e,r),e.parents[1]&&t.push(p.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;if(e.parents[0]){const r=p.records.commits.get(e.parents[0]);C(t,e,r)}}E(t=g(t,t=>t.id))}(0,s.K2)(C,"upsert"),(0,s.K2)(E,"prettyPrintCommitHistory");var S=(0,s.K2)(function(){s.Rm.debug(p.records.commits);E([I()[0]])},"prettyPrint"),_=(0,s.K2)(function(){p.reset(),(0,o.IU)()},"clear"),A=(0,s.K2)(function(){return[...p.records.branchConfig.values()].map((t,e)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${e}`)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),R=(0,s.K2)(function(){return p.records.branches},"getBranches"),L=(0,s.K2)(function(){return p.records.commits},"getCommits"),I=(0,s.K2)(function(){const t=[...p.records.commits.values()];return t.forEach(function(t){s.Rm.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),D={commitType:h,getConfig:d,setDirection:m,setOptions:y,getOptions:v,commit:b,branch:x,merge:T,cherryPick:w,checkout:k,prettyPrint:S,clear:_,getBranchesAsObjArray:A,getBranches:R,getCommits:L,getCommitsArray:I,getCurrentBranch:(0,s.K2)(function(){return p.records.currBranch},"getCurrentBranch"),getDirection:(0,s.K2)(function(){return p.records.direction},"getDirection"),getHead:(0,s.K2)(function(){return p.records.head},"getHead"),setAccTitle:o.SV,getAccTitle:o.iN,getAccDescription:o.m7,setAccDescription:o.EI,setDiagramTitle:o.ke,getDiagramTitle:o.ab},N=(0,s.K2)((t,e)=>{(0,n.S)(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)M(r,e)},"populate"),M=(0,s.K2)((t,e)=>{const r={Commit:(0,s.K2)(t=>e.commit(O(t)),"Commit"),Branch:(0,s.K2)(t=>e.branch($(t)),"Branch"),Merge:(0,s.K2)(t=>e.merge(P(t)),"Merge"),Checkout:(0,s.K2)(t=>e.checkout(B(t)),"Checkout"),CherryPicking:(0,s.K2)(t=>e.cherryPick(F(t)),"CherryPicking")}[t.$type];r?r(t):s.Rm.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),O=(0,s.K2)(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0}),"parseCommit"),$=(0,s.K2)(t=>({name:t.name,order:t.order??0}),"parseBranch"),P=(0,s.K2)(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),B=(0,s.K2)(t=>t.branch,"parseCheckout"),F=(0,s.K2)(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),z={parse:(0,s.K2)(async t=>{const e=await(0,l.qg)("gitGraph",t);s.Rm.debug(e),N(e,D)},"parse")};var K=10,j=40,q=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),W=new Set(["redux-color","redux-dark-color"]),U=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),G=(0,s.K2)((t,e,r=!1)=>r&&t>0?(t-1)%(e-1)+1:t%e,"calcColorIndex"),Y=new Map,V=new Map,H=new Map,X=[],Z=0,Q="LR",J=(0,s.K2)(()=>{Y.clear(),V.clear(),H.clear(),Z=0,X=[],Q="LR"},"clear"),tt=(0,s.K2)(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=t.trim(),e.appendChild(r)}),e},"drawText"),et=(0,s.K2)(t=>{let e,r,n;return"BT"===Q?(r=(0,s.K2)((t,e)=>t<=e,"comparisonFunc"),n=1/0):(r=(0,s.K2)((t,e)=>t>=e,"comparisonFunc"),n=0),t.forEach(t=>{const i="TB"===Q||"BT"==Q?V.get(t)?.y:V.get(t)?.x;void 0!==i&&r(i,n)&&(e=t,n=i)}),e},"findClosestParent"),rt=(0,s.K2)(t=>{let e="",r=1/0;return t.forEach(t=>{const n=V.get(t).y;n<=r&&(e=t,r=n)}),e||void 0},"findClosestParentBT"),nt=(0,s.K2)((t,e,r)=>{let n=r,i=r;const a=[];t.forEach(t=>{const r=e.get(t);if(!r)throw new Error(`Commit not found for key ${t}`);r.parents.length?(n=at(r),i=Math.max(n,i)):a.push(r),ot(r,n)}),n=i,a.forEach(t=>{st(t,n,r)}),t.forEach(t=>{const r=e.get(t);if(r?.parents.length){const t=rt(r.parents);n=V.get(t).y-j,n<=i&&(i=n);const e=Y.get(r.branch).pos,a=n-K;V.set(r.id,{x:e,y:a})}})},"setParallelBTPos"),it=(0,s.K2)(t=>{const e=et(t.parents.filter(t=>null!==t));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const r=V.get(e)?.y;if(void 0===r)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),at=(0,s.K2)(t=>it(t)+j,"calculateCommitPosition"),ot=(0,s.K2)((t,e)=>{const r=Y.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);const n=r.pos,i=e+K;return V.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),st=(0,s.K2)((t,e,r)=>{const n=Y.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const i=e+r,a=n.pos;V.set(t.id,{x:a,y:i})},"setRootPosition"),lt=(0,s.K2)((t,e,r,n,i,a)=>{const{theme:s}=(0,o.D7)(),l=q.has(s??""),c=W.has(s??""),u=U.has(s??"");if(a===h.HIGHLIGHT)t.append("rect").attr("x",r.x-10+(l?3:0)).attr("y",r.y-10+(l?3:0)).attr("width",l?14:20).attr("height",l?14:20).attr("class",`commit ${e.id} commit-highlight${G(i,8,c)} ${n}-outer`),t.append("rect").attr("x",r.x-6+(l?2:0)).attr("y",r.y-6+(l?2:0)).attr("width",l?8:12).attr("height",l?8:12).attr("class",`commit ${e.id} commit${G(i,8,c)} ${n}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",l?7:10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`);else{const o=t.append("circle");if(o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",l?7:10),o.attr("class",`commit ${e.id} commit${G(i,8,c)}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",r.x),a.attr("cy",r.y),a.attr("r",l?5:6),a.attr("class",`commit ${n} ${e.id} commit${G(i,8,c)}`)}if(a===h.REVERSE){const a=l?4:5;t.append("path").attr("d",`M ${r.x-a},${r.y-a}L${r.x+a},${r.y+a}M${r.x-a},${r.y+a}L${r.x+a},${r.y-a}`).attr("class",`commit ${n} ${e.id} commit${G(i,8,c)}`)}}},"drawCommitBullet"),ct=(0,s.K2)((t,e,r,n,i)=>{if(e.type!==h.CHERRY_PICK&&(e.customId&&e.type===h.MERGE||e.type!==h.MERGE)&&i.showCommitLabel){const a=t.append("g"),o=a.insert("rect").attr("class","commit-label-bkg"),s=a.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),l=s.node()?.getBBox();if(l&&(o.attr("x",r.posWithOffset-l.width/2-2).attr("y",r.y+13.5).attr("width",l.width+4).attr("height",l.height+4),"TB"===Q||"BT"===Q?(o.attr("x",r.x-(l.width+16+5)).attr("y",r.y-12),s.attr("x",r.x-(l.width+16)).attr("y",r.y+l.height-12)):s.attr("x",r.posWithOffset-l.width/2),i.rotateCommitLabel))if("TB"===Q||"BT"===Q)s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{const t=-7.5-(l.width+10)/25*9.5,e=10+l.width/25*8.5;a.attr("transform","translate("+t+", "+e+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),ht=(0,s.K2)((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,o=0;const s=[];for(const n of e.tags.reverse()){const e=t.insert("polygon"),l=t.append("circle"),c=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(n),h=c.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),o=Math.max(o,h.height),c.attr("x",r.posWithOffset-h.width/2),s.push({tag:c,hole:l,rect:e,yOffset:i}),i+=20}for(const{tag:t,hole:e,rect:l,yOffset:c}of s){const i=o/2,s=r.y-19.2-c;if(l.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-2},${s+2} \n ${n-a/2-2},${s-2}\n ${r.posWithOffset-a/2-4},${s-i-2}\n ${r.posWithOffset+a/2+4},${s-i-2}\n ${r.posWithOffset+a/2+4},${s+i+2}\n ${r.posWithOffset-a/2-4},${s+i+2}`),e.attr("cy",s).attr("cx",n-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===Q||"BT"===Q){const o=n+c;l.attr("class","tag-label-bkg").attr("points",`\n ${r.x},${o+2}\n ${r.x},${o-2}\n ${r.x+K},${o-i-2}\n ${r.x+K+a+4},${o-i-2}\n ${r.x+K+a+4},${o+i+2}\n ${r.x+K},${o+i+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),e.attr("cx",r.x+2).attr("cy",o).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),t.attr("x",r.x+5).attr("y",o+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),ut=(0,s.K2)(t=>{switch(t.customType??t.type){case h.NORMAL:return"commit-normal";case h.REVERSE:return"commit-reverse";case h.HIGHLIGHT:return"commit-highlight";case h.MERGE:return"commit-merge";case h.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),dt=(0,s.K2)((t,e,r,n)=>{const i={x:0,y:0};if(!(t.parents.length>0)){if("TB"===e)return 30;if("BT"===e){return(n.get(t.id)??i).y-j}return 0}{const r=et(t.parents);if(r){const a=n.get(r)??i;if("TB"===e)return a.y+j;if("BT"===e){return(n.get(t.id)??i).y-j}return a.x+j}}return 0},"calculatePosition"),pt=(0,s.K2)((t,e,r)=>{const n="BT"===Q&&r?e:e+K,i=Y.get(t.branch)?.pos,a="TB"===Q||"BT"===Q?Y.get(t.branch)?.pos:n;if(void 0===a||void 0===i)throw new Error(`Position were undefined for commit ${t.id}`);const s=q.has((0,o.D7)().theme??"");return{x:a,y:"TB"===Q||"BT"===Q?n:i+(s?7:-2),posWithOffset:n}},"getCommitPosition"),ft=(0,s.K2)((t,e,r,n)=>{const i=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let o="TB"===Q||"BT"===Q?30:0;const l=[...e.keys()],c=n.parallelCommits??!1,h=(0,s.K2)((t,r)=>{const n=e.get(t)?.seq,i=e.get(r)?.seq;return void 0!==n&&void 0!==i?n-i:0},"sortKeys");let u=l.sort(h);"BT"===Q&&(c&&nt(u,e,o),u=u.reverse()),u.forEach(t=>{const s=e.get(t);if(!s)throw new Error(`Commit not found for key ${t}`);c&&(o=dt(s,Q,o,V));const l=pt(s,o,c);if(r){const t=ut(s),e=s.customType??s.type,r=Y.get(s.branch)?.index??0;lt(i,s,l,t,r,e),ct(a,s,l,o,n),ht(a,s,l,o)}"TB"===Q||"BT"===Q?V.set(s.id,{x:l.x,y:l.posWithOffset}):V.set(s.id,{x:l.posWithOffset,y:l.y}),o="BT"===Q&&c?o+j:o+j+K,o>Z&&(Z=o)})},"drawCommits"),gt=(0,s.K2)((t,e,r,n,i)=>{const a=("TB"===Q||"BT"===Q?r.x<n.x:r.y<n.y)?e.branch:t.branch,o=(0,s.K2)(t=>t.branch===a,"isOnBranchToGetCurve"),l=(0,s.K2)(r=>r.seq>t.seq&&r.seq<e.seq,"isBetweenCommits");return[...i.values()].some(t=>l(t)&&o(t))},"shouldRerouteArrow"),mt=(0,s.K2)((t,e,r=0)=>{const n=t+Math.abs(t-e)/2;if(r>5)return n;if(X.every(t=>Math.abs(t-n)>=10))return X.push(n),n;const i=Math.abs(t-e);return mt(t,e-i/5,r+1)},"findLane"),yt=(0,s.K2)((t,e,r,n)=>{const{theme:i}=(0,o.D7)(),a=W.has(i??""),s=V.get(e.id),l=V.get(r.id);if(void 0===s||void 0===l)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);const c=gt(e,r,s,l,n);let u,d="",p="",f=0,g=0,m=Y.get(r.branch)?.index;if(r.type===h.MERGE&&e.id!==r.parents[0]&&(m=Y.get(e.branch)?.index),c){d="A 10 10, 0, 0, 0,",p="A 10 10, 0, 0, 1,",f=10,g=10;const t=s.y<l.y?mt(s.y,l.y):mt(l.y,s.y),r=s.x<l.x?mt(s.x,l.x):mt(l.x,s.x);"TB"===Q?s.x<l.x?u=`M ${s.x} ${s.y} L ${r-f} ${s.y} ${p} ${r} ${s.y+g} L ${r} ${l.y-f} ${d} ${r+g} ${l.y} L ${l.x} ${l.y}`:(m=Y.get(e.branch)?.index,u=`M ${s.x} ${s.y} L ${r+f} ${s.y} ${d} ${r} ${s.y+g} L ${r} ${l.y-f} ${p} ${r-g} ${l.y} L ${l.x} ${l.y}`):"BT"===Q?s.x<l.x?u=`M ${s.x} ${s.y} L ${r-f} ${s.y} ${d} ${r} ${s.y-g} L ${r} ${l.y+f} ${p} ${r+g} ${l.y} L ${l.x} ${l.y}`:(m=Y.get(e.branch)?.index,u=`M ${s.x} ${s.y} L ${r+f} ${s.y} ${p} ${r} ${s.y-g} L ${r} ${l.y+f} ${d} ${r-g} ${l.y} L ${l.x} ${l.y}`):s.y<l.y?u=`M ${s.x} ${s.y} L ${s.x} ${t-f} ${d} ${s.x+g} ${t} L ${l.x-f} ${t} ${p} ${l.x} ${t+g} L ${l.x} ${l.y}`:(m=Y.get(e.branch)?.index,u=`M ${s.x} ${s.y} L ${s.x} ${t+f} ${p} ${s.x+g} ${t} L ${l.x-f} ${t} ${d} ${l.x} ${t-g} L ${l.x} ${l.y}`)}else d="A 20 20, 0, 0, 0,",p="A 20 20, 0, 0, 1,",f=20,g=20,"TB"===Q?(s.x<l.x&&(u=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${l.y-f} ${d} ${s.x+g} ${l.y} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${l.x-f} ${s.y} ${p} ${l.x} ${s.y+g} L ${l.x} ${l.y}`),s.x>l.x&&(d="A 20 20, 0, 0, 0,",p="A 20 20, 0, 0, 1,",f=20,g=20,u=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${l.y-f} ${p} ${s.x-g} ${l.y} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${l.x+f} ${s.y} ${d} ${l.x} ${s.y+g} L ${l.x} ${l.y}`),s.x===l.x&&(u=`M ${s.x} ${s.y} L ${l.x} ${l.y}`)):"BT"===Q?(s.x<l.x&&(u=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${l.y+f} ${p} ${s.x+g} ${l.y} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${l.x-f} ${s.y} ${d} ${l.x} ${s.y-g} L ${l.x} ${l.y}`),s.x>l.x&&(d="A 20 20, 0, 0, 0,",p="A 20 20, 0, 0, 1,",f=20,g=20,u=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${l.y+f} ${d} ${s.x-g} ${l.y} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${l.x+f} ${s.y} ${p} ${l.x} ${s.y-g} L ${l.x} ${l.y}`),s.x===l.x&&(u=`M ${s.x} ${s.y} L ${l.x} ${l.y}`)):(s.y<l.y&&(u=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${s.x} ${s.y} L ${l.x-f} ${s.y} ${p} ${l.x} ${s.y+g} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${s.x} ${l.y-f} ${d} ${s.x+g} ${l.y} L ${l.x} ${l.y}`),s.y>l.y&&(u=r.type===h.MERGE&&e.id!==r.parents[0]?`M ${s.x} ${s.y} L ${l.x-f} ${s.y} ${d} ${l.x} ${s.y-g} L ${l.x} ${l.y}`:`M ${s.x} ${s.y} L ${s.x} ${l.y+f} ${p} ${s.x+g} ${l.y} L ${l.x} ${l.y}`),s.y===l.y&&(u=`M ${s.x} ${s.y} L ${l.x} ${l.y}`));if(void 0===u)throw new Error("Line definition not found");t.append("path").attr("d",u).attr("class","arrow arrow"+G(m,8,a))},"drawArrow"),vt=(0,s.K2)((t,e)=>{const r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(t=>{const n=e.get(t);n.parents&&n.parents.length>0&&n.parents.forEach(t=>{yt(r,e.get(t),n,e)})})},"drawArrows"),bt=(0,s.K2)((t,e,r,n)=>{const{look:i,theme:a,themeVariables:s}=(0,o.D7)(),{dropShadow:l,THEME_COLOR_LIMIT:c}=s,h=q.has(a??""),u=W.has(a??""),d=t.append("g");e.forEach((t,e)=>{const a=G(e,h?c:8,u),o=Y.get(t.name)?.pos;if(void 0===o)throw new Error(`Position not found for branch ${t.name}`);const s="TB"===Q||"BT"===Q?o:h?o+6+1:o-2,p=d.append("line");p.attr("x1",0),p.attr("y1",s),p.attr("x2",Z),p.attr("y2",s),p.attr("class","branch branch"+a),"TB"===Q?(p.attr("y1",30),p.attr("x1",o),p.attr("y2",Z),p.attr("x2",o)):"BT"===Q&&(p.attr("y1",Z),p.attr("x1",o),p.attr("y2",30),p.attr("x2",o)),X.push(s);const f=t.name,g=tt(f),m=d.insert("rect"),y=d.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);y.node().appendChild(g);const v=g.getBBox(),b=h?0:4,x=h?16:0,T=h?12:0;"neo"===i&&m.attr("data-look","neo"),m.attr("class","branchLabelBkg label"+a).attr("style","neo"===i?`filter:${h?`url(#${n}-drop-shadow)`:l}`:"").attr("rx",b).attr("ry",b).attr("x",-v.width-4-(!0===r.rotateCommitLabel?30:0)).attr("y",-v.height/2+10).attr("width",v.width+18+x).attr("height",v.height+4+T),y.attr("transform","translate("+(-v.width-14-(!0===r.rotateCommitLabel?30:0)+x/2)+", "+(s-v.height/2-2)+")"),"TB"===Q?(m.attr("x",o-v.width/2-10).attr("y",0),y.attr("transform","translate("+(o-v.width/2-5)+", 0)"),h&&(m.attr("transform",`translate(${-x/2-3}, ${-T-10})`),y.attr("transform","translate("+(o-v.width/2-5)+", "+(2*-T+7)+")"))):"BT"===Q?(m.attr("x",o-v.width/2-10).attr("y",Z),y.attr("transform","translate("+(o-v.width/2-5)+", "+Z+")"),h&&(m.attr("transform",`translate(${-x/2-3}, ${T+10})`),y.attr("transform","translate("+(o-v.width/2-5)+", "+(Z+2*T+4)+")"))):m.attr("transform","translate(-19, "+(s-12-T/2)+")")})},"drawBranches"),xt=(0,s.K2)(function(t,e,r,n,i){return Y.set(t,{pos:e,index:r}),e+=50+(i?40:0)+("TB"===Q||"BT"===Q?n.width/2:0)},"setBranchPosition"),Tt={draw:(0,s.K2)(function(t,e,r,n){J(),s.Rm.debug("in gitgraph renderer",t+"\n","id:",e,r);const i=n.db;if(!i.getConfig)return void s.Rm.error("getConfig method is not available on db");const l=i.getConfig(),h=l.rotateCommitLabel??!1;H=i.getCommits();const u=i.getBranchesAsObjArray();Q=i.getDirection();const d=(0,c.Ltv)(`[id="${e}"]`),{look:p,theme:f,themeVariables:g}=(0,o.D7)(),{useGradient:m,gradientStart:y,gradientStop:v,filterColor:b}=g;if(m){const t=d.append("defs").append("linearGradient").attr("id",e+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",y).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",v).attr("stop-opacity",1)}"neo"===p&&q.has(f??"")&&d.append("defs").append("filter").attr("id",e+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",b);let x=0;u.forEach((t,e)=>{const r=tt(t.name),n=d.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label");a.node()?.appendChild(r);const o=r.getBBox();x=xt(t.name,x,e,o,h),a.remove(),i.remove(),n.remove()}),ft(d,H,!1,l),l.showBranches&&bt(d,u,l,e),vt(d,H),ft(d,H,!0,l),a._K.insertTitle(d,"gitTitleText",l.titleTopMargin??0,i.getDiagramTitle()),(0,o.mj)(void 0,d,l.diagramPadding,l.useMaxWidth)},"draw")};var wt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),kt=new Set(["redux-color","redux-dark-color"]),Ct=new Set(["neo","neo-dark"]),Et=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),St=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),_t=(0,s.K2)(t=>{const{svgId:e}=t;let r="";if(t.useGradient&&e)for(let n=0;n<t.THEME_COLOR_LIMIT;n++)r+=`\n .label${n} { fill: ${t.mainBkg}; stroke: url(${e}-gradient); stroke-width: ${t.strokeWidth};}\n `;return r},"genGitGraphGradient"),At=(0,s.K2)(t=>{const e=(0,o.zj)(),{theme:r,themeVariables:n}=e,{borderColorArray:i}=n,a=wt.has(r);if(Ct.has(r)){let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)if(0===r)e+=`\n .branch-label${r} { fill: ${t.nodeBorder};}\n .commit${r} { stroke: ${t.nodeBorder}; }\n .commit-highlight${r} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .arrow${r} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${r} { stroke: ${t.nodeBorder}; }\n ${_t(t)}`;else{const n=r%8;e+=`\n .branch-label${r} { fill: ${t["gitBranchLabel"+n]}; }\n .commit${r} { stroke: ${t["git"+n]}; fill: ${t["git"+n]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+n]}; fill: ${t["gitInv"+n]}; }\n .arrow${r} { stroke: ${t["git"+n]}; }\n `}return e}if(kt.has(r)){let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)if(0===n)e+=`\n .branch-label${n} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${n} { stroke: ${t.nodeBorder}; }\n .commit-highlight${n} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }\n .label${n} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .arrow${n} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n `;else{const o=n%i.length;e+=`\n .branch-label${n} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${n} { stroke: ${i[o]}; fill: ${i[o]}; }\n .commit-highlight${n} { stroke: ${i[o]}; fill: ${i[o]}; }\n .label${n} { fill: ${Et.has(r)?t.mainBkg:i[o]}; stroke: ${i[o]}; stroke-width: ${t.strokeWidth}; }\n .arrow${n} { stroke: ${i[o]}; }\n `}return e}{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)e+=`\n .branch-label${r} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${r} { stroke: ${t.nodeBorder}; }\n .commit-highlight${r} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .label${r} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""}}\n .arrow${r} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${r} { stroke: ${t.nodeBorder}; }\n `;return e}},"genColor"),Rt=(0,s.K2)(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(t,e)=>e).map(e=>{const r=e%8;return`\n .branch-label${e} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${e} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${e} { fill: ${t["git"+r]}; }\n .arrow${e} { stroke: ${t["git"+r]}; }\n `}).join("\n")}`,"normalTheme"),Lt={parser:z,db:D,renderer:Tt,styles:(0,s.K2)(t=>{const e=(0,o.zj)(),{theme:r}=e,n=St.has(r);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${n?At(t):Rt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${n?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${n?t.nodeBorder:t.commitLabelColor}; ${n?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${n?"transparent":t.commitLabelBackground}; opacity: ${n?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${n?t.mainBkg:t.tagLabelBackground}; stroke: ${n?t.nodeBorder:t.tagLabelBorder}; ${n?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${n?t.mainBkg:t.primaryColor};\n fill: ${n?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${n?t.mainBkg:t.primaryColor};\n fill: ${n?t.mainBkg:t.primaryColor};\n stroke-width: ${n?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${n?t.mainBkg:t.primaryColor};\n fill: ${n?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${wt.has(r)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")}},786(t,e,r){"use strict";r.d(e,{diagram:()=>l});var n=r(594),i=r(1123),a=r(797),o=r(8731),s={version:"11.15.0"},l={parser:{parse:(0,a.K2)(async t=>{const e=await(0,o.qg)("info",t);a.Rm.debug(e)},"parse")},db:{getVersion:(0,a.K2)(()=>s.version,"getVersion")},renderer:{draw:(0,a.K2)((t,e,r)=>{a.Rm.debug("rendering info diagram\n"+t);const o=(0,n.D)(e);(0,i.a$)(o,100,400,!0);o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw")}}},399(t,e,r){"use strict";r.d(e,{diagram:()=>L});var n=r(594),i=r(8221),a=r(1123),o=r(797),s=r(2274),l=function(){var t=(0,o.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,4],r=[1,14],n=[1,12],i=[1,13],a=[6,7,8],s=[1,20],l=[1,18],c=[1,19],h=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],f=[1,6,7,11,13,14],g={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:(0,o.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return n;case 15:n.addNode(a[s-1].length,a[s].trim());break;case 16:n.addNode(0,a[s].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:i},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:r,12:15,13:n,14:i},{6:r,9:16,12:11,13:n,14:i},{6:s,7:l,10:17,11:c},t(h,[2,18],{14:[1,21]}),t(h,[2,16]),t(h,[2,17]),{6:s,7:l,10:22,11:c},{1:[2,7],6:r,12:15,13:n,14:i},t(u,[2,14],{7:d,11:p}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(h,[2,15]),t(u,[2,13],{7:d,11:p}),t(f,[2,11]),t(f,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},m=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(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,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,r,n){switch(r){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function y(){this.yy={}}return g.lexer=m,(0,o.K2)(y,"Parser"),y.prototype=g,g.Parser=y,new y}();l.parser=l;var c=l,h=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{(0,o.K2)(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,(0,a.IU)()}getRoot(){return this.root}addNode(t,e){const r=a.Y2.sanitizeText(e,(0,a.D7)());if(!this.root)return this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],void(0,a.ke)(r);this.baseLevel??=t;let n=t-this.baseLevel+1;for(n<=0&&(n=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=n;)this.stack.pop();const i={text:r,children:[]};this.stack[this.stack.length-1].node.children.push(i),this.stack.push({level:n,node:i})}getAccTitle(){return(0,a.iN)()}setAccTitle(t){(0,a.SV)(t)}getAccDescription(){return(0,a.m7)()}setAccDescription(t){(0,a.EI)(t)}getDiagramTitle(){return(0,a.ab)()}setDiagramTitle(t){(0,a.ke)(t)}},u=250,d=82*Math.PI/180,p=Math.cos(d),f=Math.sin(d),g=(0,o.K2)((t,e,r)=>{const n=t.node().getBBox(),i=n.width+2*e,o=n.height+2*e;(0,a.a$)(t,o,i,r),t.attr("viewBox",`${n.x-e} ${n.y-e} ${i} ${o}`)},"applyPaddedViewBox"),m=(0,o.K2)((t,e,r,o)=>{const l=o.db.getRoot();if(!l)return;const c=(0,a.D7)(),{look:h,handDrawnSeed:d,themeVariables:p}=c,f=(0,i.I5)(c.fontSize)[0]??14,m="handDrawn"===h,b=l.children??[],x=c.ishikawa?.diagramPadding??20,T=c.ishikawa?.useMaxWidth??!1,k=(0,n.D)(e),C=k.append("g").attr("class","ishikawa"),E=m?s.A.svg(k.node()):void 0,S=E?{roughSvg:E,seed:d??0,lineColor:p?.lineColor??"#333",fillColor:p?.mainBkg??"#fff"}:void 0,A=`ishikawa-arrow-${e}`;m||C.append("defs").append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let R=0,L=u;const I=m?void 0:_(C,R,L,R,L,"ishikawa-spine");if(v(C,R,L,l.text,f,S),!b.length)return m&&_(C,R,L,R,L,"ishikawa-spine",S),void g(k,x,T);R-=20;const D=b.filter((t,e)=>e%2==0),N=b.filter((t,e)=>e%2==1),M=y(D),O=y(N),$=M.total+O.total;let P=u,B=u;if($>0){const t=500,e=75;P=Math.max(e,t*(M.total/$)),B=Math.max(e,t*(O.total/$))}const F=2*f;P=Math.max(P,M.max*F),B=Math.max(B,O.max*F),L=Math.max(P,u),I&&I.attr("y1",L).attr("y2",L),C.select(".ishikawa-head-group").attr("transform",`translate(0,${L})`);const z=Math.ceil(b.length/2);for(let n=0;n<z;n++){const t=C.append("g").attr("class","ishikawa-pair");for(const[e,r,i]of[[b[2*n],-1,P],[b[2*n+1],1,B]])e&&w(t,e,R,L,r,i,f,S);R=t.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(m)_(C,R,L,0,L,"ishikawa-spine",S);else{I.attr("x1",R);const t=`url(#${A})`;C.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}g(k,x,T)},"draw"),y=(0,o.K2)(t=>{const e=(0,o.K2)(t=>t.children.reduce((t,r)=>t+1+e(r),0),"countDescendants");return t.reduce((t,r)=>{const n=e(r);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),v=(0,o.K2)((t,e,r,n,i,a)=>{const o=Math.max(6,Math.floor(110/(.6*i))),s=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${r})`),l=E(s,C(n,o),0,0,"ishikawa-head-label","start",i),c=l.node().getBBox(),h=Math.max(60,c.width+6),u=Math.max(40,2*c.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*h} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>t,":first-child").attr("class","ishikawa-head")}else s.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);l.attr("transform",`translate(${(h-c.width)/2-c.x+3},${-c.y-c.height/2})`)},"drawHead"),b=(0,o.K2)((t,e)=>{const r=[],n=[],i=(0,o.K2)((t,a,o)=>{const s=-1===e?[...t].reverse():t;for(const e of s){const t=r.length,s=e.children??[];r.push({depth:o,text:C(e.text,15),parentIndex:a,childCount:s.length}),o%2==0?(n.push(t),s.length&&i(s,t,o+1)):(s.length&&i(s,t,o+1),n.push(t))}},"walk");return i(t,-1,2),{entries:r,yOrder:n}},"flattenTree"),x=(0,o.K2)((t,e,r,n,i,a,o)=>{const s=t.append("g").attr("class","ishikawa-label-group"),l=E(s,e,r,n+11*i,"ishikawa-label cause","middle",a).node().getBBox();if(o){const t=o.roughSvg.rectangle(l.x-20,l.y-2,l.width+40,l.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else s.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",l.x-20).attr("y",l.y-2).attr("width",l.width+40).attr("height",l.height+4)},"drawCauseLabel"),T=(0,o.K2)((t,e,r,n,i,a)=>{const o=Math.sqrt(n*n+i*i);if(0===o)return;const s=n/o,l=i/o,c=6*-l,h=6*s,u=`M ${e} ${r} L ${e-6*s*2+c} ${r-6*l*2+h} L ${e-6*s*2-c} ${r-6*l*2-h} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),w=(0,o.K2)((t,e,r,n,i,a,o,s)=>{const l=e.children??[],c=a*(l.length?1:.2),h=f*c*i,u=r+-p*c,d=n+h;if(_(t,r,n,u,d,"ishikawa-branch",s),s&&T(t,r,n,r-u,n-d,s),x(t,e.text,u,d,i,o,s),!l.length)return;const{entries:g,yOrder:m}=b(l,i),y=g.length,v=new Array(y);for(const[p,f]of m.entries())v[f]=n+h*((p+1)/(y+1));const w=new Map;w.set(-1,{x0:r,y0:n,x1:u,y1:d,childCount:l.length,childrenDrawn:0});const k=-p,C=f*i,A=i<0?"ishikawa-label up":"ishikawa-label down";for(const[p,f]of g.entries()){const e=v[p],r=w.get(f.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let i=0,a=0,l=0;if(f.depth%2==0){const t=r.y1-r.y0;i=S(r.x0,r.x1,t?(e-r.y0)/t:.5),a=e,l=i-(f.childCount>0?60+5*f.childCount:30),_(n,i,e,l,e,"ishikawa-sub-branch",s),s&&T(n,i,e,1,0,s),E(n,f.text,l,e,"ishikawa-label align","end",o)}else{const t=r.childrenDrawn++;i=S(r.x0,r.x1,(r.childCount-t)/(r.childCount+1)),a=r.y0,l=i+k*((e-a)/C),_(n,i,a,l,e,"ishikawa-sub-branch",s),s&&T(n,i,a,i-l,a-e,s),E(n,f.text,l,e,A,"end",o)}f.childCount>0&&w.set(p,{x0:i,y0:a,x1:l,y1:e,childCount:f.childCount,childrenDrawn:0})}},"drawBranch"),k=(0,o.K2)(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),C=(0,o.K2)((t,e)=>{if(t.length<=e)return t;const r=[];for(const n of t.split(/\s+/)){const t=r.length-1;t>=0&&r[t].length+1+n.length<=e?r[t]+=" "+n:r.push(n)}return r.join("\n")},"wrapText"),E=(0,o.K2)((t,e,r,n,i,a,o)=>{const s=k(e),l=1.05*o,c=t.append("text").attr("class",i).attr("text-anchor",a).attr("x",r).attr("y",n-(s.length-1)*l/2);for(const[h,u]of s.entries())c.append("tspan").attr("x",r).attr("dy",0===h?0:l).text(u);return c},"drawMultilineText"),S=(0,o.K2)((t,e,r)=>t+(e-t)*r,"lerp"),_=(0,o.K2)((t,e,r,n,i,a,o)=>{if(o){const s=o.roughSvg.line(e,r,n,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});return void t.append(()=>s).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",r).attr("x2",n).attr("y2",i)},"drawLine"),A={draw:m},R=(0,o.K2)(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),L={parser:c,get db(){return new h},renderer:A,styles:R}},4728(t,e,r){"use strict";r.d(e,{diagram:()=>V});var n=r(2501),i=r(8343),a=r(1123),o=r(797),s=r(1444),l=function(){var t=(0,o.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],l=[1,14],c={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,o.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 6:case 7:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 8:n.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:n.addTask(a[s-1],a[s]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(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,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,(0,o.K2)(u,"Parser"),u.prototype=c,c.Parser=u,new u}();l.parser=l;var c=l,h="",u=[],d=[],p=[],f=(0,o.K2)(function(){u.length=0,d.length=0,h="",p.length=0,(0,a.IU)()},"clear"),g=(0,o.K2)(function(t){h=t,u.push(t)},"addSection"),m=(0,o.K2)(function(){return u},"getSections"),y=(0,o.K2)(function(){let t=T();let e=0;for(;!t&&e<100;)t=T(),e++;return d.push(...p),d},"getTasks"),v=(0,o.K2)(function(){const t=[];d.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),b=(0,o.K2)(function(t,e){const r=e.substr(1).split(":");let n=0,i=[];1===r.length?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));const a=i.map(t=>t.trim()),o={section:h,type:h,people:a,task:t,score:n};p.push(o)},"addTask"),x=(0,o.K2)(function(t){const e={section:h,type:h,description:t,task:t,classes:[]};d.push(e)},"addTaskOrg"),T=(0,o.K2)(function(){const t=(0,o.K2)(function(t){return p[t].processed},"compileTask");let e=!0;for(const[r,n]of p.entries())t(r),e=e&&n.processed;return e},"compileTasks"),w=(0,o.K2)(function(){return v()},"getActors"),k={getConfig:(0,o.K2)(()=>(0,a.D7)().journey,"getConfig"),clear:f,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setAccTitle:a.SV,getAccTitle:a.iN,setAccDescription:a.EI,getAccDescription:a.m7,addSection:g,getSections:m,getTasks:y,addTask:b,addTaskOrg:x,getActors:w},C=(0,o.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n ${(0,n.o)()}\n`,"getStyles"),E=(0,o.K2)(function(t,e){return(0,i.tk)(t,e)},"drawRect"),S=(0,o.K2)(function(t,e){const r=15,n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",r).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const n=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const n=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,o.K2)(a,"smile"),(0,o.K2)(l,"sad"),(0,o.K2)(c,"ambivalent"),e.score>3?a(i):e.score<3?l(i):c(i),n},"drawFace"),_=(0,o.K2)(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),void 0!==r.class&&r.attr("class",r.class),void 0!==e.title&&r.append("title").text(e.title),r},"drawCircle"),A=(0,o.K2)(function(t,e){return(0,i.m)(t,e)},"drawText"),R=(0,o.K2)(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}(0,o.K2)(r,"genPoints");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,A(t,e)},"drawLabel"),L=(0,o.K2)(function(t,e,r){const n=t.append("g"),a=(0,i.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),a.height=r.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,E(n,a),M(r)(e.text,n,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),I=-1,D=(0,o.K2)(function(t,e,r,n){const a=e.x+r.width/2,o=t.append("g");I++;o.append("line").attr("id",n+"-task"+I).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),S(o,{cx:a,cy:300+30*(5-e.score),score:e.score});const s=(0,i.PB)();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,E(o,s);let l=e.x+14;e.people.forEach(t=>{const r=e.actors[t].color,n={cx:l,cy:e.y,r:7,fill:r,stroke:"#000",title:t,pos:e.actors[t].position};_(o,n),l+=10}),M(r)(e.task,o,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),N=(0,o.K2)(function(t,e){(0,i.lC)(t,e)},"drawBackgroundRect"),M=function(){function t(t,e,r,i,a,o,s,l){n(e.append("text").attr("x",r+a/2).attr("y",i+o/2+5).style("font-color",l).style("text-anchor","middle").text(t),s)}function e(t,e,r,i,a,o,s,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(/<br\s*\/?>/gi);for(let p=0;p<d.length;p++){const t=p*h-h*(d.length-1)/2,l=e.append("text").attr("x",r+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",r+a/2).attr("dy",t).text(d[p]),l.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(l,s)}}function r(t,r,i,a,o,s,l,c){const h=r.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,o,s,l,c),n(u,l)}function n(t,e){for(const r in e)r in e&&t.attr(r,e[r])}return(0,o.K2)(t,"byText"),(0,o.K2)(e,"byTspan"),(0,o.K2)(r,"byFo"),(0,o.K2)(n,"_setTextAttrs"),function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}(),O={drawRect:E,drawCircle:_,drawSection:L,drawText:A,drawLabel:R,drawTask:D,drawBackgroundRect:N,initGraphics:(0,o.K2)(function(t,e){I=-1,t.append("defs").append("marker").attr("id",e+"-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")},"initGraphics")},$=(0,o.K2)(function(t){Object.keys(t).forEach(function(e){z[e]=t[e]})},"setConf"),P={},B=0;function F(t){const e=(0,a.D7)().journey,r=e.maxLabelWidth;B=0;let n=60;Object.keys(P).forEach(i=>{const a=P[i].color,o={cx:20,cy:n,r:7,fill:a,stroke:"#000",pos:P[i].position};O.drawCircle(t,o);let s=t.append("text").attr("visibility","hidden").text(i);const l=s.node().getBoundingClientRect().width;s.remove();let c=[];if(l<=r)c=[i];else{const e=i.split(" ");let n="";s=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=n?`${n} ${t}`:t;s.text(e);if(s.node().getBoundingClientRect().width>r){if(n&&c.push(n),n=t,s.text(t),s.node().getBoundingClientRect().width>r){let e="";for(const n of t)e+=n,s.text(e+"-"),s.node().getBoundingClientRect().width>r&&(c.push(e.slice(0,-1)+"-"),e=n);n=e}}else n=e}),n&&c.push(n),s.remove()}c.forEach((r,i)=>{const a={x:40,y:n+7+20*i,fill:"#666",text:r,textMargin:e.boxTextMargin??5},o=O.drawText(t,a).node().getBoundingClientRect().width;o>B&&o>e.leftMargin-o&&(B=o)}),n+=Math.max(20,20*c.length)})}(0,o.K2)(F,"drawActorLegend");var z=(0,a.D7)().journey,K=0,j=(0,o.K2)(function(t,e,r,n){const i=(0,a.D7)(),o=i.journey.titleColor,l=i.journey.titleFontSize,c=i.journey.titleFontFamily,h=i.securityLevel;let u;"sandbox"===h&&(u=(0,s.Ltv)("#i"+e));const d="sandbox"===h?(0,s.Ltv)(u.nodes()[0].contentDocument.body):(0,s.Ltv)("body");q.init();const p=d.select("#"+e);O.initGraphics(p,e);const f=n.db.getTasks(),g=n.db.getDiagramTitle(),m=n.db.getActors();for(const a in P)delete P[a];let y=0;m.forEach(t=>{P[t]={color:z.actorColours[y%z.actorColours.length],position:y},y++}),F(p),K=z.leftMargin+B,q.insert(0,0,K,50*Object.keys(P).length),G(p,f,0,e);const v=q.getBounds();g&&p.append("text").text(g).attr("x",K).attr("font-size",l).attr("font-weight","bold").attr("y",25).attr("fill",o).attr("font-family",c);const b=v.stopy-v.starty+2*z.diagramMarginY,x=K+v.stopx+2*z.diagramMarginX;(0,a.a$)(p,b,x,z.useMaxWidth),p.append("line").attr("x1",K).attr("y1",4*z.height).attr("x2",x-K-4).attr("y2",4*z.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const T=g?70:0;p.attr("viewBox",`${v.startx} -25 ${x} ${b+T}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",b+T+25)},"draw"),q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,o.K2)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,o.K2)(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:(0,o.K2)(function(t,e,r,n){const i=(0,a.D7)().journey,s=this;let l=0;function c(a){return(0,o.K2)(function(o){l++;const c=s.sequenceItems.length-l+1;s.updateVal(o,"starty",e-c*i.boxMargin,Math.min),s.updateVal(o,"stopy",n+c*i.boxMargin,Math.max),s.updateVal(q.data,"startx",t-c*i.boxMargin,Math.min),s.updateVal(q.data,"stopx",r+c*i.boxMargin,Math.max),"activation"!==a&&(s.updateVal(o,"startx",t-c*i.boxMargin,Math.min),s.updateVal(o,"stopx",r+c*i.boxMargin,Math.max),s.updateVal(q.data,"starty",e-c*i.boxMargin,Math.min),s.updateVal(q.data,"stopy",n+c*i.boxMargin,Math.max))},"updateItemBounds")}(0,o.K2)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,o.K2)(function(t,e,r,n){const i=Math.min(t,r),a=Math.max(t,r),o=Math.min(e,n),s=Math.max(e,n);this.updateVal(q.data,"startx",i,Math.min),this.updateVal(q.data,"starty",o,Math.min),this.updateVal(q.data,"stopx",a,Math.max),this.updateVal(q.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},"insert"),bumpVerticalPos:(0,o.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,o.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,o.K2)(function(){return this.data},"getBounds")},W=z.sectionFills,U=z.sectionColours,G=(0,o.K2)(function(t,e,r,n){const i=(0,a.D7)().journey;let o="";const s=r+(2*i.height+i.diagramMarginY);let l=0,c="#CCC",h="black",u=0;for(const[a,d]of e.entries()){if(o!==d.section){c=W[l%W.length],u=l%W.length,h=U[l%U.length];let r=0;const n=d.section;for(let t=a;t<e.length&&e[t].section==n;t++)r+=1;const s={x:a*i.taskMargin+a*i.width+K,y:50,text:d.section,fill:c,num:u,colour:h,taskCount:r};O.drawSection(t,s,i),o=d.section,l++}const r=d.people.reduce((t,e)=>(P[e]&&(t[e]=P[e]),t),{});d.x=a*i.taskMargin+a*i.width+K,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=h,d.fill=c,d.num=u,d.actors=r,O.drawTask(t,d,i,n),q.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),Y={setConf:$,draw:j},V={parser:c,db:k,renderer:Y,styles:C,init:(0,o.K2)(t=>{Y.setConf(t.journey),k.clear()},"init")}},3723(t,e,r){"use strict";r.d(e,{diagram:()=>_});var n=r(594),i=r(2501),a=r(3283),o=r(2654),s=(r(5105),r(8013),r(1240),r(8221),r(1123)),l=r(797),c=r(5097),h=r(8041),u=r(5263),d=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],f=[1,31],g=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],b=[1,6,7,11,13,16,17,20,23],x=[1,38],T={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[s-1].id),n.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:n.getLogger().info("Node: ",a[s].id),n.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:n.getLogger().trace("Icon: ",a[s]),n.decorateNode({icon:a[s]});break;case 18:case 23:n.decorateNode({class:a[s]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[s-1].id),n.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:n.getLogger().trace("Node: ",a[s].id),n.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:n.decorateNode({icon:a[s]});break;case 27:n.getLogger().trace("node found ..",a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:n.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:n.getLogger().trace("node found ..",a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:n.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:s},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:h,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:s}),t(p,[2,19]),t(p,[2,21],{15:30,24:f}),t(p,[2,22]),t(p,[2,23]),t(g,[2,25]),t(g,[2,26]),t(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:s},t(m,[2,14],{7:y,11:v}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(p,[2,16],{15:37,24:f}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:x}),t(g,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(b,[2,11]),t(b,[2,12]),t(p,[2,15],{24:x}),t(g,[2,30]),{22:[1,41]},t(g,[2,27]),t(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},w=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const r=/\n\s*/g;return e.yytext=e.yytext.replace(r,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function k(){this.yy={}}return T.lexer=w,(0,l.K2)(k,"Parser"),k.prototype=T,T.Parser=k,new k}();d.parser=d;var p=d,f=[],g=[],m=0,y={},v=(0,l.K2)(()=>{f=[],g=[],m=0,y={}},"clear"),b=(0,l.K2)(t=>{if(0===f.length)return null;const e=f[0].level;let r=null;for(let n=f.length-1;n>=0;n--)if(f[n].level!==e||r||(r=f[n]),f[n].level<e)throw new Error('Items without section detected, found section ("'+f[n].label+'")');return t===r?.level?null:r},"getSection"),x=(0,l.K2)(function(){return g},"getSections"),T=(0,l.K2)(function(){const t=[],e=x(),r=(0,s.D7)();for(const n of e){const e={id:n.id,label:(0,s.jZ)(n.label??"",r),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:r.look};t.push(e);const i=f.filter(t=>t.parentId===n.id);for(const a of i){const e={id:a.id,parentId:n.id,label:(0,s.jZ)(a.label??"",r),labelType:"markdown",isGroup:!1,ticket:a?.ticket,priority:a?.priority,assigned:a?.assigned,icon:a?.icon,shape:"kanbanItem",level:a.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,s.D7)()}},"getData"),w=(0,l.K2)((t,e,r,n,i)=>{const o=(0,s.D7)();let l=o.mindmap?.padding??s.UI.mindmap.padding;switch(n){case k.ROUNDED_RECT:case k.RECT:case k.HEXAGON:l*=2}const c={id:(0,s.jZ)(e,o)||"kbn"+m++,level:t,label:(0,s.jZ)(r,o),width:o.mindmap?.maxNodeWidth??s.UI.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}";const e=(0,a.H)(t,{schema:a.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(c.shape=e?.shape),e?.label&&(c.label=e?.label),e?.icon&&(c.icon=e?.icon.toString()),e?.assigned&&(c.assigned=e?.assigned.toString()),e?.ticket&&(c.ticket=e?.ticket.toString()),e?.priority&&(c.priority=e?.priority)}const h=b(t);h?c.parentId=h.id||"kbn"+m++:g.push(c),f.push(c)},"addNode"),k={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},C={clear:v,addNode:w,getSections:x,getData:T,nodeType:k,getType:(0,l.K2)((t,e)=>{switch(l.Rm.debug("In get type",t,e),t){case"[":return k.RECT;case"(":return")"===e?k.ROUNDED_RECT:k.CLOUD;case"((":return k.CIRCLE;case")":return k.CLOUD;case"))":return k.BANG;case"{{":return k.HEXAGON;default:return k.DEFAULT}},"getType"),setElementForId:(0,l.K2)((t,e)=>{y[t]=e},"setElementForId"),decorateNode:(0,l.K2)(t=>{if(!t)return;const e=(0,s.D7)(),r=f[f.length-1];t.icon&&(r.icon=(0,s.jZ)(t.icon,e)),t.class&&(r.cssClasses=(0,s.jZ)(t.class,e))},"decorateNode"),type2Str:(0,l.K2)(t=>{switch(t){case k.DEFAULT:return"no-border";case k.RECT:return"rect";case k.ROUNDED_RECT:return"rounded-rect";case k.CIRCLE:return"circle";case k.CLOUD:return"cloud";case k.BANG:return"bang";case k.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,l.K2)(()=>l.Rm,"getLogger"),getElementById:(0,l.K2)(t=>y[t],"getElementById")},E={draw:(0,l.K2)(async(t,e,r,i)=>{l.Rm.debug("Rendering kanban diagram\n"+t);const a=i.db.getData(),c=(0,s.D7)();c.htmlLabels=!1;const h=(0,n.D)(e);for(const n of a.nodes)n.domId=`${e}-${n.id}`;const u=h.append("g");u.attr("class","sections");const d=h.append("g");d.attr("class","items");const p=a.nodes.filter(t=>t.isGroup);let f=0;const g=[];let m=25;for(const n of p){const t=c?.kanban?.sectionWidth||200;f+=1,n.x=t*f+10*(f-1)/2,n.width=t,n.y=0,n.height=3*t,n.rx=5,n.ry=5,n.cssClasses=n.cssClasses+" section-"+f;const e=await(0,o.U)(u,n);m=Math.max(m,e?.labelBBox?.height),g.push(e)}let y=0;for(const n of p){const t=g[y];y+=1;const e=c?.kanban?.sectionWidth||200,r=3*-e/2+m;let i=r;const s=a.nodes.filter(t=>t.parentId===n.id);for(const a of s){if(a.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");a.x=n.x,a.width=e-15;const t=(await(0,o.on)(d,a,{config:c})).node().getBBox();a.y=i+t.height/2,await(0,o.U_)(a),i=a.y+t.height/2+5}const l=t.cluster.select("rect"),h=Math.max(i-r+30,50)+(m-25);l.attr("height",h)}(0,s.ot)(void 0,h,c.mindmap?.padding??s.UI.kanban.padding,c.mindmap?.useMaxWidth??s.UI.kanban.useMaxWidth)},"draw")},S=(0,l.K2)(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],(0,c.A)(t["lineColor"+n])?t["lineColor"+n]=(0,h.A)(t["lineColor"+n],20):t["lineColor"+n]=(0,u.A)(t["lineColor"+n],20);const r=(0,l.K2)((e,r)=>t.darkMode?(0,u.A)(e,r):(0,h.A)(e,r),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const i=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${r(t["cScale"+n],10)};\n stroke: ${r(t["cScale"+n],10)};\n\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${t.background};\n stroke: ${t.nodeBorder};\n text-decoration: underline;\n }\n `}return e},"genSections"),_={db:C,renderer:E,parser:p,styles:(0,l.K2)(t=>`\n .edge {\n stroke-width: 3;\n }\n ${S(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,i.o)()}\n`,"getStyles")}},4799(t,e,r){"use strict";r.d(e,{diagram:()=>k});var n=r(9625),i=r(4345),a=r(3848),o=(r(6615),r(1334),r(2654),r(5105),r(8013),r(1240),r(8221),r(1123)),s=r(797);const l=new Uint8Array(16);const c=[];for(let C=0;C<256;++C)c.push((C+256).toString(16).slice(1));function h(t,e=0){return(c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]).toLowerCase()}const u=function(t,e,r){return e||t||!crypto.randomUUID?function(t,e,r){t=t||{};const n=t.random??t.rng?.()??crypto.getRandomValues(l);if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){if((r=r||0)<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=n[t];return e}return h(n)}(t,e,r):crypto.randomUUID()};var d=r(5097),p=r(8041),f=r(5263),g=function(){var t=(0,s.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],f=[1,6,13,15,16,19,22],g=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],v={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,s.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[s].id),n.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:n.getLogger().trace("Icon: ",a[s]),n.decorateNode({icon:a[s]});break;case 17:case 21:n.decorateNode({class:a[s]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[s].id),n.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:n.decorateNode({icon:a[s]});break;case 25:n.getLogger().trace("node found ..",a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:n.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:n.getType(a[s-2],a[s])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},t(f,[2,14],{7:g,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(f,[2,13],{7:g,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},b=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(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,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,r,n){switch(r){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function x(){this.yy={}}return v.lexer=b,(0,s.K2)(x,"Parser"),x.prototype=v,v.Parser=x,new x}();g.parser=g;var m=g,y={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},v=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=y,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,s.K2)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,e,r,n){s.Rm.info("addNode",t,e,r,n);let i=!1;0===this.nodes.length?(this.baseLevel=t,t=0,i=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,i=!1);const a=(0,o.D7)();let l=a.mindmap?.padding??o.UI.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:l*=2}const c={id:this.count++,nodeId:(0,o.jZ)(e,a),level:t,descr:(0,o.jZ)(r,a),type:n,children:[],width:a.mindmap?.maxNodeWidth??o.UI.mindmap.maxNodeWidth,padding:l,isRoot:i},h=this.getParent(t);if(h)h.children.push(c),this.nodes.push(c);else{if(!i)throw new Error(`There can be only one root. No parent could be found for ("${c.descr}")`);this.nodes.push(c)}}getType(t,e){switch(s.Rm.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=(0,o.D7)(),r=this.nodes[this.nodes.length-1];t.icon&&(r.icon=(0,o.jZ)(t.icon,e)),t.class&&(r.class=(0,o.jZ)(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[r,n]of t.children.entries()){const i=0===t.level?r%11:e;this.assignSections(n,i)}}flattenNodes(t,e){const r=(0,o.D7)(),n=["mindmap-node"];!0===t.isRoot?n.push("section-root","section--1"):void 0!==t.section&&n.push(`section-${t.section}`),t.class&&n.push(t.class);const i=n.join(" "),a=(0,s.K2)(t=>{const e=(r.theme?.toLowerCase()??"").includes("redux");switch(t){case y.CIRCLE:return"mindmapCircle";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexagon";case y.DEFAULT:return e?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),l={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,labelType:"markdown",isGroup:!1,shape:a(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:i,cssStyles:[],look:r.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(l),t.children)for(const o of t.children)this.flattenNodes(o,e)}generateEdges(t,e){if(!t.children)return;const r=(0,o.D7)();for(const n of t.children){let i="edge";void 0!==n.section&&(i+=` section-edge-${n.section}`);i+=` edge-depth-${t.level+1}`;const a={id:`edge_${t.id}_${n.id}`,start:t.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:r.look,classes:i,depth:t.level,section:n.section};e.push(a),this.generateEdges(n,e)}}getData(){const t=this.getMindmap(),e=(0,o.D7)(),r=e;if(void 0!==(0,o.TM)().layout||(r.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:r};s.Rm.debug("getData: mindmapRoot",t,e),this.assignSections(t);const n=[],i=[];this.flattenNodes(t,n),this.generateEdges(t,i),s.Rm.debug(`getData: processed ${n.length} nodes and ${i.length} edges`);const a=new Map;for(const o of n)a.set(o.id,{shape:o.shape,width:o.width,height:o.height,padding:o.padding});return{nodes:n,edges:i,config:r,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+u()}}getLogger(){return s.Rm}},b={draw:(0,s.K2)(async(t,e,r,l)=>{s.Rm.debug("Rendering mindmap diagram\n"+t);const c=l.db,h=c.getData(),u=(0,n.A)(e,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=(0,a.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e;if(!c.getMindmap())return;h.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape?(t.width=0,t.padding=10):"hexagon"===t.shape&&(t.width=0,t.height=0)}),await(0,a.XX)(h,u);const{themeVariables:d}=(0,o.zj)(),{useGradient:p,gradientStart:f,gradientStop:g}=d;if(p&&f&&g){const t=u.attr("id"),e=u.append("defs").append("linearGradient").attr("id",`${t}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",f).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",g).attr("stop-opacity",1)}(0,i.P)(u,h.config.mindmap?.padding??o.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??o.UI.mindmap.useMaxWidth)},"draw")},x=(0,s.K2)(t=>{const{theme:e,look:r}=t;let n="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],(0,d.A)(t["lineColor"+i])?t["lineColor"+i]=(0,p.A)(t["lineColor"+i],20):t["lineColor"+i]=(0,f.A)(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){const a=""+("neo"===r?Math.max(10-2*(i-1),2):17-3*i);n+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${t["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .section-${i-1} span {\n color: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${a};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {\n fill: ${"redux"===e||"redux-dark"===e||"neutral"===e?t.mainBkg:t["cScale"+i]};\n stroke: ${"redux"===e||"redux-dark"===e?t.nodeBorder:t["cScale"+i]};\n stroke-width: ${t.strokeWidth??2}px;\n }\n [data-look="neo"].section-edge-${i-1}{\n stroke: ${e?.includes("redux")||"neo-dark"===e?t.nodeBorder:t["cScale"+i]};\n }\n [data-look="neo"].mindmap-node.section-${i-1} text {\n fill: ${"redux"===e||"redux-dark"===e?t.nodeBorder:t["cScaleLabel"+("neutral"===e?1:i)]};\n }\n `}return n},"genSections"),T=(0,s.K2)((t,e,r)=>{let n="";for(let i=0;i<t;i++)n+=`\n [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {\n stroke: url(${e}-gradient);\n fill: ${r};\n }\n .section-${i-1} line {\n stroke-width: 0;\n }`;return n},"genGradient"),w=(0,s.K2)(t=>{const{theme:e}=t,r=t.svgId,n=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${x(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${n};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${e?.includes("redux")?t.mainBkg:t.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+("neutral"===e?1:0)]};\n }\n ${t.useGradient&&r&&t.mainBkg?T(t.THEME_COLOR_LIMIT,r,t.mainBkg):""}\n`},"getStyles"),k={get db(){return new v},renderer:b,parser:m,styles:w}},9301(t,e,r){"use strict";r.d(e,{diagram:()=>S});var n=r(594),i=r(5871),a=r(8221),o=r(1123),s=r(797),l=r(8731),c=r(1444),h=o.UI.pie,u={sections:new Map,showData:!1,config:h},d=u.sections,p=u.showData,f=structuredClone(h),g=(0,s.K2)(()=>structuredClone(f),"getConfig"),m=(0,s.K2)(()=>{d=new Map,p=u.showData,(0,o.IU)()},"clear"),y=(0,s.K2)(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);d.has(t)||(d.set(t,e),s.Rm.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),v=(0,s.K2)(()=>d,"getSections"),b=(0,s.K2)(t=>{p=t},"setShowData"),x=(0,s.K2)(()=>p,"getShowData"),T={getConfig:g,clear:m,setDiagramTitle:o.ke,getDiagramTitle:o.ab,setAccTitle:o.SV,getAccTitle:o.iN,setAccDescription:o.EI,getAccDescription:o.m7,addSection:y,getSections:v,setShowData:b,getShowData:x},w=(0,s.K2)((t,e)=>{(0,i.S)(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),k={parse:(0,s.K2)(async t=>{const e=await(0,l.qg)("pie",t);s.Rm.debug(e),w(e,T)},"parse")},C=(0,s.K2)(t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,"getStyles"),E=(0,s.K2)(t=>{const e=[...t.values()].reduce((t,e)=>t+e,0),r=[...t.entries()].map(([t,e])=>({label:t,value:e})).filter(t=>t.value/e*100>=1);return(0,c.rLf)().value(t=>t.value).sort(null)(r)},"createPieArcs"),S={parser:k,db:T,renderer:{draw:(0,s.K2)((t,e,r,i)=>{s.Rm.debug("rendering pie chart\n"+t);const l=i.db,h=(0,o.D7)(),u=(0,a.$t)(l.getConfig(),h.pie),d=18,p=450,f=p,g=(0,n.D)(e),m=g.append("g");m.attr("transform","translate(225,225)");const{themeVariables:y}=h;let[v]=(0,a.I5)(y.pieOuterStrokeWidth);v??=2;const b=u.textPosition,x=Math.min(f,p)/2-40,T=(0,c.JLW)().innerRadius(0).outerRadius(x),w=(0,c.JLW)().innerRadius(x*b).outerRadius(x*b);m.append("circle").attr("cx",0).attr("cy",0).attr("r",x+v/2).attr("class","pieOuterCircle");const k=l.getSections(),C=E(k),S=[y.pie1,y.pie2,y.pie3,y.pie4,y.pie5,y.pie6,y.pie7,y.pie8,y.pie9,y.pie10,y.pie11,y.pie12];let _=0;k.forEach(t=>{_+=t});const A=C.filter(t=>"0"!==(t.data.value/_*100).toFixed(0)),R=(0,c.UMr)(S).domain([...k.keys()]);m.selectAll("mySlices").data(A).enter().append("path").attr("d",T).attr("fill",t=>R(t.data.label)).attr("class","pieCircle"),m.selectAll("mySlices").data(A).enter().append("text").text(t=>(t.data.value/_*100).toFixed(0)+"%").attr("transform",t=>"translate("+w.centroid(t)+")").style("text-anchor","middle").attr("class","slice");const L=m.append("text").text(l.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),I=[...k.entries()].map(([t,e])=>({label:t,value:e})),D=m.selectAll(".legend").data(I).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*I.length/2)+")");D.append("rect").attr("width",d).attr("height",d).style("fill",t=>R(t.label)).style("stroke",t=>R(t.label)),D.append("text").attr("x",22).attr("y",14).text(t=>l.getShowData()?`${t.label} [${t.value}]`:t.label);const N=512+Math.max(...D.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0)),M=L.node()?.getBoundingClientRect().width??0,O=225-M/2,$=225+M/2,P=Math.min(0,O),B=Math.max(N,$)-P;g.attr("viewBox",`${P} 0 ${B} 450`),(0,o.a$)(g,p,B,u.useMaxWidth)},"draw")},styles:C}},8646(t,e,r){"use strict";r.d(e,{diagram:()=>I});var n=r(1123),i=r(797),a=r(1444),o=function(){var t=(0,i.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,3],r=[1,4],n=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],h=[2,36],u=[1,37],d=[1,36],p=[1,38],f=[1,35],g=[1,43],m=[1,41],y=[1,45],v=[1,14],b=[1,23],x=[1,18],T=[1,19],w=[1,20],k=[1,21],C=[1,22],E=[1,24],S=[1,25],_=[1,26],A=[1,27],R=[1,28],L=[1,29],I=[1,32],D=[1,33],N=[1,34],M=[1,39],O=[1,40],$=[1,42],P=[1,44],B=[1,63],F=[1,62],z=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],K=[1,66],j=[1,67],q=[1,68],W=[1,69],U=[1,70],G=[1,71],Y=[1,72],V=[1,73],H=[1,74],X=[1,75],Z=[1,76],Q=[1,77],J=[4,5,6,7,8,9,10,11,12,13,14,15,18],tt=[1,91],et=[1,92],rt=[1,93],nt=[1,100],it=[1,94],at=[1,97],ot=[1,95],st=[1,96],lt=[1,98],ct=[1,99],ht=[1,103],ut=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],pt={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,i.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 23:case 68:this.$=a[s];break;case 24:case 69:this.$=a[s-1]+""+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],n.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:n.addPoint(a[s-3],"",a[s-1],a[s],[]);break;case 48:n.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:n.addPoint(a[s-4],"",a[s-2],a[s-1],a[s]);break;case 50:n.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:n.setXAxisLeftText(a[s-2]),n.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=" ⟶ ",n.setXAxisLeftText(a[s-1]);break;case 53:n.setXAxisLeftText(a[s]);break;case 54:n.setYAxisBottomText(a[s-2]),n.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=" ⟶ ",n.setYAxisBottomText(a[s-1]);break;case 56:n.setYAxisBottomText(a[s]);break;case 57:n.setQuadrant1Text(a[s]);break;case 58:n.setQuadrant2Text(a[s]);break;case 59:n.setQuadrant3Text(a[s]);break;case 60:n.setQuadrant4Text(a[s]);break;case 64:case 66:this.$={text:a[s],type:"text"};break;case 65:this.$={text:a[s-1].text+""+a[s],type:a[s-1].type};break;case 67:this.$={text:a[s],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:a,57:o},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:a,57:o},{18:e,26:9,27:2,28:r,55:n,56:a,57:o},t(s,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(c,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:d,10:p,12:f,13:g,14:m,15:y,18:v,25:b,35:x,37:T,39:w,41:k,42:C,48:E,50:S,51:_,52:A,53:R,54:L,60:I,61:D,63:N,64:M,65:O,66:$,67:P}),t(s,[2,34]),{27:46,55:n,56:a,57:o},t(c,[2,37]),t(c,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:u,5:d,10:p,12:f,13:g,14:m,15:y,18:v,25:b,35:x,37:T,39:w,41:k,42:C,48:E,50:S,51:_,52:A,53:R,54:L,60:I,61:D,63:N,64:M,65:O,66:$,67:P}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:u,5:d,10:p,12:f,13:g,14:m,15:y,43:52,58:31,60:I,61:D,63:N,64:M,65:O,66:$,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,15:y,43:53,58:31,60:I,61:D,63:N,64:M,65:O,66:$,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,15:y,43:54,58:31,60:I,61:D,63:N,64:M,65:O,66:$,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,15:y,43:55,58:31,60:I,61:D,63:N,64:M,65:O,66:$,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,15:y,43:56,58:31,60:I,61:D,63:N,64:M,65:O,66:$,67:P},{4:u,5:d,10:p,12:f,13:g,14:m,15:y,43:57,58:31,60:I,61:D,63:N,64:M,65:O,66:$,67:P},{4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,44:[1,58],47:[1,59],58:61,59:60,63:N,64:M,65:O,66:$,67:P},t(z,[2,64]),t(z,[2,66]),t(z,[2,67]),t(z,[2,70]),t(z,[2,71]),t(z,[2,72]),t(z,[2,73]),t(z,[2,74]),t(z,[2,75]),t(z,[2,76]),t(z,[2,77]),t(z,[2,78]),t(z,[2,79]),t(z,[2,80]),t(z,[2,81]),t(s,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:K,5:j,6:q,7:W,8:U,9:G,10:Y,11:V,12:H,13:X,14:Z,15:Q,21:64},t(c,[2,53],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,49:[1,78],63:N,64:M,65:O,66:$,67:P}),t(c,[2,56],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,49:[1,79],63:N,64:M,65:O,66:$,67:P}),t(c,[2,57],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,63:N,64:M,65:O,66:$,67:P}),t(c,[2,58],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,63:N,64:M,65:O,66:$,67:P}),t(c,[2,59],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,63:N,64:M,65:O,66:$,67:P}),t(c,[2,60],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,63:N,64:M,65:O,66:$,67:P}),{45:[1,80]},{44:[1,81]},t(z,[2,65]),t(z,[2,82]),t(z,[2,83]),t(z,[2,84]),{3:83,4:K,5:j,6:q,7:W,8:U,9:G,10:Y,11:V,12:H,13:X,14:Z,15:Q,18:[1,82]},t(J,[2,23]),t(J,[2,1]),t(J,[2,2]),t(J,[2,3]),t(J,[2,4]),t(J,[2,5]),t(J,[2,6]),t(J,[2,7]),t(J,[2,8]),t(J,[2,9]),t(J,[2,10]),t(J,[2,11]),t(J,[2,12]),t(c,[2,52],{58:31,43:84,4:u,5:d,10:p,12:f,13:g,14:m,15:y,60:I,61:D,63:N,64:M,65:O,66:$,67:P}),t(c,[2,55],{58:31,43:85,4:u,5:d,10:p,12:f,13:g,14:m,15:y,60:I,61:D,63:N,64:M,65:O,66:$,67:P}),{46:[1,86]},{45:[1,87]},{4:tt,5:et,6:rt,8:nt,11:it,13:at,16:90,17:ot,18:st,19:lt,20:ct,22:89,23:88},t(J,[2,24]),t(c,[2,51],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,63:N,64:M,65:O,66:$,67:P}),t(c,[2,54],{59:60,58:61,4:u,5:d,8:B,10:p,12:f,13:g,14:m,15:y,18:F,63:N,64:M,65:O,66:$,67:P}),t(c,[2,47],{22:89,16:90,23:101,4:tt,5:et,6:rt,8:nt,11:it,13:at,17:ot,18:st,19:lt,20:ct}),{46:[1,102]},t(c,[2,29],{10:ht}),t(ut,[2,27],{16:104,4:tt,5:et,6:rt,8:nt,11:it,13:at,17:ot,18:st,19:lt,20:ct}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(c,[2,49],{10:ht}),t(c,[2,48],{22:89,16:90,23:105,4:tt,5:et,6:rt,8:nt,11:it,13:at,17:ot,18:st,19:lt,20:ct}),{4:tt,5:et,6:rt,8:nt,11:it,13:at,16:90,17:ot,18:st,19:lt,20:ct,22:106},t(dt,[2,26]),t(c,[2,50],{10:ht}),t(ut,[2,28],{16:104,4:tt,5:et,6:rt,8:nt,11:it,13:at,17:ot,18:st,19:lt,20:ct})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,r=[0],n=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=o.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;o.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){r.length=r.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),(0,i.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),a.push(p.yytext),o.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=a[a.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],a,o].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),a.push(A.$),o.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},ft=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(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,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function gt(){this.yy={}}return pt.lexer=ft,(0,i.K2)(gt,"Parser"),gt.prototype=pt,pt.Parser=gt,new gt}();o.parser=o;var s=o,l=(0,n.P$)(),c=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,i.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:n.UI.quadrantChart?.chartWidth||500,chartWidth:n.UI.quadrantChart?.chartHeight||500,titlePadding:n.UI.quadrantChart?.titlePadding||10,titleFontSize:n.UI.quadrantChart?.titleFontSize||20,quadrantPadding:n.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:n.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:n.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:n.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:n.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:n.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:n.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:n.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:n.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:n.UI.quadrantChart?.pointRadius||5,xAxisPosition:n.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:n.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:n.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:n.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,i.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){i.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){i.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){const i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,a={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},o=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,s={left:"left"===this.config.yAxisPosition&&r?o:0,right:"right"===this.config.yAxisPosition&&r?o:0},l=this.config.titleFontSize+2*this.config.titlePadding,c={top:n?l:0},h=this.config.quadrantPadding+s.left,u=this.config.quadrantPadding+a.top+c.top,d=this.config.chartWidth-2*this.config.quadrantPadding-s.left-s.right,p=this.config.chartHeight-2*this.config.quadrantPadding-a.top-a.bottom-c.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:c,quadrantSpace:{quadrantLeft:h,quadrantTop:u,quadrantWidth:d,quadrantHalfWidth:d/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(t,e,r,n){const{quadrantSpace:i,titleSpace:a}=n,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:l,quadrantHalfWidth:c,quadrantTop:h,quadrantWidth:u}=i,d=Boolean(this.data.xAxisRightText),p=Boolean(this.data.yAxisTopText),f=[];return this.data.xAxisLeftText&&e&&f.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&f.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+c+(d?c/2:0),y:"top"===t?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+h+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&f.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+s-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&f.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+u+this.config.quadrantPadding,y:h+o-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:-90}),f}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a}=e,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a,width:i,height:r,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a,width:i,height:r,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:n+i,y:a+r,width:i,height:r,fill:this.themeConfig.quadrant4Fill}];for(const s of o)s.text.x=s.x+s.width/2,0===this.data.points.length?(s.text.y=s.y+s.height/2,s.text.horizontalPos="middle"):(s.text.y=s.y+this.config.quadrantTextTopPadding,s.text.horizontalPos="top");return o}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:o}=e,s=(0,a.m4Y)().domain([0,1]).range([n,o+n]),l=(0,a.m4Y)().domain([0,1]).range([r+i,i]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:s(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:l}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:s,x2:a+l+e,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:s+e,x2:a+l,y2:s+i-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-e,y1:s+i,x2:a+l+e,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+e,x2:a,y2:s+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+e,x2:a+o,y2:s+i-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+e,y1:s+n,x2:a+l-e,y2:s+n}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(n,t,e,r);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(n,t,e,i),borderLines:this.getBorders(i),title:this.getTitle(r)}}},h=class extends Error{static{(0,i.K2)(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};function u(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function d(t){return!/^\d+$/.test(t)}function p(t){return!/^\d+px$/.test(t)}(0,i.K2)(u,"validateHexCode"),(0,i.K2)(d,"validateNumber"),(0,i.K2)(p,"validateSizeInPixels");var f=(0,n.D7)();function g(t){return(0,n.jZ)(t.trim(),f)}(0,i.K2)(g,"textSanitizer");var m=new c;function y(t){m.setData({quadrant1Text:g(t.text)})}function v(t){m.setData({quadrant2Text:g(t.text)})}function b(t){m.setData({quadrant3Text:g(t.text)})}function x(t){m.setData({quadrant4Text:g(t.text)})}function T(t){m.setData({xAxisLeftText:g(t.text)})}function w(t){m.setData({xAxisRightText:g(t.text)})}function k(t){m.setData({yAxisTopText:g(t.text)})}function C(t){m.setData({yAxisBottomText:g(t.text)})}function E(t){const e={};for(const r of t){const[t,n]=r.trim().split(/\s*:\s*/);if("radius"===t){if(d(n))throw new h(t,n,"number");e.radius=parseInt(n)}else if("color"===t){if(u(n))throw new h(t,n,"hex code");e.color=n}else if("stroke-color"===t){if(u(n))throw new h(t,n,"hex code");e.strokeColor=n}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(p(n))throw new h(t,n,"number of pixels (eg. 10px)");e.strokeWidth=n}}return e}function S(t,e,r,n,i){const a=E(i);m.addPoints([{x:r,y:n,text:g(t.text),className:e,...a}])}function _(t,e){m.addClass(t,E(e))}function A(t){m.setConfig({chartWidth:t})}function R(t){m.setConfig({chartHeight:t})}function L(){const t=(0,n.D7)(),{themeVariables:e,quadrantChart:r}=t;return r&&m.setConfig(r),m.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),m.setData({titleText:(0,n.ab)()}),m.build()}(0,i.K2)(y,"setQuadrant1Text"),(0,i.K2)(v,"setQuadrant2Text"),(0,i.K2)(b,"setQuadrant3Text"),(0,i.K2)(x,"setQuadrant4Text"),(0,i.K2)(T,"setXAxisLeftText"),(0,i.K2)(w,"setXAxisRightText"),(0,i.K2)(k,"setYAxisTopText"),(0,i.K2)(C,"setYAxisBottomText"),(0,i.K2)(E,"parseStyles"),(0,i.K2)(S,"addPoint"),(0,i.K2)(_,"addClass"),(0,i.K2)(A,"setWidth"),(0,i.K2)(R,"setHeight"),(0,i.K2)(L,"getQuadrantData");var I={parser:s,db:{setWidth:A,setHeight:R,setQuadrant1Text:y,setQuadrant2Text:v,setQuadrant3Text:b,setQuadrant4Text:x,setXAxisLeftText:T,setXAxisRightText:w,setYAxisTopText:k,setYAxisBottomText:C,parseStyles:E,addPoint:S,addClass:_,getQuadrantData:L,clear:(0,i.K2)(function(){m.clear(),(0,n.IU)()},"clear"),setAccTitle:n.SV,getAccTitle:n.iN,setDiagramTitle:n.ke,getDiagramTitle:n.ab,getAccDescription:n.m7,setAccDescription:n.EI},renderer:{draw:(0,i.K2)((t,e,r,o)=>{function s(t){return"top"===t?"hanging":"middle"}function l(t){return"left"===t?"start":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,i.K2)(s,"getDominantBaseLine"),(0,i.K2)(l,"getTextAnchor"),(0,i.K2)(c,"getTransformation");const h=(0,n.D7)();i.Rm.debug("Rendering quadrant chart\n"+t);const u=h.securityLevel;let d;"sandbox"===u&&(d=(0,a.Ltv)("#i"+e));const p=("sandbox"===u?(0,a.Ltv)(d.nodes()[0].contentDocument.body):(0,a.Ltv)("body")).select(`[id="${e}"]`),f=p.append("g").attr("class","main"),g=h.quadrantChart?.chartWidth??500,m=h.quadrantChart?.chartHeight??500;(0,n.a$)(p,m,g,h.quadrantChart?.useMaxWidth??!0),p.attr("viewBox","0 0 "+g+" "+m),o.db.setHeight(m),o.db.setWidth(g);const y=o.db.getQuadrantData(),v=f.append("g").attr("class","quadrants"),b=f.append("g").attr("class","border"),x=f.append("g").attr("class","data-points"),T=f.append("g").attr("class","labels"),w=f.append("g").attr("class","title");y.title&&w.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",s(y.title.horizontalPos)).attr("text-anchor",l(y.title.verticalPos)).attr("transform",c(y.title)).text(y.title.text),y.borderLines&&b.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const k=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),k.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>s(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>c(t.text)).text(t=>t.text.text);T.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>s(t.horizontalPos)).attr("text-anchor",t=>l(t.verticalPos)).attr("transform",t=>c(t));const C=x.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");C.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),C.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>s(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>c(t.text))},"draw")},styles:(0,i.K2)(()=>"","styles")}},685(t,e,r){"use strict";r.d(e,{diagram:()=>m});var n=r(9625),i=r(4345),a=r(3848),o=(r(6615),r(1334),r(2654),r(5105),r(8013),r(1240),r(8221)),s=r(1123),l=r(797),c=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],s=[2,7],c=[1,26],h=[1,27],u=[1,28],d=[1,29],p=[1,33],f=[1,34],g=[1,35],m=[1,36],y=[1,37],v=[1,38],b=[1,24],x=[1,31],T=[1,32],w=[1,30],k=[1,39],C=[1,40],E=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],S=[1,61],_=[89,90],A=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],R=[27,29],L=[1,70],I=[1,71],D=[1,72],N=[1,73],M=[1,74],O=[1,75],$=[1,76],P=[1,83],B=[1,80],F=[1,84],z=[1,85],K=[1,86],j=[1,87],q=[1,88],W=[1,89],U=[1,90],G=[1,91],Y=[1,92],V=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],X=[1,101],Z=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Q=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[1,110],tt=[1,106],et=[1,107],rt=[1,108],nt=[1,109],it=[1,111],at=[1,116],ot=[1,117],st=[1,114],lt=[1,115],ct={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType: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:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(a[s-3],a[s-4]);break;case 22:n.addRequirement(a[s-5],a[s-6]),n.setClass([a[s-5]],a[s-3]);break;case 23:n.setNewReqId(a[s-2]);break;case 24:n.setNewReqText(a[s-2]);break;case 25:n.setNewReqRisk(a[s-2]);break;case 26:n.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(a[s-3]);break;case 43:n.addElement(a[s-5]),n.setClass([a[s-5]],a[s-3]);break;case 44:n.setNewElementType(a[s-2]);break;case 45:n.setNewElementDocRef(a[s-2]);break;case 48:n.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:n.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=a[s-2],n.defineClass(a[s-1],a[s]);break;case 58:n.setClass(a[s-1],a[s]);break;case 59:n.setClass([a[s-2]],a[s]);break;case 60:case 62:case 65:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],n.setCssStyle(a[s-1],a[s]);break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:o,7:13,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:43,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:44,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:45,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:46,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:47,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:48,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:49,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{4:17,5:o,7:50,8:s,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:d,25:23,33:25,41:p,42:f,43:g,44:m,45:y,46:v,54:b,72:x,74:T,77:w,89:k,90:C},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(E,[2,17]),t(E,[2,18]),t(E,[2,19]),t(E,[2,20]),{30:60,33:62,75:S,89:k,90:C},{30:63,33:62,75:S,89:k,90:C},{30:64,33:62,75:S,89:k,90:C},t(_,[2,29]),t(_,[2,30]),t(_,[2,31]),t(_,[2,32]),t(_,[2,33]),t(_,[2,34]),t(A,[2,81]),t(A,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(R,[2,79]),t(R,[2,80]),{27:[1,67],29:[1,68]},t(R,[2,85]),t(R,[2,86]),{62:69,65:L,66:I,67:D,68:N,69:M,70:O,71:$},{62:77,65:L,66:I,67:D,68:N,69:M,70:O,71:$},{30:78,33:62,75:S,89:k,90:C},{73:79,75:P,76:B,78:81,79:82,80:F,81:z,82:K,83:j,84:q,85:W,86:U,87:G,88:Y},t(V,[2,60]),t(V,[2,62]),{73:93,75:P,76:B,78:81,79:82,80:F,81:z,82:K,83:j,84:q,85:W,86:U,87:G,88:Y},{30:94,33:62,75:S,76:B,89:k,90:C},{5:[1,95]},{30:96,33:62,75:S,89:k,90:C},{5:[1,97]},{30:98,33:62,75:S,89:k,90:C},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(E,[2,59],{76:B}),t(E,[2,64],{76:X}),{33:103,75:[1,102],89:k,90:C},t(Z,[2,65],{79:104,75:P,80:F,81:z,82:K,83:j,84:q,85:W,86:U,87:G,88:Y}),t(Q,[2,67]),t(Q,[2,69]),t(Q,[2,70]),t(Q,[2,71]),t(Q,[2,72]),t(Q,[2,73]),t(Q,[2,74]),t(Q,[2,75]),t(Q,[2,76]),t(Q,[2,77]),t(Q,[2,78]),t(E,[2,57],{76:X}),t(E,[2,58],{76:B}),{5:J,28:105,31:tt,34:et,36:rt,38:nt,40:it},{27:[1,112],76:B},{5:at,40:ot,56:113,57:st,59:lt},{27:[1,118],76:B},{33:119,89:k,90:C},{33:120,89:k,90:C},{75:P,78:121,79:82,80:F,81:z,82:K,83:j,84:q,85:W,86:U,87:G,88:Y},t(V,[2,61]),t(V,[2,63]),t(Q,[2,68]),t(E,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:J,28:126,31:tt,34:et,36:rt,38:nt,40:it},t(E,[2,28]),{5:[1,127]},t(E,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:ot,56:130,57:st,59:lt},t(E,[2,47]),{5:[1,131]},t(E,[2,48]),t(E,[2,49]),t(Z,[2,66],{79:104,75:P,80:F,81:z,82:K,83:j,84:q,85:W,86:U,87:G,88:Y}),{33:132,89:k,90:C},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(E,[2,27]),{5:J,28:145,31:tt,34:et,36:rt,38:nt,40:it},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(E,[2,46]),{5:at,40:ot,56:152,57:st,59:lt},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(E,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(E,[2,43]),{5:J,28:159,31:tt,34:et,36:rt,38:nt,40:it},{5:J,28:160,31:tt,34:et,36:rt,38:nt,40:it},{5:J,28:161,31:tt,34:et,36:rt,38:nt,40:it},{5:J,28:162,31:tt,34:et,36:rt,38:nt,40:it},{5:at,40:ot,56:163,57:st,59:lt},{5:at,40:ot,56:164,57:st,59:lt},t(E,[2,23]),t(E,[2,24]),t(E,[2,25]),t(E,[2,26]),t(E,[2,44]),t(E,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},ht=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return e.yytext=e.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/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,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ut(){this.yy={}}return ct.lexer=ht,(0,l.K2)(ut,"Parser"),ut.prototype=ct,ct.Parser=ut,new ut}();c.parser=c;var h=c,u=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=s.SV,this.getAccTitle=s.iN,this.setAccDescription=s.EI,this.getAccDescription=s.m7,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.getConfig=(0,l.K2)(()=>(0,s.D7)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.K2)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),l.Rm.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,r){this.relations.push({type:t,src:e,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,s.IU)()}setCssStyle(t,e){for(const r of t){const t=this.requirements.get(r)??this.elements.get(r);if(!e||!t)return;for(const r of e)r.includes(",")?t.cssStyles.push(...r.split(",")):t.cssStyles.push(r)}}setClass(t,e){for(const r of t){const t=this.requirements.get(r)??this.elements.get(r);if(t)for(const r of e){t.classes.push(r);const e=this.classes.get(r)?.styles;e&&t.cssStyles.push(...e)}}}defineClass(t,e){for(const r of t){let t=this.classes.get(r);void 0===t&&(t={id:r,styles:[],textStyles:[]},this.classes.set(r,t)),e&&e.forEach(function(e){if(/color/.exec(e)){const r=e.replace("fill","bgFill");t.textStyles.push(r)}t.styles.push(e)}),this.requirements.forEach(t=>{t.classes.includes(r)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(r)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){const t=(0,s.D7)(),e=[],r=[];for(const n of this.requirements.values()){const r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(" "),r.shape="requirementBox",r.look=t.look,r.colorIndex=e.length,e.push(r)}for(const n of this.elements.values()){const r=n;r.shape="requirementBox",r.look=t.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(" "),r.colorIndex=e.length,e.push(r)}for(const n of this.relations){let e=0;const i=n.type===this.Relationships.CONTAINS,a={id:`${n.src}-${n.dst}-${e}`,start:this.requirements.get(n.src)?.name??this.elements.get(n.src)?.name,end:this.requirements.get(n.dst)?.name??this.elements.get(n.dst)?.name,label:`<<${n.type}>>`,classes:"relationshipLine",style:["fill:none",i?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:i?"normal":"dashed",arrowTypeStart:i?"requirement_contains":"",arrowTypeEnd:i?"":"requirement_arrow",look:t.look,labelType:"markdown"};r.push(a),e++}return{nodes:e,edges:r,other:{},config:t,direction:this.getDirection()}}},d=(0,l.K2)(t=>{const e=(0,s.zj)(),{themeVariables:r,look:n}=e,{bkgColorArray:i,borderColorArray:a}=r;if(!a?.length)return"";let o="";for(let s=0;s<t.THEME_COLOR_LIMIT;s++)o+=`\n\n [data-look="${n}"][data-color-id="color-${s}"].node path {\n stroke: ${a[s]};\n fill: ${i?.length?i[s]:""};\n }\n\n [data-look="${n}"][data-color-id="color-${s}"].node rect {\n stroke: ${a[s]};\n fill: ${i?.length?i[s]:""};\n }\n `;return o},"genColor"),p=(0,l.K2)(t=>{const e=(0,s.zj)(),{look:r,themeVariables:n}=e,{requirementEdgeLabelBackground:i}=n;return`\n ${d(t)}\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: ${"neo"===r?t.strokeWidth:"1px"};\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.relationLabelColor};\n }\n .divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n .labelBkg {\n background-color: ${i??t.edgeLabelBackground};\n }\n\n`},"getStyles"),f={};(0,l.VA)(f,{draw:()=>g});var g=(0,l.K2)(async function(t,e,r,c){l.Rm.info("REF0:"),l.Rm.info("Drawing requirement diagram (unified)",e);const{securityLevel:h,state:u,layout:d,look:p}=(0,s.D7)(),f=c.db.getData(),g=(0,n.A)(e,h);f.type=c.type,f.layoutAlgorithm=(0,a.q7)(d),f.nodeSpacing=u?.nodeSpacing??50,f.rankSpacing=u?.rankSpacing??50,f.markers="neo"===p?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],f.diagramId=e,await(0,a.XX)(f,g);o._K.insertTitle(g,"requirementDiagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,i.P)(g,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),m={parser:h,get db(){return new u},renderer:f,styles:p}},7581(t,e,r){"use strict";r.d(e,{diagram:()=>lt});var n=r(1123),i=r(797),a=r(1444);function o(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function s(t){return t.target.depth}function l(t,e){return t.sourceLinks.length?t.depth:e-1}function c(t,e){let r=0;if(void 0===e)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}function h(t,e){let r;if(void 0===e)for(const n of t)null!=n&&(r<n||void 0===r&&n>=n)&&(r=n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function u(t){return function(){return t}}function d(t,e){return f(t.source,e.source)||t.index-e.index}function p(t,e){return f(t.target,e.target)||t.index-e.index}function f(t,e){return t.y0-e.y0}function g(t){return t.value}function m(t){return t.index}function y(t){return t.nodes}function v(t){return t.links}function b(t,e){const r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function x({nodes:t}){for(const e of t){let t=e.y0,r=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const n of e.targetLinks)n.y1=r+n.width/2,r+=n.width}}function T(){let t,e,r,n=0,i=0,a=1,s=1,T=24,w=8,k=m,C=l,E=y,S=v,_=6;function A(){const l={nodes:E.apply(null,arguments),links:S.apply(null,arguments)};return function({nodes:t,links:e}){for(const[r,i]of t.entries())i.index=r,i.sourceLinks=[],i.targetLinks=[];const n=new Map(t.map((e,r)=>[k(e,r,t),e]));for(const[r,i]of e.entries()){i.index=r;let{source:t,target:e}=i;"object"!=typeof t&&(t=i.source=b(n,t)),"object"!=typeof e&&(e=i.target=b(n,e)),t.sourceLinks.push(i),e.targetLinks.push(i)}if(null!=r)for(const{sourceLinks:i,targetLinks:a}of t)i.sort(r),a.sort(r)}(l),function({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(c(e.sourceLinks,g),c(e.targetLinks,g)):e.fixedValue}(l),function({nodes:t}){const e=t.length;let r=new Set(t),n=new Set,i=0;for(;r.size;){for(const t of r){t.depth=i;for(const{target:e}of t.sourceLinks)n.add(e)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}(l),function({nodes:t}){const e=t.length;let r=new Set(t),n=new Set,i=0;for(;r.size;){for(const t of r){t.height=i;for(const{source:e}of t.targetLinks)n.add(e)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}(l),function(r){const l=function({nodes:t}){const r=h(t,t=>t.depth)+1,i=(a-n-T)/(r-1),o=new Array(r);for(const e of t){const t=Math.max(0,Math.min(r-1,Math.floor(C.call(null,e,r))));e.layer=t,e.x0=n+t*i,e.x1=e.x0+T,o[t]?o[t].push(e):o[t]=[e]}if(e)for(const n of o)n.sort(e);return o}(r);t=Math.min(w,(s-i)/(h(l,t=>t.length)-1)),function(e){const r=o(e,e=>(s-i-(e.length-1)*t)/c(e,g));for(const n of e){let e=i;for(const i of n){i.y0=e,i.y1=e+i.value*r,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*r}e=(s-e+t)/(n.length+1);for(let t=0;t<n.length;++t){const r=n[t];r.y0+=e*(t+1),r.y1+=e*(t+1)}O(n)}}(l);for(let t=0;t<_;++t){const e=Math.pow(.99,t),r=Math.max(1-e,(t+1)/_);L(l,e,r),R(l,e,r)}}(l),x(l),l}function R(t,r,n){for(let i=1,a=t.length;i<a;++i){const a=t[i];for(const t of a){let e=0,n=0;for(const{source:r,value:a}of t.targetLinks){let i=a*(t.layer-r.layer);e+=$(r,t)*i,n+=i}if(!(n>0))continue;let i=(e/n-t.y0)*r;t.y0+=i,t.y1+=i,M(t)}void 0===e&&a.sort(f),I(a,n)}}function L(t,r,n){for(let i=t.length-2;i>=0;--i){const a=t[i];for(const t of a){let e=0,n=0;for(const{target:r,value:a}of t.sourceLinks){let i=a*(r.layer-t.layer);e+=P(t,r)*i,n+=i}if(!(n>0))continue;let i=(e/n-t.y0)*r;t.y0+=i,t.y1+=i,M(t)}void 0===e&&a.sort(f),I(a,n)}}function I(e,r){const n=e.length>>1,a=e[n];N(e,a.y0-t,n-1,r),D(e,a.y1+t,n+1,r),N(e,s,e.length-1,r),D(e,i,0,r)}function D(e,r,n,i){for(;n<e.length;++n){const a=e[n],o=(r-a.y0)*i;o>1e-6&&(a.y0+=o,a.y1+=o),r=a.y1+t}}function N(e,r,n,i){for(;n>=0;--n){const a=e[n],o=(a.y1-r)*i;o>1e-6&&(a.y0-=o,a.y1-=o),r=a.y0-t}}function M({sourceLinks:t,targetLinks:e}){if(void 0===r){for(const{source:{sourceLinks:t}}of e)t.sort(p);for(const{target:{targetLinks:e}}of t)e.sort(d)}}function O(t){if(void 0===r)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(p),r.sort(d)}function $(e,r){let n=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:a}of e.sourceLinks){if(i===r)break;n+=a+t}for(const{source:t,width:i}of r.targetLinks){if(t===e)break;n-=i}return n}function P(e,r){let n=r.y0-(r.targetLinks.length-1)*t/2;for(const{source:i,width:a}of r.targetLinks){if(i===e)break;n+=a+t}for(const{target:t,width:i}of e.sourceLinks){if(t===r)break;n-=i}return n}return A.update=function(t){return x(t),t},A.nodeId=function(t){return arguments.length?(k="function"==typeof t?t:u(t),A):k},A.nodeAlign=function(t){return arguments.length?(C="function"==typeof t?t:u(t),A):C},A.nodeSort=function(t){return arguments.length?(e=t,A):e},A.nodeWidth=function(t){return arguments.length?(T=+t,A):T},A.nodePadding=function(e){return arguments.length?(w=t=+e,A):w},A.nodes=function(t){return arguments.length?(E="function"==typeof t?t:u(t),A):E},A.links=function(t){return arguments.length?(S="function"==typeof t?t:u(t),A):S},A.linkSort=function(t){return arguments.length?(r=t,A):r},A.size=function(t){return arguments.length?(n=i=0,a=+t[0],s=+t[1],A):[a-n,s-i]},A.extent=function(t){return arguments.length?(n=+t[0][0],a=+t[1][0],i=+t[0][1],s=+t[1][1],A):[[n,i],[a,s]]},A.iterations=function(t){return arguments.length?(_=+t,A):_},A}var w=Math.PI,k=2*w,C=1e-6,E=k-C;function S(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _(){return new S}S.prototype=_.prototype={constructor:S,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(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,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,o=this._y1,s=r-t,l=n-e,c=a-t,h=o-e,u=c*c+h*h;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(u>C)if(Math.abs(h*s-l*c)>C&&i){var d=r-a,p=n-o,f=s*s+l*l,g=d*d+p*p,m=Math.sqrt(f),y=Math.sqrt(u),v=i*Math.tan((w-Math.acos((f+u-g)/(2*m*y)))/2),b=v/y,x=v/m;Math.abs(b-1)>C&&(this._+="L"+(t+b*c)+","+(e+b*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>c*p)+","+(this._x1=t+x*s)+","+(this._y1=e+x*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,r,n,i,a){t=+t,e=+e,a=!!a;var o=(r=+r)*Math.cos(n),s=r*Math.sin(n),l=t+o,c=e+s,h=1^a,u=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>C||Math.abs(this._y1-c)>C)&&(this._+="L"+l+","+c),r&&(u<0&&(u=u%k+k),u>E?this._+="A"+r+","+r+",0,1,"+h+","+(t-o)+","+(e-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=c):u>C&&(this._+="A"+r+","+r+",0,"+ +(u>=w)+","+h+","+(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._}};const A=_;var R=Array.prototype.slice;function L(t){return function(){return t}}function I(t){return t[0]}function D(t){return t[1]}function N(t){return t.source}function M(t){return t.target}function O(t){var e=N,r=M,n=I,i=D,a=null;function o(){var o,s=R.call(arguments),l=e.apply(this,s),c=r.apply(this,s);if(a||(a=o=A()),t(a,+n.apply(this,(s[0]=l,s)),+i.apply(this,s),+n.apply(this,(s[0]=c,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(r=t,o):r},o.x=function(t){return arguments.length?(n="function"==typeof t?t:L(+t),o):n},o.y=function(t){return arguments.length?(i="function"==typeof t?t:L(+t),o):i},o.context=function(t){return arguments.length?(a=t??null,o):a},o}function $(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function P(t){return[t.source.x1,t.y0]}function B(t){return[t.target.x0,t.y1]}function F(){return O($).source(P).target(B)}Object.defineProperty(L,"name",{value:"default",configurable:!0}),Object.defineProperty(F,"name",{value:"default",configurable:!0});var z=function(){var t=(0,i.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],a={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,i.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 7:const t=n.findOrCreateNode(a[s-4].trim().replaceAll('""','"')),e=n.findOrCreateNode(a[s-2].trim().replaceAll('""','"')),r=parseFloat(a[s].trim());n.addLink(t,e,r);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,i.K2)(function(t){var e=this,r=[0],n=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=o.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;o.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(t){r.length=r.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),(0,i.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),a.push(p.yytext),o.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=a[a.length-E],A._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(A._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],a,o].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),a.push(A.$),o.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},o=function(){return{EOF:1,parseError:(0,i.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,i.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,i.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,i.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,i.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(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,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,i.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,i.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(t,e,r,n){switch(r){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function s(){this.yy={}}return a.lexer=o,(0,i.K2)(s,"Parser"),s.prototype=a,a.Parser=s,new s}();z.parser=z;var K=z,j=[],q=[],W=new Map,U=(0,i.K2)(()=>{j=[],q=[],W=new Map,(0,n.IU)()},"clear"),G=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{(0,i.K2)(this,"SankeyLink")}},Y=(0,i.K2)((t,e,r)=>{j.push(new G(t,e,r))},"addLink"),V=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},H=(0,i.K2)(t=>{t=n.Y2.sanitizeText(t,(0,n.D7)());let e=W.get(t);return void 0===e&&(e=new V(t),W.set(t,e),q.push(e)),e},"findOrCreateNode"),X=(0,i.K2)(()=>q,"getNodes"),Z=(0,i.K2)(()=>j,"getLinks"),Q=(0,i.K2)(()=>({nodes:q.map(t=>({id:t.ID})),links:j.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:W,getConfig:(0,i.K2)(()=>(0,n.D7)().sankey,"getConfig"),getNodes:X,getLinks:Z,getGraph:Q,addLink:Y,findOrCreateNode:H,getAccTitle:n.iN,setAccTitle:n.SV,getAccDescription:n.m7,setAccDescription:n.EI,getDiagramTitle:n.ab,setDiagramTitle:n.ke,clear:U},tt=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},et={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?o(t.sourceLinks,s)-1:0},justify:l},rt=(0,i.K2)(t=>{let e=0,r=0;for(const n of t){const t=n.value??0;t>e&&(e=t,r=n.layer??0)}return r},"findCentralNodeLayer"),nt=(0,i.K2)(function(t,e,r,o){const{securityLevel:s,sankey:l}=(0,n.D7)(),c=n.ME.sankey;let h;"sandbox"===s&&(h=(0,a.Ltv)("#i"+e));const u="sandbox"===s?(0,a.Ltv)(h.nodes()[0].contentDocument.body):(0,a.Ltv)("body"),d="sandbox"===s?u.select(`[id="${e}"]`):(0,a.Ltv)(`[id="${e}"]`),p=l?.width??c.width,f=l?.height??c.width,g=l?.useMaxWidth??c.useMaxWidth,m=l?.nodeAlignment??c.nodeAlignment,y=l?.prefix??c.prefix,v=l?.suffix??c.suffix,b=l?.showValues??c.showValues,x=l?.nodeWidth??c.nodeWidth??10,w=l?.nodePadding??c.nodePadding??12,k=l?.labelStyle??c.labelStyle??"legacy",C=l?.nodeColors??{},E=o.db.getGraph(),S=et[m];T().nodeId(t=>t.id).nodeWidth(x).nodePadding(w+(b?15:0)).nodeAlign(S).extent([[0,0],[p,f]])(E);const _=rt(E.nodes),A=(0,a.UMr)(a.zt),R=(0,i.K2)(t=>C[t]??A(t),"getNodeColor");d.append("g").attr("class","nodes").selectAll(".node").data(E.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>R(t.id));const L=(0,i.K2)(({id:t,value:e})=>b?`${t}\n${y}${Math.round(100*e)/100}${v}`:t,"getText"),I=(0,i.K2)(t=>{if("outlined"===k){return(t.layer??0)<_?{x:t.x0-6,anchor:"end"}:{x:t.x1+6,anchor:"start"}}return t.x0<p/2?{x:t.x1+6,anchor:"start"}:{x:t.x0-6,anchor:"end"}},"getLabelPosition"),D=d.append("g").attr("class","node-labels").attr("font-size",14),N=(0,i.K2)(t=>D.selectAll(t?`.${t}`:"text").data(E.nodes).join("text").attr("class",t??null).attr("x",t=>I(t).x).attr("y",t=>(t.y1+t.y0)/2).attr("dy",(b?"0":"0.35")+"em").attr("text-anchor",t=>I(t).anchor).text(L),"appendLabel");"outlined"===k?(N("sankey-label-bg"),N("sankey-label-fg")):N();const M=d.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(E.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),O=l?.linkColor??"gradient";if("gradient"===O){const t=M.append("linearGradient").attr("id",t=>(t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>R(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>R(t.target.id))}let $;switch(O){case"gradient":$=(0,i.K2)(t=>t.uid,"coloring");break;case"source":$=(0,i.K2)(t=>R(t.source.id),"coloring");break;case"target":$=(0,i.K2)(t=>R(t.target.id),"coloring");break;default:$=O}M.append("path").attr("d",F()).attr("stroke",$).attr("stroke-width",t=>Math.max(1,t.width)),(0,n.ot)(void 0,d,0,g)},"draw"),it={draw:nt},at=(0,i.K2)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),ot=(0,i.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n }\n\n .node-labels {\n font-family: ${t.fontFamily};\n }\n\n /* Outlined label style - background stroke for better readability */\n .sankey-label-bg {\n stroke: ${t.mainBkg||t.background||"#fff"};\n stroke-width: 4px;\n stroke-linejoin: round;\n paint-order: stroke;\n }\n\n /* Foreground label text */\n .sankey-label-fg {\n fill: ${t.textColor};\n }\n\n /* Node styling */\n .node rect {\n shape-rendering: crispEdges;\n }\n\n /* Link styling */\n .link {\n fill: none;\n stroke-opacity: 0.5;\n mix-blend-mode: multiply;\n }\n`,"getStyles"),st=K.parse.bind(K);K.parse=t=>st(at(t));var lt={styles:ot,parser:K,db:J,renderer:it}},6246(t,e,r){"use strict";r.d(e,{diagram:()=>Kt});var n=r(3283),i=r(8343),a=r(2938),o=r(8221),s=r(1123),l=r(797),c=r(1444),h=r(6750),u=function(){var t=(0,l.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,12],c=[1,14],h=[1,15],u=[1,17],d=[1,18],p=[1,19],f=[1,25],g=[1,26],m=[1,27],y=[1,28],v=[1,29],b=[1,30],x=[1,31],T=[1,32],w=[1,33],k=[1,34],C=[1,35],E=[1,36],S=[1,37],_=[1,38],A=[1,39],R=[1,40],L=[1,42],I=[1,43],D=[1,44],N=[1,45],M=[1,46],O=[1,47],$=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],P=[1,74],B=[1,80],F=[1,81],z=[1,82],K=[1,83],j=[1,84],q=[1,85],W=[1,86],U=[1,87],G=[1,88],Y=[1,89],V=[1,90],H=[1,91],X=[1,92],Z=[1,93],Q=[1,94],J=[1,95],tt=[1,96],et=[1,97],rt=[1,98],nt=[1,99],it=[1,100],at=[1,101],ot=[1,102],st=[1,103],lt=[1,104],ct=[1,105],ht=[2,78],ut=[4,5,17,51,53,54],dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],pt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],ft=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],mt=[5,52],yt=[70,71,72,73],vt=[1,151],bt={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,l.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 3:return n.apply(a[s]),a[s];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:case 67:this.$=a[s];break;case 16:a[s].type="createParticipant",this.$=a[s];break;case 17:a[s-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[s-2])}),a[s-1].push({type:"boxEnd",boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:n.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:n.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:"loopStart",loopText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:"rectStart",color:n.parseMessage(a[s-2]),signalType:n.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:n.parseMessage(a[s-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:"optStart",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:"altStart",altText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:"parStart",parText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:"parStart",parText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[s-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.CRITICAL_START}),a[s-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:"breakStart",breakText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.BREAK_START}),a[s-1].push({type:"breakEnd",optText:n.parseMessage(a[s-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:"option",optionText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:"and",parText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:"else",altText:n.parseMessage(a[s-1]),signalType:n.LINETYPE.ALT_ELSE},a[s]]);break;case 49:case 54:a[s-3].draw="participant",a[s-3].type="addParticipant",a[s-3].description=n.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:case 55:a[s-1].draw="participant",a[s-1].type="addParticipant",this.$=a[s-1];break;case 51:case 56:a[s-3].draw="actor",a[s-3].type="addParticipant",a[s-3].description=n.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw="actor",a[s-1].type="addParticipant",this.$=a[s-1];break;case 53:a[s-1].type="destroyParticipant",this.$=a[s-1];break;case 58:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:"addLinks",actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:"addALink",actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:"addProperties",actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:"addDetails",actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 68:this.$=n.PLACEMENT.LEFTOF;break;case 69:this.$=n.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:n.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:n.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:n.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:n.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:"addMessage",from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:n.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:n.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:"centralConnectionReverse",signalType:n.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:"addParticipant",actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:"addParticipant",actor:a[s]};break;case 79:this.$=n.LINETYPE.SOLID_OPEN;break;case 80:this.$=n.LINETYPE.DOTTED_OPEN;break;case 81:this.$=n.LINETYPE.SOLID;break;case 82:this.$=n.LINETYPE.SOLID_TOP;break;case 83:this.$=n.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=n.LINETYPE.STICK_TOP;break;case 85:this.$=n.LINETYPE.STICK_BOTTOM;break;case 86:this.$=n.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=n.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=n.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=n.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=n.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=n.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=n.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=n.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=n.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=n.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=n.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=n.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=n.LINETYPE.DOTTED;break;case 100:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=n.LINETYPE.SOLID_CROSS;break;case 102:this.$=n.LINETYPE.DOTTED_CROSS;break;case 103:this.$=n.LINETYPE.SOLID_POINT;break;case 104:this.$=n.LINETYPE.DOTTED_POINT;break;case 105:this.$=n.parseMessage(a[s].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},t($,[2,5]),{9:48,13:13,14:c,15:h,18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},t($,[2,7]),t($,[2,8]),t($,[2,9]),t($,[2,15]),{13:49,51:_,53:A,54:R},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:O},{23:56,73:O},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t($,[2,30]),t($,[2,31]),{33:[1,62]},{35:[1,63]},t($,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:P},{23:75,55:76,73:P},{23:77,73:O},{69:78,72:[1,79],78:B,79:F,80:z,81:K,82:j,83:q,84:W,85:U,86:G,87:Y,88:V,89:H,90:X,91:Z,92:Q,93:J,94:tt,95:et,96:rt,97:nt,98:it,99:at,100:ot,101:st,102:lt,103:ct},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:O},{23:111,73:O},{23:112,73:O},{23:113,73:O},t([5,66,72,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],ht),t($,[2,6]),t($,[2,16]),t(ut,[2,10],{11:114}),t($,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t($,[2,22]),{5:[1,118]},{5:[1,119]},t($,[2,25]),t($,[2,26]),t($,[2,27]),t($,[2,28]),t($,[2,29]),t($,[2,32]),t($,[2,33]),t(dt,i,{7:120}),t(dt,i,{7:121}),t(dt,i,{7:122}),t(pt,i,{41:123,7:124}),t(ft,i,{43:125,7:126}),t(ft,i,{7:126,43:127}),t(gt,i,{46:128,7:129}),t(dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(mt,ht,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:O},{69:146,78:B,79:F,80:z,81:K,82:j,83:q,84:W,85:U,86:G,87:Y,88:V,89:H,90:X,91:Z,92:Q,93:J,94:tt,95:et,96:rt,97:nt,98:it,99:at,100:ot,101:st,102:lt,103:ct},t(yt,[2,79]),t(yt,[2,80]),t(yt,[2,81]),t(yt,[2,82]),t(yt,[2,83]),t(yt,[2,84]),t(yt,[2,85]),t(yt,[2,86]),t(yt,[2,87]),t(yt,[2,88]),t(yt,[2,89]),t(yt,[2,90]),t(yt,[2,91]),t(yt,[2,92]),t(yt,[2,93]),t(yt,[2,94]),t(yt,[2,95]),t(yt,[2,96]),t(yt,[2,97]),t(yt,[2,98]),t(yt,[2,99]),t(yt,[2,100]),t(yt,[2,101]),t(yt,[2,102]),t(yt,[2,103]),t(yt,[2,104]),{23:147,73:O},{23:149,60:148,73:O},{73:[2,68]},{73:[2,69]},{58:150,104:vt},{58:152,104:vt},{58:153,104:vt},{58:154,104:vt},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:_,53:A,54:R},{5:[1,160]},t($,[2,20]),t($,[2,21]),t($,[2,23]),t($,[2,24]),{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,17:[1,161],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,17:[1,162],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,17:[1,163],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},{17:[1,164]},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,17:[2,47],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,50:[1,165],51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},{17:[1,166]},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,17:[2,45],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,49:[1,167],51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},{17:[1,168]},{17:[1,169]},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,17:[2,43],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,48:[1,170],51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},{4:a,5:o,8:8,9:10,10:s,13:13,14:c,15:h,17:[1,171],18:16,19:u,22:d,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:f,31:g,32:m,34:y,36:v,37:b,38:x,39:T,40:w,42:k,44:C,45:E,47:S,51:_,53:A,54:R,56:L,61:I,62:D,63:N,64:M,73:O},{16:[1,172]},t($,[2,50]),{16:[1,173]},t($,[2,55]),t(mt,[2,76]),{76:[1,174]},{16:[1,175]},t($,[2,52]),{16:[1,176]},t($,[2,57]),t($,[2,53]),{23:177,73:O},{23:178,73:O},{23:179,73:O},{58:180,104:vt},{23:181,72:[1,182],73:O},{58:183,104:vt},{58:184,104:vt},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t($,[2,17]),t(ut,[2,11]),{13:186,51:_,53:A,54:R},t(ut,[2,13]),t(ut,[2,14]),t($,[2,19]),t($,[2,35]),t($,[2,36]),t($,[2,37]),t($,[2,38]),{16:[1,187]},t($,[2,39]),{16:[1,188]},t($,[2,40]),t($,[2,41]),{16:[1,189]},t($,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:vt},{58:196,104:vt},{58:197,104:vt},{5:[2,75]},{58:198,104:vt},{23:199,73:O},{5:[2,58]},{5:[2,59]},{23:200,73:O},t(ut,[2,12]),t(pt,i,{7:124,41:201}),t(ft,i,{7:126,43:202}),t(gt,i,{7:129,46:203}),t($,[2,49]),t($,[2,54]),t(mt,[2,77]),t($,[2,51]),t($,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:vt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,l.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,l.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,s="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,l.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[s,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:(0,l.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(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,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,r,n){switch(r){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,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],inclusive:!0}}}}();function Tt(){this.yy={}}return bt.lexer=xt,(0,l.K2)(Tt,"Parser"),Tt.prototype=bt,bt.Parser=Tt,new Tt}();u.parser=u;var d=u,p={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},f={FILLED:0,OPEN:1},g={LEFTOF:0,RIGHTOF:1,OVER:2},m="actor",y="control",v="database",b="entity",x=class{constructor(){this.state=new a.m(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=s.SV,this.setAccDescription=s.EI,this.setDiagramTitle=s.ke,this.getAccTitle=s.iN,this.getAccDescription=s.m7,this.getDiagramTitle=s.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,s.D7)().wrap),this.LINETYPE=p,this.ARROWTYPE=f,this.PLACEMENT=g}static{(0,l.K2)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,i,a){let o,s=this.state.records.currentBox;if(void 0!==a){let t;t=a.includes("\n")?a+"\n":"{\n"+a+"\n}",o=(0,n.H)(t,{schema:n.r})}i=o?.type??i,!o?.alias||r&&r.text!==e||(r={text:o.alias,wrap:r?.wrap,type:i});const l=this.state.records.actors.get(t);if(l){if(this.state.records.currentBox&&l.box&&this.state.records.currentBox!==l.box)throw new Error(`A same participant should only be defined in one Box: ${l.name} can't be in '${l.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=l.box?l.box:this.state.records.currentBox,l.box=s,l&&e===l.name&&null==r)return}if(null==r?.text&&(r={text:e,type:i}),null!=i&&null!=r.text||(r={text:e,type:i}),this.state.records.actors.set(t,{box:s,name:e,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,r=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&r++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&r--;return r}addMessage(t,e,r,n){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:r.text,wrap:r.wrap??this.autoWrap(),answer:n})}addSignal(t,e,r,n,i=!1,a){if(n===this.LINETYPE.ACTIVE_END){if(this.activationCount(t??"")<1){const e=new Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,s.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,s.IU)()}parseMessage(t){const e=t.trim(),{wrap:r,cleanedText:n}=this.extractWrap(e),i={text:n,wrap:r};return l.Rm.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{const e=(new Option).style;e.color=r,e.color!==r&&(r="transparent",n=t.trim())}const{wrap:i,cleanedText:a}=this.extractWrap(n);return{text:a?(0,s.jZ)(a,(0,s.D7)()):void 0,color:r,wrap:i}}addNote(t,e,r){const n={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const r=this.getActor(t);try{let t=(0,s.jZ)(e.text,(0,s.D7)());t=t.replace(/=/g,"="),t=t.replace(/&/g,"&");const n=JSON.parse(t);this.insertLinks(r,n)}catch(n){l.Rm.error("error while parsing actor link text",n)}}addALink(t,e){const r=this.getActor(t);try{const t={};let n=(0,s.jZ)(e.text,(0,s.D7)());const i=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");const a=n.slice(0,i-1).trim(),o=n.slice(i+1).trim();t[a]=o,this.insertLinks(r,t)}catch(n){l.Rm.error("error while parsing actor link text",n)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const r in e)t.links[r]=e[r]}addProperties(t,e){const r=this.getActor(t);try{const t=(0,s.jZ)(e.text,(0,s.D7)()),n=JSON.parse(t);this.insertProperties(r,n)}catch(n){l.Rm.error("error while parsing actor properties text",n)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const r=this.getActor(t),n=document.getElementById(e.text);try{const t=n.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(r,e.properties),e.links&&this.insertLinks(r,e.links)}catch(i){l.Rm.error("error while parsing actor details text",i)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,s.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,s.D7)().sequence}},T=(0,l.K2)(t=>{const e=t.dropShadow??"none",{look:r}=(0,s.D7)();return`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: ${t.strokeWidth??1};\n }\n\n rect.actor.outer-path[data-look="neo"] {\n filter: ${e};\n }\n\n rect.note[data-look="neo"] {\n stroke:${t.noteBorderColor};\n fill:${t.noteBkgColor};\n filter: ${e};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n [id$="-arrowhead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n [id$="-sequencenumber"] {\n fill: ${t.signalColor};\n }\n\n [id$="-crosshead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n filter: ${"neo"===r?e:"none"};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .sectionTitle, .sectionTitle > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n ${t.noteFontWeight?`font-weight: ${t.noteFontWeight};`:""}\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man circle, line {\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n\n g rect.rect {\n filter: ${e};\n stroke: ${t.nodeBorder};\n }\n`},"getStyles"),w="actor-top",k="actor-bottom",C="actor-box",E="actor-man",S=new Set(["redux-color","redux-dark-color"]),_=(0,l.K2)(function(t,e){const r=(0,i.tk)(t,e);return"neo"===(0,s.zj)().look&&r.attr("data-look","neo"),r},"drawRect"),A=(0,l.K2)(function(t,e,r,n,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const a=e.links,o=e.actorCnt,s=e.rectData;var l="none";i&&(l="block !important");const c=t.append("g");c.attr("id","actor"+o+"_popup"),c.attr("class","actorPopupMenu"),c.attr("display",l);var u="";void 0!==s.class&&(u=" "+s.class);let d=s.width>r?s.width:r;const p=c.append("rect");if(p.attr("class","actorPopupMenuPanel"+u),p.attr("x",s.x),p.attr("y",s.height),p.attr("fill",s.fill),p.attr("stroke",s.stroke),p.attr("width",d),p.attr("height",s.height),p.attr("rx",s.rx),p.attr("ry",s.ry),null!=a){var f=20;for(let t in a){var g=c.append("a"),m=(0,h.J)(a[t]);g.attr("xlink:href",m),g.attr("target","_blank"),ot(n)(t,g,s.x+10,s.height+f,d,20,{class:"actor"},n),f+=30}}return p.attr("height",f),{height:s.height+f,width:d}},"drawPopup"),R=(0,l.K2)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),L=(0,l.K2)(async function(t,e,r=null){let n=t.append("foreignObject");const i=await(0,s.dj)(e.text,(0,s.zj)()),a=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(a.height)).attr("width",Math.round(a.width)),"noteText"===e.class){const r=t.node().firstChild;r.setAttribute("height",a.height+2*e.textMargin);const i=r.getBBox();n.attr("x",Math.round(i.x+i.width/2-a.width/2)).attr("y",Math.round(i.y+i.height/2-a.height/2))}else if(r){let{startx:t,stopx:i,starty:o}=r;if(t>i){const e=t;t=i,i=e}n.attr("x",Math.round(t+Math.abs(t-i)/2-a.width/2)),"loopText"===e.class?n.attr("y",Math.round(o)):n.attr("y",Math.round(o-a.height))}return[n]},"drawKatex"),I=(0,l.K2)(function(t,e){let r=0,n=0;const i=e.text.split(s.Y2.lineBreakRegex),[a,c]=(0,o.I5)(e.fontSize);let h=[],u=0,d=(0,l.K2)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":d=(0,l.K2)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":d=(0,l.K2)(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":d=(0,l.K2)(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)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"}for(let[s,l]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(u=s*a);const i=t.append("text");i.attr("x",e.x),i.attr("y",d()),void 0!==e.anchor&&i.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&i.style("font-family",e.fontFamily),void 0!==c&&i.style("font-size",c),void 0!==e.fontWeight&&i.style("font-weight",e.fontWeight),void 0!==e.fill&&i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class),void 0!==e.dy?i.attr("dy",e.dy):0!==u&&i.attr("dy",u);const p=l||o.pe;if(e.tspan){const t=i.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(p)}else i.text(p);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(n+=(i._groups||i)[0][0].getBBox().height,r=n),h.push(i)}return h},"drawText"),D=(0,l.K2)(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}(0,l.K2)(r,"genPoints");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,I(t,e),n},"drawLabel"),N=-1,M=(0,l.K2)((t,e,r,n)=>{t.select&&r.forEach(r=>{const i=e.get(r),a=t.select("#actor"+i.actorCnt);!n.mirrorActors&&i.stopy?a.attr("y2",i.stopy+i.height/2):n.mirrorActors&&a.attr("y2",i.stopy)})},"fixLifeLineHeights"),O=(0,l.K2)(function(t,e,r,n,a){const o=n?e.stopy:e.starty,l=e.x+e.width/2,c=o+e.height,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=t.append("g").lower();var m=g;n||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&m.attr("onclick",R(`actor${N}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+N).attr("x1",l).attr("y1",c).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),m=g.append("g"),e.actorCnt=N,null!=e.links&&m.attr("id","root-"+N),"neo"===h&&m.attr("data-look","neo"));const y=(0,i.PB)();var v="actor";e.properties?.class?v=e.properties.class:y.fill="#eaeaea",v+=n?` ${k}`:` ${w}`,y.x=e.x,y.y=o,y.width=e.width,y.height=e.height,y.class=v,y.rx=3,y.ry=3,y.name=e.name,"neo"===h&&(y.rx=6,y.ry=6);const b=_(m,y),x=a.get(e.name)??0;if(S.has(u)&&(b.style("stroke",f[x%f.length]),b.style("fill",p[x%f.length])),"neo"===h&&b.attr("filter","url(#drop-shadow)"),e.rectData=y,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(m,y.x+y.width-20,y.y+10,t.substr(1)):(0,i.aC)(m,y.x+y.width-20,y.y+10,t)}n||(m.attr("data-et","participant"),m.attr("data-type","participant"),m.attr("data-id",e.name)),at(r,(0,s.Wi)(e.description))(e.description,m,y.x,y.y,y.width,y.height,{class:`actor ${C}`},r);let T=e.height;if(b.node){const t=b.node().getBBox();e.height=t.height,T=t.height}return T},"drawActorTypeParticipant"),$=(0,l.K2)(function(t,e,r,n,a){const o=n?e.stopy:e.starty,l=e.x+e.width/2,c=o+e.height,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=t.append("g").lower();var m=g;n||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&m.attr("onclick",R(`actor${N}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+N).attr("x1",l).attr("y1",c).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),m=g.append("g"),e.actorCnt=N,null!=e.links&&m.attr("id","root-"+N),"neo"===h&&m.attr("data-look","neo"));const y=(0,i.PB)();var v="actor";e.properties?.class?v=e.properties.class:y.fill="#eaeaea",v+=n?` ${k}`:` ${w}`,y.x=e.x,y.y=o,y.width=e.width,y.height=e.height,y.class=v,y.name=e.name;const b={...y,x:y.x+-6,y:y.y+6,class:"actor"},x=_(m,y),T=_(m,b);e.rectData=y,"neo"===h&&m.attr("filter","url(#drop-shadow)");const E=a.get(e.name)??0;if(S.has(u)&&(x.style("stroke",f[E%f.length]),x.style("fill",p[E%f.length]),T.style("stroke",f[E%f.length]),T.style("fill",p[E%f.length])),e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,i.CP)(m,y.x+y.width-20,y.y+10,t.substr(1)):(0,i.aC)(m,y.x+y.width-20,y.y+10,t)}at(r,(0,s.Wi)(e.description))(e.description,m,y.x-6,y.y+6,y.width,y.height,{class:`actor ${C}`},r);let A=e.height;if(x.node){const t=x.node().getBBox();e.height=t.height,A=t.height}return n||(m.attr("data-et","participant"),m.attr("data-type","collections"),m.attr("data-id",e.name)),A},"drawActorTypeCollections"),P=(0,l.K2)(function(t,e,r,n,a){const o=n?e.stopy:e.starty,l=e.x+e.width/2,c=o+e.height,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=t.append("g").lower();let m=g;n||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&m.attr("onclick",R(`actor${N}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+N).attr("x1",l).attr("y1",c).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),m=g.append("g"),e.actorCnt=N,null!=e.links&&m.attr("id","root-"+N),"neo"===h&&m.attr("data-look","neo"));const y=(0,i.PB)();let v="actor";e.properties?.class?v=e.properties.class:y.fill="#eaeaea",v+=n?` ${k}`:` ${w}`,m.attr("class",v),y.x=e.x,y.y=o,y.width=e.width,y.height=e.height,y.name=e.name;const b=y.height/2,x=b/(2.5+y.height/50),T=m.append("g"),E=m.append("g"),_=`M ${y.x},${y.y+b}\n a ${x},${b} 0 0 0 0,${y.height}\n h ${y.width-2*x}\n a ${x},${b} 0 0 0 0,-${y.height}\n Z\n `;T.append("path").attr("d",_),E.append("path").attr("d",`M ${y.x},${y.y+b}\n a ${x},${b} 0 0 0 0,${y.height}`),T.attr("transform",`translate(${x}, ${-y.height/2})`),E.attr("transform",`translate(${y.width-x}, ${-y.height/2})`),e.rectData=y,"neo"===h&&T.attr("filter","url(#drop-shadow)");const A=a.get(e.name)??0;if(S.has(u)&&(T.style("stroke",f[A%f.length]),T.style("fill",p[A%f.length]),E.style("stroke",f[A%f.length]),E.style("fill",p[A%f.length])),e.properties?.icon){const t=e.properties.icon.trim(),r=y.x+y.width-20,n=y.y+10;"@"===t.charAt(0)?(0,i.CP)(m,r,n,t.substr(1)):(0,i.aC)(m,r,n,t)}at(r,(0,s.Wi)(e.description))(e.description,m,y.x,y.y,y.width,y.height,{class:`actor ${C}`},r);let L=e.height;const I=T.select("path:last-child");if(I.node()){const t=I.node().getBBox();e.height=t.height,L=t.height}return n||(m.attr("data-et","participant"),m.attr("data-type","queue"),m.attr("data-id",e.name)),L},"drawActorTypeQueue"),B=(0,l.K2)(function(t,e,r,n,a,o){const l=n?e.stopy:e.starty,c=e.x+e.width/2,h=l+75,{look:u,theme:d,themeVariables:p}=r,{bkgColorArray:f,borderColorArray:g,actorBorder:m,actorBkg:y}=p,v=t.append("g").lower();n||(N++,v.append("line").attr("id","actor"+N).attr("x1",c).attr("y1",h).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=N);const b=t.append("g");let x=E;x+=n?` ${k}`:` ${w}`,b.attr("class",x),b.attr("name",e.name);const T=(0,i.PB)();T.x=e.x,T.y=l,T.fill="#eaeaea",T.width=e.width,T.height=e.height,T.class="actor";const C=e.x+e.width/2,_=l+32;b.append("defs").append("marker").attr("id",a+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),b.append("circle").attr("cx",C).attr("cy",_).attr("r",22).attr("filter",""+("neo"===u?"url(#drop-shadow)":"")),b.append("line").attr("marker-end","url(#"+a+"-filled-head-control)").attr("transform",`translate(${C}, ${_-22})`);const A=o.get(e.name)??0;S.has(d)?(b.style("stroke",g[A%g.length]),b.style("fill",f[A%g.length])):(b.style("stroke",m),b.style("fill",y));const R=b.node().getBBox();return e.height=R.height+2*(r?.sequence?.labelBoxHeight??0),at(r,(0,s.Wi)(e.description))(e.description,b,T.x,T.y+22+(n?5:12),T.width,T.height,{class:`actor ${E}`},r),n||(b.attr("data-et","participant"),b.attr("data-type","control"),b.attr("data-id",e.name)),e.height},"drawActorTypeControl"),F=(0,l.K2)(function(t,e,r,n,a){const o=n?e.stopy:e.starty,l=e.x+e.width/2,c=o+75,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=t.append("g").lower(),m=t.append("g");let y="actor";y+=n?` ${k}`:` ${w}`,m.attr("class",y),m.attr("name",e.name);const v=(0,i.PB)();v.x=e.x,v.y=o,v.fill="#eaeaea",v.width=e.width,v.height=e.height,v.class="actor";const b=e.x+e.width/2,x=o+(n?10:25),T=22;m.append("circle").attr("cx",b).attr("cy",x).attr("r",T).attr("width",e.width).attr("height",e.height),m.append("line").attr("x1",b-T).attr("x2",b+T).attr("y1",x+T).attr("y2",x+T).attr("stroke-width",2),"neo"===h&&m.attr("filter","url(#drop-shadow)");const C=a.get(e.name)??0;S.has(u)&&(m.style("stroke",f[C%f.length]),m.style("fill",p[C%f.length]));const _=m.node().getBBox();return e.height=_.height+(r?.sequence?.labelBoxHeight??0),n||(N++,g.append("line").attr("id","actor"+N).attr("x1",l).attr("y1",c).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=N),at(r,(0,s.Wi)(e.description))(e.description,m,v.x,v.y+(n?15:30),v.width,v.height,{class:`actor ${E}`},r),n?m.attr("transform","translate(0, 22)"):(m.attr("transform","translate(0, 6)"),m.attr("data-et","participant"),m.attr("data-type","entity"),m.attr("data-id",e.name)),e.height},"drawActorTypeEntity"),z=(0,l.K2)(function(t,e,r,n,a){const o=n?e.stopy:e.starty,l=e.x+e.width/2,c=o+e.height+2*r.boxTextMargin,{theme:h,themeVariables:u,look:d}=r,{bkgColorArray:p,borderColorArray:f,actorBorder:g}=u,m=t.append("g").lower();let y=m;n||(N++,Object.keys(e.links||{}).length&&!r.forceMenus&&y.attr("onclick",R(`actor${N}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+N).attr("x1",l).attr("y1",c).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),y=m.append("g"),e.actorCnt=N,null!=e.links&&y.attr("id","root-"+N),"neo"===d&&y.attr("data-look","neo"));const v=(0,i.PB)();let b="actor";e.properties?.class?b=e.properties.class:v.fill="#eaeaea",b+=n?` ${k}`:` ${w}`,v.x=e.x,v.y=o,v.width=e.width,v.height=e.height,v.class=b,v.name=e.name,v.x=e.x,v.y=o;const x=v.width/3,T=v.width/3,E=x/2,_=E/(2.5+x/50),A=y.append("g");A.attr("class",b);const L=`\n M ${v.x},${v.y+_}\n a ${E},${_} 0 0 0 ${x},0\n a ${E},${_} 0 0 0 -${x},0\n l 0,${T-2*_}\n a ${E},${_} 0 0 0 ${x},0\n l 0,-${T-2*_}\n`;A.append("path").attr("d",L),"neo"===d&&A.attr("filter","url(#drop-shadow)");const I=a.get(e.name)??0;S.has(h)?(A.style("stroke",f[I%f.length]),A.style("fill",p[I%f.length])):A.style("stroke",g),A.attr("transform",`translate(${x}, ${_})`),e.rectData=v,at(r,(0,s.Wi)(e.description))(e.description,y,v.x,v.y+35,v.width,v.height,{class:`actor ${C}`},r);const D=A.select("path:last-child");if(D.node()){const t=D.node().getBBox();e.height=t.height+(r.sequence.labelBoxHeight??0)}return n||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",e.name)),e.height},"drawActorTypeDatabase"),K=(0,l.K2)(function(t,e,r,n,a){const o=n?e.stopy:e.starty,l=e.x+e.width/2,c=o+80,h=t.append("g").lower(),{look:u,theme:d,themeVariables:p}=r,{bkgColorArray:f,borderColorArray:g,actorBorder:m}=p;n||(N++,h.append("line").attr("id","actor"+N).attr("x1",l).attr("y1",c).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=N);const y=t.append("g");let v=E;v+=n?` ${k}`:` ${w}`,y.attr("class",v),y.attr("name",e.name);const b=(0,i.PB)();b.x=e.x,b.y=o,b.fill="#eaeaea",b.width=e.width,b.height=e.height,b.class="actor",y.append("line").attr("id","actor-man-torso"+N).attr("x1",e.x+e.width/2-55).attr("y1",o+12).attr("x2",e.x+e.width/2-15).attr("y2",o+12),y.append("line").attr("id","actor-man-arms"+N).attr("x1",e.x+e.width/2-55).attr("y1",o+2).attr("x2",e.x+e.width/2-55).attr("y2",o+22),y.append("circle").attr("cx",e.x+e.width/2).attr("cy",o+12).attr("r",22),"neo"===u&&y.attr("filter","url(#drop-shadow)");const x=a.get(e.name)??0;S.has(d)?(y.style("stroke",g[x%g.length]),y.style("fill",f[x%g.length])):y.style("stroke",m);const T=y.node().getBBox();return e.height=T.height+(r.sequence.labelBoxHeight??0),at(r,(0,s.Wi)(e.description))(e.description,y,b.x,b.y+15,b.width,b.height,{class:`actor ${E}`},r),y.attr("transform","translate(0,21)"),n||(y.attr("data-et","participant"),y.attr("data-type","boundary"),y.attr("data-id",e.name)),e.height},"drawActorTypeBoundary"),j=(0,l.K2)(function(t,e,r,n,a){const o=n?e.stopy:e.starty,l=e.x+e.width/2,c=o+80,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f,actorBorder:g}=d,m=t.append("g").lower();n||(N++,m.append("line").attr("id","actor"+N).attr("x1",l).attr("y1",c).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=N);const y=t.append("g");let v=E;v+=n?` ${k}`:` ${w}`,y.attr("class",v),y.attr("name",e.name),n||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);const b="neo"===h?.5:1,x="neo"===h?o+30*(1-b):o;y.append("line").attr("id","actor-man-torso"+N).attr("x1",l).attr("y1",x+25*b).attr("x2",l).attr("y2",x+45*b),y.append("line").attr("id","actor-man-arms"+N).attr("x1",l-18*b).attr("y1",x+33*b).attr("x2",l+18*b).attr("y2",x+33*b),y.append("line").attr("x1",l-18*b).attr("y1",x+60*b).attr("x2",l).attr("y2",x+45*b),y.append("line").attr("x1",l).attr("y1",x+45*b).attr("x2",l+16*b).attr("y2",x+60*b);const T=y.append("circle");T.attr("cx",e.x+e.width/2),T.attr("cy",x+10*b),T.attr("r",15*b),T.attr("width",e.width*b),T.attr("height",e.height*b);const C=y.node().getBBox();e.height=C.height;const _=(0,i.PB)();_.x=e.x,_.y=x,_.fill="#eaeaea",_.width=e.width,_.height=e.height/b,_.class="actor",_.rx=3,_.ry=3;const A=a.get(e.name)??0;return S.has(u)?(y.style("stroke",f[A%f.length]),y.style("fill",p[A%f.length])):y.style("stroke",g),at(r,(0,s.Wi)(e.description))(e.description,y,_.x,x+35*b-("neo"===h?10:0),_.width,_.height,{class:`actor ${E}`},r),e.height},"drawActorTypeActor"),q=(0,l.K2)(async function(t,e,r,n,i,a,o){const s=o??new Map([...a.db.getActors().values()].map((t,e)=>[t.name,e]));switch(e.type){case"actor":return await j(t,e,r,n,s);case"participant":return await O(t,e,r,n,s);case"boundary":return await K(t,e,r,n,s);case"control":return await B(t,e,r,n,i,s);case"entity":return await F(t,e,r,n,s);case"database":return await z(t,e,r,n,s);case"collections":return await $(t,e,r,n,s);case"queue":return await P(t,e,r,n,s)}},"drawActor"),W=(0,l.K2)(function(t,e,r){const n=t.append("g");V(n,e),e.name&&at(r)(e.name,n,e.x,e.y+r.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),n.lower()},"drawBox"),U=(0,l.K2)(function(t){return t.append("g")},"anchorElement"),G=(0,l.K2)(function(t,e,r,n,a,o,s){const{theme:l,themeVariables:c}=n,{bkgColorArray:h,borderColorArray:u,mainBkg:d}=c,p=(0,i.PB)(),f=e.anchored,g=e.actor;p.x=e.startx,p.y=e.starty,p.class="activation"+a%3,p.width=e.stopx-e.startx,p.height=r-e.starty;const m=_(f,p),y=(s??new Map([...o.db.getActors().values()].map((t,e)=>[t.name,e]))).get(g)??0;S.has(l)&&(m.style("stroke",u[y%u.length]),m.style("fill",h[y%u.length]??d))},"drawActivation"),Y=(0,l.K2)(async function(t,e,r,n,a){const{boxMargin:o,boxTextMargin:c,labelBoxHeight:h,labelBoxWidth:u,messageFontFamily:d,messageFontSize:p,messageFontWeight:f}=n,g=t.append("g").attr("data-et","control-structure").attr("data-id","i"+a.id),m=(0,l.K2)(function(t,e,r,n){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine");m(e.startx,e.starty,e.stopx,e.starty),m(e.stopx,e.starty,e.stopx,e.stopy),m(e.startx,e.stopy,e.stopx,e.stopy),m(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){m(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let y=(0,i.HT)();y.text=r,y.x=e.startx,y.y=e.starty,y.fontFamily=d,y.fontSize=p,y.fontWeight=f,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=Math.max(u??0,50),y.height=h+("neo"===n.look?15:0)||20,y.textMargin=c,y.class="labelText",D(g,y),y=nt(),y.text=e.title,y.x=e.startx+u/2+(e.stopx-e.startx)/2,y.y=e.starty+o+c,y.anchor="middle",y.valign="middle",y.textMargin=c,y.class="loopText",y.fontFamily=d,y.fontSize=p,y.fontWeight=f,y.wrap=!0;let v=(0,s.Wi)(y.text)?await L(g,y,e):I(g,y);if(void 0!==e.sectionTitles)for(const[i,l]of Object.entries(e.sectionTitles))if(l.message){y.text=l.message,y.x=e.startx+(e.stopx-e.startx)/2,y.y=e.sections[i].y+o+c,y.class="sectionTitle",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=d,y.fontSize=p,y.fontWeight=f,y.wrap=e.wrap,(0,s.Wi)(y.text)?(e.starty=e.sections[i].y,await L(g,y,e)):I(g,y);let t=Math.round(v.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[i].height+=t-(o+c)}return e.height=Math.round(e.stopy-e.starty),g},"drawLoop"),V=(0,l.K2)(function(t,e){(0,i.lC)(t,e)},"drawBackgroundRect"),H=(0,l.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),X=(0,l.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Z=(0,l.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Q=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),J=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),tt=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),et=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),rt=(0,l.K2)(function(t,e){const{theme:r}=e;t.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+("redux"===r||"redux-color"===r?"#000000":"#FFFFFF"))},"insertDropShadow"),nt=(0,l.K2)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),it=(0,l.K2)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),at=function(){function t(t,e,r,n,a,o,s){i(e.append("text").attr("x",r+a/2).attr("y",n+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,r,n,a,l,c,h){const{actorFontSize:u,actorFontFamily:d,actorFontWeight:p}=h,[f,g]=(0,o.I5)(u),m=t.split(s.Y2.lineBreakRegex);for(let o=0;o<m.length;o++){const t=o*f-f*(m.length-1)/2,s=e.append("text").attr("x",r+a/2).attr("y",n).style("text-anchor","middle").style("font-size",g).style("font-weight",p).style("font-family",d);s.append("tspan").attr("x",r+a/2).attr("dy",t).text(m[o]),s.attr("y",n+l/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(s,c)}}function r(t,r,n,a,o,s,l,c){const h=r.append("switch"),u=h.append("foreignObject").attr("x",n).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,n,a,o,s,l,c),i(u,l)}async function n(t,r,n,a,o,l,c,h){const u=await(0,s.Dl)(t,(0,s.zj)()),d=r.append("switch"),p=d.append("foreignObject").attr("x",n+o/2-u.width/2).attr("y",a+l/2-u.height/2).attr("width",u.width).attr("height",u.height).append("xhtml:div").style("height","100%").style("width","100%");p.append("div").style("text-align","center").style("vertical-align","middle").html(await(0,s.dj)(t,(0,s.zj)())),e(t,d,n,a,o,l,c,h),i(p,c)}function i(t,e){for(const r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}return(0,l.K2)(t,"byText"),(0,l.K2)(e,"byTspan"),(0,l.K2)(r,"byFo"),(0,l.K2)(n,"byKatex"),(0,l.K2)(i,"_setTextAttrs"),function(i,a=!1){return a?n:"fo"===i.textPlacement?r:"old"===i.textPlacement?t:e}}(),ot=function(){function t(t,e,r,i,a,o,s){n(e.append("text").attr("x",r).attr("y",i).style("text-anchor","start").text(t),s)}function e(t,e,r,i,a,o,l,c){const{actorFontSize:h,actorFontFamily:u,actorFontWeight:d}=c,p=t.split(s.Y2.lineBreakRegex);for(let s=0;s<p.length;s++){const t=s*h-h*(p.length-1)/2,a=e.append("text").attr("x",r).attr("y",i).style("text-anchor","start").style("font-size",h).style("font-weight",d).style("font-family",u);a.append("tspan").attr("x",r).attr("dy",t).text(p[s]),a.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(a,l)}}function r(t,r,i,a,o,s,l,c){const h=r.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,0,s,l,c),n(u,l)}function n(t,e){for(const r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}return(0,l.K2)(t,"byText"),(0,l.K2)(e,"byTspan"),(0,l.K2)(r,"byFo"),(0,l.K2)(n,"_setTextAttrs"),function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}(),st=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),lt=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),ct=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),ht=(0,l.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),ut={drawRect:_,drawText:I,drawLabel:D,drawActor:q,drawBox:W,drawPopup:A,anchorElement:U,drawActivation:G,drawLoop:Y,drawBackgroundRect:V,insertArrowHead:Q,insertArrowFilledHead:J,insertSequenceNumber:tt,insertArrowCrossHead:et,insertDatabaseIcon:H,insertComputerIcon:X,insertClockIcon:Z,getTextObj:nt,getNoteRect:it,fixLifeLineHeights:M,sanitizeUrl:h.J,insertDropShadow:rt,insertSolidTopArrowHead:st,insertSolidBottomArrowHead:lt,insertStickTopArrowHead:ct,insertStickBottomArrowHead:ht},dt={},pt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:(0,l.K2)(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,l.K2)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,l.K2)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,l.K2)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,l.K2)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,l.K2)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,l.K2)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,l.K2)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,l.K2)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,l.K2)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,l.K2)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,l.K2)(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,Ct((0,s.D7)())},"init"),updateVal:(0,l.K2)(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:(0,l.K2)(function(t,e,r,n){const i=this;let a=0;function o(o){return(0,l.K2)(function(s){a++;const l=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-l*dt.boxMargin,Math.min),i.updateVal(s,"stopy",n+l*dt.boxMargin,Math.max),i.updateVal(pt.data,"startx",t-l*dt.boxMargin,Math.min),i.updateVal(pt.data,"stopx",r+l*dt.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-l*dt.boxMargin,Math.min),i.updateVal(s,"stopx",r+l*dt.boxMargin,Math.max),i.updateVal(pt.data,"starty",e-l*dt.boxMargin,Math.min),i.updateVal(pt.data,"stopy",n+l*dt.boxMargin,Math.max))},"updateItemBounds")}(0,l.K2)(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:(0,l.K2)(function(t,e,r,n){const i=s.Y2.getMin(t,r),a=s.Y2.getMax(t,r),o=s.Y2.getMin(e,n),l=s.Y2.getMax(e,n);this.updateVal(pt.data,"startx",i,Math.min),this.updateVal(pt.data,"starty",o,Math.min),this.updateVal(pt.data,"stopx",a,Math.max),this.updateVal(pt.data,"stopy",l,Math.max),this.updateBounds(i,o,a,l)},"insert"),newActivation:(0,l.K2)(function(t,e,r){const n=r.get(t.from),i=Et(t.from).length||0,a=n.x+n.width/2+(i-1)*dt.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+dt.activationWidth,stopy:void 0,actor:t.from,anchored:ut.anchorElement(e)})},"newActivation"),endActivation:(0,l.K2)(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,l.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,l.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,l.K2)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,l.K2)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,l.K2)(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:pt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,l.K2)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,l.K2)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,l.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=s.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,l.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,l.K2)(function(){return{bounds:this.data,models:this.models}},"getBounds")},ft=(0,l.K2)(async function(t,e,r){pt.bumpVerticalPos(dt.boxMargin),e.height=dt.boxMargin,e.starty=pt.getVerticalPos();const n=(0,i.PB)();n.x=e.startx,n.y=e.starty,n.width=e.width||dt.width,n.class="note";const a=t.append("g");a.attr("data-et","note"),a.attr("data-id","i"+r);const o=ut.drawRect(a,n),l=(0,i.HT)();l.x=e.startx,l.y=e.starty,l.width=n.width,l.dy="1em",l.text=e.message,l.class="noteText",l.fontFamily=dt.noteFontFamily,l.fontSize=dt.noteFontSize,l.fontWeight=dt.noteFontWeight,l.anchor=dt.noteAlign,l.textMargin=dt.noteMargin,l.valign="center";const c=(0,s.Wi)(l.text)?await L(a,l):I(a,l),h=Math.round(c.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));o.attr("height",h+2*dt.noteMargin),e.height+=h+2*dt.noteMargin,pt.bumpVerticalPos(h+2*dt.noteMargin),e.stopy=e.starty+h+2*dt.noteMargin,e.stopx=e.startx+n.width,pt.insert(e.startx,e.starty,e.stopx,e.stopy),pt.models.addNote(e)},"drawNote"),gt=(0,l.K2)(function(t,e,r,n,i,a,o){const s=n.db.getActors(),c=s.get(e.from),h=s.get(e.to),u=r.sequenceVisible;let d=c.x+c.width/2,p=h.x+h.width/2;const f=d<=p,g=$t(e,n),m=t.append("g"),y=(0,l.K2)((t,e)=>{const r=t?16.5:-16.5;return e?-r:r},"getCircleOffset"),v=(0,l.K2)(t=>{m.append("circle").attr("cx",t).attr("cy",o).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:b,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:T}=n.db.LINETYPE;if(u)switch(e.centralConnection){case b:g&&(p+=y(f,!0));break;case x:g||(d+=y(f,!1));break;case T:g?p+=y(f,!0):d+=y(f,!1)}switch(e.centralConnection){case b:v(p);break;case x:v(d);break;case T:v(d),v(p)}},"drawCentralConnection"),mt=(0,l.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),yt=(0,l.K2)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),vt=(0,l.K2)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function bt(t,e){pt.bumpVerticalPos(10);const{startx:r,stopx:n,message:i}=e,a=s.Y2.splitBreaks(i).length,l=(0,s.Wi)(i),c=l?await(0,s.Dl)(i,(0,s.D7)()):o._K.calculateTextDimensions(i,mt(dt));if(!l){const t=c.height/a;e.height+=t,pt.bumpVerticalPos(t)}let h,u=c.height-10;const d=c.width;if(r===n){h=pt.getVerticalPos()+u,dt.rightAngles||(u+=dt.boxMargin,h=pt.getVerticalPos()+u),u+=30;const t=s.Y2.getMax(d/2,dt.width/2);pt.insert(r-t,pt.getVerticalPos()-10+u,n+t,pt.getVerticalPos()+30+u)}else u+=dt.boxMargin,h=pt.getVerticalPos()+u,pt.insert(r,h-10,n,h);return pt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,pt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),h}(0,l.K2)(bt,"boundMessage");var xt=(0,l.K2)(async function(t,e,r,n,a,l){const{startx:c,stopx:h,starty:u,message:d,type:p,sequenceIndex:f,sequenceVisible:g}=e,m=o._K.calculateTextDimensions(d,mt(dt)),y=(0,i.HT)();y.x=Math.min(c,h),y.y=u+10,y.width=Math.abs(h-c),y.class="messageText",y.dy="1em",y.text=d,y.fontFamily=dt.messageFontFamily,y.fontSize=dt.messageFontSize,y.fontWeight=dt.messageFontWeight,y.anchor=dt.messageAlign,y.valign="center",y.textMargin=dt.wrapPadding,y.tspan=!1,(0,s.Wi)(y.text)?await L(t,y,{startx:c,stopx:h,starty:r}):I(t,y);const v=m.width;let b;if(c===h){const i=g||dt.showSequenceNumbers,o=$t(a,n),l=Pt(a,n),u=c+(i&&(o||l)?10:0);b=dt.rightAngles?t.append("path").attr("d",`M ${u},${r} H ${c+s.Y2.getMax(dt.width/2,v/2)} V ${r+25} H ${c}`):t.append("path").attr("d","M "+u+","+r+" C "+(u+60)+","+(r-10)+" "+(c+60)+","+(r+30)+" "+c+","+(r+20)),Mt(a,n)&>(t,a,e,n,c,h,r)}else b=t.append("line"),b.attr("x1",c),b.attr("y1",r),b.attr("x2",h),b.attr("y2",r),Mt(a,n)&>(t,a,e,n,c,h,r);p===n.db.LINETYPE.DOTTED||p===n.db.LINETYPE.DOTTED_CROSS||p===n.db.LINETYPE.DOTTED_POINT||p===n.db.LINETYPE.DOTTED_OPEN||p===n.db.LINETYPE.BIDIRECTIONAL_DOTTED||p===n.db.LINETYPE.SOLID_TOP_DOTTED||p===n.db.LINETYPE.SOLID_BOTTOM_DOTTED||p===n.db.LINETYPE.STICK_TOP_DOTTED||p===n.db.LINETYPE.STICK_BOTTOM_DOTTED||p===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||p===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||p===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||p===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(b.style("stroke-dasharray","3, 3"),b.attr("class","messageLine1")):b.attr("class","messageLine0"),b.attr("data-et","message"),b.attr("data-id","i"+e.id),b.attr("data-from",e.from),b.attr("data-to",e.to);let x="";if(dt.arrowMarkerAbsolute&&(x=(0,s.ID)(!0)),b.attr("stroke-width",2),b.attr("stroke","none"),b.style("fill","none"),p!==n.db.LINETYPE.SOLID_TOP&&p!==n.db.LINETYPE.SOLID_TOP_DOTTED||b.attr("marker-end","url("+x+"#"+l+"-solidTopArrowHead)"),p!==n.db.LINETYPE.SOLID_BOTTOM&&p!==n.db.LINETYPE.SOLID_BOTTOM_DOTTED||b.attr("marker-end","url("+x+"#"+l+"-solidBottomArrowHead)"),p!==n.db.LINETYPE.STICK_TOP&&p!==n.db.LINETYPE.STICK_TOP_DOTTED||b.attr("marker-end","url("+x+"#"+l+"-stickTopArrowHead)"),p!==n.db.LINETYPE.STICK_BOTTOM&&p!==n.db.LINETYPE.STICK_BOTTOM_DOTTED||b.attr("marker-end","url("+x+"#"+l+"-stickBottomArrowHead)"),p!==n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&p!==n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||b.attr("marker-start","url("+x+"#"+l+"-solidBottomArrowHead)"),p!==n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&p!==n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||b.attr("marker-start","url("+x+"#"+l+"-solidTopArrowHead)"),p!==n.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&p!==n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||b.attr("marker-start","url("+x+"#"+l+"-stickBottomArrowHead)"),p!==n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&p!==n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||b.attr("marker-start","url("+x+"#"+l+"-stickTopArrowHead)"),p!==n.db.LINETYPE.SOLID&&p!==n.db.LINETYPE.DOTTED||b.attr("marker-end","url("+x+"#"+l+"-arrowhead)"),p!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&p!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(b.attr("marker-start","url("+x+"#"+l+"-arrowhead)"),b.attr("marker-end","url("+x+"#"+l+"-arrowhead)")),p!==n.db.LINETYPE.SOLID_POINT&&p!==n.db.LINETYPE.DOTTED_POINT||b.attr("marker-end","url("+x+"#"+l+"-filled-head)"),p!==n.db.LINETYPE.SOLID_CROSS&&p!==n.db.LINETYPE.DOTTED_CROSS||b.attr("marker-end","url("+x+"#"+l+"-crosshead)"),g||dt.showSequenceNumbers){const i=p===n.db.LINETYPE.BIDIRECTIONAL_SOLID||p===n.db.LINETYPE.BIDIRECTIONAL_DOTTED,o=p===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||p===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||p===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||p===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||p===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||p===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||p===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||p===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s=6,u=Mt(a,n);let d=c,g=h;i?(c<h?d=c+2*s:(d=c-s+(u?-5:0),d+=a?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),b.attr("x1",d)):o?(h>c?g=h-2*s:(g=h-s,d+=a?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),g+=u?15:0,b.attr("x2",g),b.attr("x1",d)):b.attr("x1",c+s);let m=0;const y=c<=h;m=c===h?e.fromBounds+1:o?y?e.toBounds-1:e.fromBounds+1:y?e.fromBounds+1:e.toBounds-1;let v="12px";const T=f.toString().length;T>5?v="7px":T>3&&(v="9px"),t.append("line").attr("x1",m).attr("y1",r).attr("x2",m).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+x+"#"+l+"-sequencenumber)"),t.append("text").attr("x",m).attr("y",r+4).attr("font-family","sans-serif").attr("font-size",v).attr("text-anchor","middle").attr("class","sequenceNumber").text(f)}},"drawMessage"),Tt=(0,l.K2)(function(t,e,r,n,i,a,o){let l,c=0,h=0,u=0;for(const d of n){const t=e.get(d),n=t.box;l&&l!=n&&(o||pt.models.addBox(l),h+=dt.boxMargin+l.margin),n&&n!=l&&(o||(n.x=c+h,n.y=i),h+=n.margin),t.width=s.Y2.getMax(t.width||dt.width,dt.width),t.height=s.Y2.getMax(t.height||dt.height,dt.height),t.margin=t.margin||dt.actorMargin,u=s.Y2.getMax(u,t.height),r.get(t.name)&&(h+=t.width/2),t.x=c+h,t.starty=pt.getVerticalPos(),pt.insert(t.x,i,t.x+t.width,t.height),c+=t.width+h,t.box&&(t.box.width=c+n.margin-t.box.x),h=t.margin,l=t.box,pt.models.addActor(t)}l&&!o&&pt.models.addBox(l),pt.bumpVerticalPos(u)},"addActorRenderingData"),wt=(0,l.K2)(async function(t,e,r,n,i,a,o){if(n){let n=0;pt.bumpVerticalPos(2*dt.boxMargin);for(const l of r){const r=e.get(l);r.stopy||(r.stopy=pt.getVerticalPos());const c=await ut.drawActor(t,r,dt,!0,i,a,o);n=s.Y2.getMax(n,c)}pt.bumpVerticalPos(n+dt.boxMargin)}else for(const s of r){const r=e.get(s);await ut.drawActor(t,r,dt,!1,i,a,o)}},"drawActors"),kt=(0,l.K2)(function(t,e,r,n){let i=0,a=0;for(const o of r){const r=e.get(o),s=It(r),l=ut.drawPopup(t,r,s,dt,dt.forceMenus,n);l.height>i&&(i=l.height),l.width+r.x>a&&(a=l.width+r.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Ct=(0,l.K2)(function(t){(0,s.hH)(dt,t),t.fontFamily&&(dt.actorFontFamily=dt.noteFontFamily=dt.messageFontFamily=t.fontFamily),t.fontSize&&(dt.actorFontSize=dt.noteFontSize=dt.messageFontSize=t.fontSize),t.fontWeight&&(dt.actorFontWeight=dt.noteFontWeight=dt.messageFontWeight=t.fontWeight)},"setConf"),Et=(0,l.K2)(function(t){return pt.activations.filter(function(e){return e.actor===t})},"actorActivations"),St=(0,l.K2)(function(t,e){const r=e.get(t),n=Et(t);return[n.reduce(function(t,e){return s.Y2.getMin(t,e.startx)},r.x+r.width/2-1),n.reduce(function(t,e){return s.Y2.getMax(t,e.stopx)},r.x+r.width/2+1)]},"activationBounds");function _t(t,e,r,n,i){pt.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){const r=t[e.id].width,i=mt(dt);e.message=o._K.wrapLabel(`[${e.message}]`,r-2*dt.wrapPadding,i),e.width=r,e.wrap=!0;const c=o._K.calculateTextDimensions(e.message,i),h=s.Y2.getMax(c.height,dt.labelBoxHeight);a=n+h,l.Rm.debug(`${h} - ${e.message}`)}i(e),pt.bumpVerticalPos(a)}function At(t,e,r,n,i,a,o){function s(r,n){r.x<i.get(t.from).x?(pt.insert(e.stopx-n,e.starty,e.startx,e.stopy+r.height/2+dt.noteMargin),e.stopx=e.stopx+n):(pt.insert(e.startx,e.starty,e.stopx+n,e.stopy+r.height/2+dt.noteMargin),e.stopx=e.stopx-n)}function c(r,n){r.x<i.get(t.to).x?(pt.insert(e.startx-n,e.starty,e.stopx,e.stopy+r.height/2+dt.noteMargin),e.startx=e.startx+n):(pt.insert(e.stopx,e.starty,e.startx+n,e.stopy+r.height/2+dt.noteMargin),e.startx=e.startx-n)}(0,l.K2)(s,"receiverAdjustment"),(0,l.K2)(c,"senderAdjustment");const h=[m,y,b,v];if(a.get(t.to)==n){const e=i.get(t.to);s(e,h.includes(e.type)?21:e.width/2+3),e.starty=r-e.height/2,pt.bumpVerticalPos(e.height/2)}else if(o.get(t.from)==n){const e=i.get(t.from);if(dt.mirrorActors){c(e,h.includes(e.type)?18:e.width/2)}e.stopy=r-e.height/2,pt.bumpVerticalPos(e.height/2)}else if(o.get(t.to)==n){const e=i.get(t.to);if(dt.mirrorActors){s(e,h.includes(e.type)?21:e.width/2+3)}e.stopy=r-e.height/2,pt.bumpVerticalPos(e.height/2)}}(0,l.K2)(_t,"adjustLoopHeightForWrap"),(0,l.K2)(At,"adjustCreatedDestroyedData");var Rt=(0,l.K2)(async function(t,e,r,n){const{securityLevel:i,sequence:a,look:o}=(0,s.D7)();let h;dt=a,"sandbox"===i&&(h=(0,c.Ltv)("#i"+e));const u="sandbox"===i?(0,c.Ltv)(h.nodes()[0].contentDocument.body):(0,c.Ltv)("body"),d="sandbox"===i?h.nodes()[0].contentDocument:document;pt.init(),l.Rm.debug(n.db);const p="sandbox"===i?u.select(`[id="${e}"]`):(0,c.Ltv)(`[id="${e}"]`),f=n.db.getActors(),g=n.db.getCreatedActors(),m=n.db.getDestroyedActors(),y=n.db.getBoxes();let v=n.db.getActorKeys();const b=n.db.getMessages(),x=n.db.getDiagramTitle(),T=n.db.hasAtLeastOneBox(),w=n.db.hasAtLeastOneBoxWithTitle(),k=await Lt(f,b,n);if(dt.height=await Dt(f,k,y),ut.insertComputerIcon(p,e),ut.insertDatabaseIcon(p,e),ut.insertClockIcon(p,e),T&&(pt.bumpVerticalPos(dt.boxMargin),w&&pt.bumpVerticalPos(y[0].textMaxHeight)),!0===dt.hideUnusedParticipants){const t=new Set;b.forEach(e=>{t.add(e.from),t.add(e.to)}),v=v.filter(e=>t.has(e))}const C=new Map(v.map((t,e)=>[f.get(t)?.name??t,e]));Tt(p,f,g,v,0,b,!1);const E=await Ft(b,f,k,n);function S(t,e){const r=pt.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),ut.drawActivation(p,r,e,dt,Et(t.from).length,n,C),pt.insert(r.startx,e-10,r.stopx,e)}ut.insertArrowHead(p,e),ut.insertArrowCrossHead(p,e),ut.insertArrowFilledHead(p,e),ut.insertSequenceNumber(p,e),ut.insertSolidTopArrowHead(p,e),ut.insertSolidBottomArrowHead(p,e),ut.insertStickTopArrowHead(p,e),ut.insertStickBottomArrowHead(p,e),"neo"===o&&ut.insertDropShadow(p,dt),(0,l.K2)(S,"activeEnd");let _=1,A=1;const R=[],L=[];let I=0;for(const s of b){let t,e,r;switch(s.type){case n.db.LINETYPE.NOTE:pt.resetVerticalPos(),e=s.noteModel,await ft(p,e,s.id);break;case n.db.LINETYPE.ACTIVE_START:case n.db.LINETYPE.CENTRAL_CONNECTION:case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:pt.newActivation(s,p,f);break;case n.db.LINETYPE.ACTIVE_END:S(s,pt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:_t(E,s,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,t=>pt.newLoop(t));break;case n.db.LINETYPE.LOOP_END:t=pt.endLoop(),await ut.drawLoop(p,t,"loop",dt,s),pt.bumpVerticalPos(t.stopy-pt.getVerticalPos()),pt.models.addLoop(t);break;case n.db.LINETYPE.RECT_START:_t(E,s,dt.boxMargin,dt.boxMargin,t=>pt.newLoop(void 0,t.message));break;case n.db.LINETYPE.RECT_END:t=pt.endLoop(),L.push(t),pt.models.addLoop(t),pt.bumpVerticalPos(t.stopy-pt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:_t(E,s,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,t=>pt.newLoop(t));break;case n.db.LINETYPE.OPT_END:t=pt.endLoop(),await ut.drawLoop(p,t,"opt",dt,s),pt.bumpVerticalPos(t.stopy-pt.getVerticalPos()),pt.models.addLoop(t);break;case n.db.LINETYPE.ALT_START:_t(E,s,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,t=>pt.newLoop(t));break;case n.db.LINETYPE.ALT_ELSE:_t(E,s,dt.boxMargin+dt.boxTextMargin,dt.boxMargin,t=>pt.addSectionToLoop(t));break;case n.db.LINETYPE.ALT_END:t=pt.endLoop(),await ut.drawLoop(p,t,"alt",dt,s),pt.bumpVerticalPos(t.stopy-pt.getVerticalPos()),pt.models.addLoop(t);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:_t(E,s,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,t=>pt.newLoop(t)),pt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:_t(E,s,dt.boxMargin+dt.boxTextMargin,dt.boxMargin,t=>pt.addSectionToLoop(t));break;case n.db.LINETYPE.PAR_END:t=pt.endLoop(),await ut.drawLoop(p,t,"par",dt,s),pt.bumpVerticalPos(t.stopy-pt.getVerticalPos()),pt.models.addLoop(t);break;case n.db.LINETYPE.AUTONUMBER:_=s.message.start||_,A=s.message.step||A,s.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:_t(E,s,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,t=>pt.newLoop(t));break;case n.db.LINETYPE.CRITICAL_OPTION:_t(E,s,dt.boxMargin+dt.boxTextMargin,dt.boxMargin,t=>pt.addSectionToLoop(t));break;case n.db.LINETYPE.CRITICAL_END:t=pt.endLoop(),await ut.drawLoop(p,t,"critical",dt,s),pt.bumpVerticalPos(t.stopy-pt.getVerticalPos()),pt.models.addLoop(t);break;case n.db.LINETYPE.BREAK_START:_t(E,s,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,t=>pt.newLoop(t));break;case n.db.LINETYPE.BREAK_END:t=pt.endLoop(),await ut.drawLoop(p,t,"break",dt,s),pt.bumpVerticalPos(t.stopy-pt.getVerticalPos()),pt.models.addLoop(t);break;default:try{r=s.msgModel,r.starty=pt.getVerticalPos(),r.sequenceIndex=_,r.sequenceVisible=n.db.showSequenceNumbers(),r.id=s.id,r.from=s.from,r.to=s.to;const t=await bt(0,r);At(s,r,t,I,f,g,m),R.push({messageModel:r,lineStartY:t,msg:s}),pt.models.addMessage(r)}catch(K){l.Rm.error("error while drawing message",K)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(s.type)&&(_=Math.round(100*(_+A))/100),I++}l.Rm.debug("createdActors",g),l.Rm.debug("destroyedActors",m),await wt(p,f,v,!1,e,n,C);for(const s of R)await xt(p,s.messageModel,s.lineStartY,n,s.msg,e);dt.mirrorActors&&await wt(p,f,v,!0,e,n,C),L.forEach(t=>ut.drawBackgroundRect(p,t)),M(p,f,v,dt);for(const s of pt.models.boxes){s.height=pt.getVerticalPos()-s.y,pt.insert(s.x,s.y,s.x+s.width,s.height);const t=2*dt.boxMargin;s.startx=s.x-t,s.starty=s.y-.25*t,s.stopx=s.startx+s.width+2*t,s.stopy=s.starty+s.height+.75*t,s.stroke="rgb(0,0,0, 0.5)",ut.drawBox(p,s,dt)}T&&pt.bumpVerticalPos(dt.boxMargin);const D=kt(p,f,v,d),{bounds:N}=pt.getBounds();void 0===N.startx&&(N.startx=0),void 0===N.starty&&(N.starty=0),void 0===N.stopx&&(N.stopx=0),void 0===N.stopy&&(N.stopy=0);let O=N.stopy-N.starty;O<D.maxHeight&&(O=D.maxHeight);let $=O+2*dt.diagramMarginY;dt.mirrorActors&&($=$-dt.boxMargin+dt.bottomMarginAdj);let P=N.stopx-N.startx;P<D.maxWidth&&(P=D.maxWidth);const B=P+2*dt.diagramMarginX;x&&p.append("text").text(x).attr("x",(N.stopx-N.startx)/2-2*dt.diagramMarginX).attr("y",-25),(0,s.a$)(p,$,B,dt.useMaxWidth);const F=x?40:0,z=f.size&&"neo"===o?30:0;p.attr("viewBox",N.startx-dt.diagramMarginX+" -"+(dt.diagramMarginY+F)+" "+B+" "+($+F+z)),l.Rm.debug("models:",pt.models)},"draw");async function Lt(t,e,r){const n={};for(const i of e)if(t.get(i.to)&&t.get(i.from)){const e=t.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!e.prevActor)continue;if(i.placement===r.db.PLACEMENT.RIGHTOF&&!e.nextActor)continue;const a=void 0!==i.placement,l=!a,c=a?yt(dt):mt(dt),h=i.wrap?o._K.wrapLabel(i.message,dt.width-2*dt.wrapPadding,c):i.message,u=((0,s.Wi)(h)?await(0,s.Dl)(i.message,(0,s.D7)()):o._K.calculateTextDimensions(h,c)).width+2*dt.wrapPadding;l&&i.from===e.nextActor?n[i.to]=s.Y2.getMax(n[i.to]||0,u):l&&i.from===e.prevActor?n[i.from]=s.Y2.getMax(n[i.from]||0,u):l&&i.from===i.to?(n[i.from]=s.Y2.getMax(n[i.from]||0,u/2),n[i.to]=s.Y2.getMax(n[i.to]||0,u/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=s.Y2.getMax(n[i.from]||0,u):i.placement===r.db.PLACEMENT.LEFTOF?n[e.prevActor]=s.Y2.getMax(n[e.prevActor]||0,u):i.placement===r.db.PLACEMENT.OVER&&(e.prevActor&&(n[e.prevActor]=s.Y2.getMax(n[e.prevActor]||0,u/2)),e.nextActor&&(n[i.from]=s.Y2.getMax(n[i.from]||0,u/2)))}return l.Rm.debug("maxMessageWidthPerActor:",n),n}(0,l.K2)(Lt,"getMaxMessageWidthPerActor");var It=(0,l.K2)(function(t){let e=0;const r=vt(dt);for(const n in t.links){const t=o._K.calculateTextDimensions(n,r).width+2*dt.wrapPadding+2*dt.boxMargin;e<t&&(e=t)}return e},"getRequiredPopupWidth");async function Dt(t,e,r){let n=0;for(const a of t.keys()){const e=t.get(a);e.wrap&&(e.description=o._K.wrapLabel(e.description,dt.width-2*dt.wrapPadding,vt(dt)));const r=(0,s.Wi)(e.description)?await(0,s.Dl)(e.description,(0,s.D7)()):o._K.calculateTextDimensions(e.description,vt(dt));e.width=e.wrap?dt.width:s.Y2.getMax(dt.width,r.width+2*dt.wrapPadding),e.height=e.wrap?s.Y2.getMax(r.height,dt.height):dt.height,n=s.Y2.getMax(n,e.height)}for(const a in e){const r=t.get(a);if(!r)continue;const n=t.get(r.nextActor);if(!n){const t=e[a]+dt.actorMargin-r.width/2;r.margin=s.Y2.getMax(t,dt.actorMargin);continue}const i=e[a]+dt.actorMargin-r.width/2-n.width/2;r.margin=s.Y2.getMax(i,dt.actorMargin)}let i=0;return r.forEach(e=>{const r=mt(dt);let n=e.actorKeys.reduce((e,r)=>e+(t.get(r).width+(t.get(r).margin||0)),0);n+=8*dt.boxMargin,n-=2*dt.boxTextMargin,e.wrap&&(e.name=o._K.wrapLabel(e.name,n-2*dt.wrapPadding,r));const a=o._K.calculateTextDimensions(e.name,r);i=s.Y2.getMax(a.height,i);const l=s.Y2.getMax(n,a.width+2*dt.wrapPadding);if(e.margin=dt.boxTextMargin,n<l){const t=(l-n)/2;e.margin+=t}}),r.forEach(t=>t.textMaxHeight=i),s.Y2.getMax(n,dt.height)}(0,l.K2)(Dt,"calculateActorMargins");var Nt=(0,l.K2)(async function(t,e,r){const n=e.get(t.from),i=e.get(t.to),a=n.x,c=i.x,h=t.wrap&&t.message;let u=(0,s.Wi)(t.message)?await(0,s.Dl)(t.message,(0,s.D7)()):o._K.calculateTextDimensions(h?o._K.wrapLabel(t.message,dt.width,yt(dt)):t.message,yt(dt));const d={width:h?dt.width:s.Y2.getMax(dt.width,u.width+2*dt.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(d.width=h?s.Y2.getMax(dt.width,u.width):s.Y2.getMax(n.width/2+i.width/2,u.width+2*dt.noteMargin),d.startx=a+(n.width+dt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(d.width=h?s.Y2.getMax(dt.width,u.width+2*dt.noteMargin):s.Y2.getMax(n.width/2+i.width/2,u.width+2*dt.noteMargin),d.startx=a-d.width+(n.width-dt.actorMargin)/2):t.to===t.from?(u=o._K.calculateTextDimensions(h?o._K.wrapLabel(t.message,s.Y2.getMax(dt.width,n.width),yt(dt)):t.message,yt(dt)),d.width=h?s.Y2.getMax(dt.width,n.width):s.Y2.getMax(n.width,dt.width,u.width+2*dt.noteMargin),d.startx=a+(n.width-d.width)/2):(d.width=Math.abs(a+n.width/2-(c+i.width/2))+dt.actorMargin,d.startx=a<c?a+n.width/2-dt.actorMargin/2:c+i.width/2-dt.actorMargin/2),h&&(d.message=o._K.wrapLabel(t.message,d.width-2*dt.wrapPadding,yt(dt))),l.Rm.debug(`NM:[${d.startx},${d.stopx},${d.starty},${d.stopy}:${d.width},${d.height}=${t.message}]`),d},"buildNoteModel"),Mt=(0,l.K2)(function(t,e){const{CENTRAL_CONNECTION:r,CENTRAL_CONNECTION_REVERSE:n,CENTRAL_CONNECTION_DUAL:i}=e.db.LINETYPE;return[r,n,i].includes(t.centralConnection)},"hasCentralConnection"),Ot=(0,l.K2)(function(t,e,r){const{CENTRAL_CONNECTION_REVERSE:n,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:o}=e.db.LINETYPE;let s=0;return t.centralConnection!==n&&t.centralConnection!==i||(s+=4),t.centralConnection!==n&&t.centralConnection!==i||t.type!==a&&t.type!==o||(s+=r?0:-6),s},"calculateCentralConnectionOffset"),$t=(0,l.K2)(function(t,e){const{SOLID_ARROW_TOP_REVERSE:r,SOLID_ARROW_TOP_REVERSE_DOTTED:n,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:a,STICK_ARROW_TOP_REVERSE:o,STICK_ARROW_TOP_REVERSE_DOTTED:s,STICK_ARROW_BOTTOM_REVERSE:l,STICK_ARROW_BOTTOM_REVERSE_DOTTED:c}=e.db.LINETYPE;return[r,n,i,a,o,s,l,c].includes(t.type)},"isReverseArrowType"),Pt=(0,l.K2)(function(t,e){const{BIDIRECTIONAL_SOLID:r,BIDIRECTIONAL_DOTTED:n}=e.db.LINETYPE;return[r,n].includes(t.type)},"isBidirectionalArrowType"),Bt=(0,l.K2)(function(t,e,r){const{look:n}=(0,s.D7)();if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[i,a]=St(t.from,e),[c,h]=St(t.to,e),u=i<=c;let d=u?a:i,p=u?c:h;if("neo"===n){const e=3;t.type!==r.db.LINETYPE.SOLID_OPEN&&(p+=u?-e:e),t.type!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&t.type!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(d+=u?e:-e)}d+=Ot(t,r,u);const f=Math.abs(c-h)>2,g=(0,l.K2)(t=>u?-t:t,"adjustValue");t.from===t.to?p=d:(t.activate&&!f&&(p+=g(dt.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(p+=g(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(d-=g(3)));const m=[i,a,c,h],y=Math.abs(d-p);t.wrap&&t.message&&(t.message=o._K.wrapLabel(t.message,s.Y2.getMax(y+2*dt.wrapPadding,dt.width),mt(dt)));const v=o._K.calculateTextDimensions(t.message,mt(dt));return{width:s.Y2.getMax(t.wrap?0:v.width+2*dt.wrapPadding,y+2*dt.wrapPadding,dt.width),height:0,startx:d,stopx:p,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},"buildMessageModel"),Ft=(0,l.K2)(async function(t,e,r,n){const i={},a=[];let o,c,h;for(const l of t){switch(l.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.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:l.id,msg:l.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:l.message&&(o=a.pop(),i[o.id]=o,i[l.id]=o,a.push(o));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:o=a.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{const t=e.get(l.from?l.from:l.to.actor),r=Et(l.from?l.from:l.to.actor).length,n=t.x+t.width/2+(r-1)*dt.activationWidth/2,i={startx:n,stopx:n+dt.activationWidth,actor:l.from,enabled:!0};pt.activations.push(i)}break;case n.db.LINETYPE.ACTIVE_END:{const t=pt.activations.map(t=>t.actor).lastIndexOf(l.from);pt.activations.splice(t,1).splice(0,1)}}void 0!==l.placement?(c=await Nt(l,e,n),l.noteModel=c,a.forEach(t=>{o=t,o.from=s.Y2.getMin(o.from,c.startx),o.to=s.Y2.getMax(o.to,c.startx+c.width),o.width=s.Y2.getMax(o.width,Math.abs(o.from-o.to))-dt.labelBoxWidth})):(h=Bt(l,e,n),l.msgModel=h,h.startx&&h.stopx&&a.length>0&&a.forEach(t=>{if(o=t,h.startx===h.stopx){const t=e.get(l.from),r=e.get(l.to);o.from=s.Y2.getMin(t.x-h.width/2,t.x-t.width/2,o.from),o.to=s.Y2.getMax(r.x+h.width/2,r.x+t.width/2,o.to),o.width=s.Y2.getMax(o.width,Math.abs(o.to-o.from))-dt.labelBoxWidth}else o.from=s.Y2.getMin(h.startx,o.from),o.to=s.Y2.getMax(h.stopx,o.to),o.width=s.Y2.getMax(o.width,h.width)-dt.labelBoxWidth}))}return pt.activations=[],l.Rm.debug("Loop type widths:",i),i},"calculateLoopBounds"),zt={bounds:pt,drawActors:wt,drawActorsPopup:kt,setConf:Ct,draw:Rt},Kt={parser:d,get db(){return new x},renderer:zt,styles:T,init:(0,l.K2)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,s.XV)({sequence:{wrap:t.wrap}}))},"init")}},8363(t,e,r){"use strict";r.d(e,{diagram:()=>L});var n,i=r(1513),a=(r(9625),r(4345),r(3848),r(6615),r(1334),r(2654),r(5105),r(8013),r(1240),r(8221)),o=r(1123),s=r(797),l=r(1444),c=r(5422),h=r(697),u=(0,s.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,o.D7)().state.sizeUnit).attr("cx",(0,o.D7)().state.padding+(0,o.D7)().state.sizeUnit).attr("cy",(0,o.D7)().state.padding+(0,o.D7)().state.sizeUnit),"drawStartState"),d=(0,s.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,o.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,o.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),p=(0,s.K2)((t,e)=>{const r=t.append("text").attr("x",2*(0,o.D7)().state.padding).attr("y",(0,o.D7)().state.textHeight+2*(0,o.D7)().state.padding).attr("font-size",(0,o.D7)().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,o.D7)().state.padding).attr("y",(0,o.D7)().state.padding).attr("width",n.width+2*(0,o.D7)().state.padding).attr("height",n.height+2*(0,o.D7)().state.padding).attr("rx",(0,o.D7)().state.radius),r},"drawSimpleState"),f=(0,s.K2)((t,e)=>{const r=(0,s.K2)(function(t,e,r){const n=t.append("tspan").attr("x",2*(0,o.D7)().state.padding).text(e);r||n.attr("dy",(0,o.D7)().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*(0,o.D7)().state.padding).attr("y",(0,o.D7)().state.textHeight+1.3*(0,o.D7)().state.padding).attr("font-size",(0,o.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,a=t.append("text").attr("x",(0,o.D7)().state.padding).attr("y",i+.4*(0,o.D7)().state.padding+(0,o.D7)().state.dividerMargin+(0,o.D7)().state.textHeight).attr("class","state-description");let l=!0,c=!0;e.descriptions.forEach(function(t){l||(r(a,t,c),c=!1),l=!1});const h=t.append("line").attr("x1",(0,o.D7)().state.padding).attr("y1",(0,o.D7)().state.padding+i+(0,o.D7)().state.dividerMargin/2).attr("y2",(0,o.D7)().state.padding+i+(0,o.D7)().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),d=Math.max(u.width,n.width);return h.attr("x2",d+3*(0,o.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,o.D7)().state.padding).attr("y",(0,o.D7)().state.padding).attr("width",d+2*(0,o.D7)().state.padding).attr("height",u.height+i+2*(0,o.D7)().state.padding).attr("rx",(0,o.D7)().state.radius),t},"drawDescrState"),g=(0,s.K2)((t,e,r)=>{const n=(0,o.D7)().state.padding,i=2*(0,o.D7)().state.padding,a=t.node().getBBox(),s=a.width,l=a.x,c=t.append("text").attr("x",0).attr("y",(0,o.D7)().state.titleShift).attr("font-size",(0,o.D7)().state.fontSize).attr("class","state-title").text(e.id),h=c.node().getBBox().width+i;let u,d=Math.max(h,s);d===s&&(d+=i);const p=t.node().getBBox();e.doc,u=l-n,h>s&&(u=(s-d)/2+n),Math.abs(l-p.x)<n&&h>s&&(u=l-(h-s)/2);const f=1-(0,o.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",u).attr("y",f).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",p.height+(0,o.D7)().state.textHeight+(0,o.D7)().state.titleShift+1).attr("rx","0"),c.attr("x",u+n),h<=s&&c.attr("x",l+(d-i)/2-h/2+n),t.insert("rect",":first-child").attr("x",u).attr("y",(0,o.D7)().state.titleShift-(0,o.D7)().state.textHeight-(0,o.D7)().state.padding).attr("width",d).attr("height",3*(0,o.D7)().state.textHeight).attr("rx",(0,o.D7)().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",(0,o.D7)().state.titleShift-(0,o.D7)().state.textHeight-(0,o.D7)().state.padding).attr("width",d).attr("height",p.height+3+2*(0,o.D7)().state.textHeight).attr("rx",(0,o.D7)().state.radius),t},"addTitleAndBox"),m=(0,s.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,o.D7)().state.sizeUnit+(0,o.D7)().state.miniPadding).attr("cx",(0,o.D7)().state.padding+(0,o.D7)().state.sizeUnit+(0,o.D7)().state.miniPadding).attr("cy",(0,o.D7)().state.padding+(0,o.D7)().state.sizeUnit+(0,o.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,o.D7)().state.sizeUnit).attr("cx",(0,o.D7)().state.padding+(0,o.D7)().state.sizeUnit+2).attr("cy",(0,o.D7)().state.padding+(0,o.D7)().state.sizeUnit+2)),"drawEndState"),y=(0,s.K2)((t,e)=>{let r=(0,o.D7)().state.forkWidth,n=(0,o.D7)().state.forkHeight;if(e.parentId){let t=r;r=n,n=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",(0,o.D7)().state.padding).attr("y",(0,o.D7)().state.padding)},"drawForkJoinState"),v=(0,s.K2)((t,e,r,n)=>{let i=0;const a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");const l=s.split(o.Y2.lineBreakRegex);let c=1.25*(0,o.D7)().state.noteMargin;for(const h of l){const t=h.trim();if(t.length>0){const n=a.append("tspan");if(n.text(t),0===c){c+=n.node().getBBox().height}i+=c,n.attr("x",e+(0,o.D7)().state.noteMargin),n.attr("y",r+i+1.25*(0,o.D7)().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),b=(0,s.K2)((t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",(0,o.D7)().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=v(t,0,0,n);return r.attr("height",a+2*(0,o.D7)().state.noteMargin),r.attr("width",i+2*(0,o.D7)().state.noteMargin),r},"drawNote"),x=(0,s.K2)(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");"start"===e.type&&u(i),"end"===e.type&&m(i),"fork"!==e.type&&"join"!==e.type||y(i,e),"note"===e.type&&b(e.note.text,i),"divider"===e.type&&d(i),"default"===e.type&&0===e.descriptions.length&&p(i,e),"default"===e.type&&e.descriptions.length>0&&f(i,e);const a=i.node().getBBox();return n.width=a.width+2*(0,o.D7)().state.padding,n.height=a.height+2*(0,o.D7)().state.padding,n},"drawState"),T=0,w=(0,s.K2)(function(t,e,r){const n=(0,s.K2)(function(t){switch(t){case i.u4.relationType.AGGREGATION:return"aggregation";case i.u4.relationType.EXTENSION:return"extension";case i.u4.relationType.COMPOSITION:return"composition";case i.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const c=e.points,h=(0,l.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(l.qrM),u=t.append("path").attr("d",h(c)).attr("id","edge"+T).attr("class","transition");let d="";if((0,o.D7)().state.arrowMarkerAbsolute&&(d=(0,o.ID)(!0)),u.attr("marker-end","url("+d+"#"+n(i.u4.relationType.DEPENDENCY)+"End)"),void 0!==r.title){const n=t.append("g").attr("class","stateLabel"),{x:i,y:l}=a._K.calcLabelPosition(e.points),c=o.Y2.getRows(r.title);let h=0;const u=[];let d=0,p=0;for(let t=0;t<=c.length;t++){const e=n.append("text").attr("text-anchor","middle").text(c[t]).attr("x",i).attr("y",l+h),r=e.node().getBBox();if(d=Math.max(d,r.width),p=Math.min(p,r.x),s.Rm.info(r.x,i,l+h),0===h){const t=e.node().getBBox();h=t.height,s.Rm.info("Title height",h,l)}u.push(e)}let f=h*c.length;if(c.length>1){const t=(c.length-1)*h*.5;u.forEach((e,r)=>e.attr("y",l+r*h-t)),f=h*c.length}const g=n.node().getBBox();n.insert("rect",":first-child").attr("class","box").attr("x",i-d/2-(0,o.D7)().state.padding/2).attr("y",l-f/2-(0,o.D7)().state.padding/2-3.5).attr("width",d+(0,o.D7)().state.padding).attr("height",f+(0,o.D7)().state.padding),s.Rm.info(g)}T++},"drawEdge"),k={},C=(0,s.K2)(function(){},"setConf"),E=(0,s.K2)(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")},"insertMarkers"),S=(0,s.K2)(function(t,e,r,i){n=(0,o.D7)().state;const a=(0,o.D7)().securityLevel;let c;"sandbox"===a&&(c=(0,l.Ltv)("#i"+e));const h="sandbox"===a?(0,l.Ltv)(c.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),u="sandbox"===a?c.nodes()[0].contentDocument:document;s.Rm.debug("Rendering diagram "+t);const d=h.select(`[id='${e}']`);E(d);const p=i.db.getRootDoc(),f=d.append("g").attr("id",e+"-root");A(p,f,void 0,!1,h,u,i);const g=n.padding,m=d.node().getBBox(),y=m.width+2*g,v=m.height+2*g,b=1.75*y;(0,o.a$)(d,v,b,n.useMaxWidth),d.attr("viewBox",`${m.x-n.padding} ${m.y-n.padding} `+y+" "+v)},"draw"),_=(0,s.K2)(t=>t?t.length*n.fontSizeFactor:1,"getLabelWidth"),A=(0,s.K2)((t,e,r,i,a,l,u)=>{const d=new h.T({compound:!0,multigraph:!0});let p,f=!0;for(p=0;p<t.length;p++)if("relation"===t[p].stmt){f=!1;break}r?d.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:f?1:n.edgeLengthFactor,nodeSep:f?1:50,isMultiGraph:!0}):d.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:f?1:n.edgeLengthFactor,nodeSep:f?1:50,ranker:"tight-tree",isMultiGraph:!0}),d.setDefaultEdgeLabel(function(){return{}});const m=u.db.getStates(),y=u.db.getRelations(),v=Object.keys(m);for(const o of v){const t=m[o];let s;if(r&&(t.parentId=r),t.doc){let r=e.append("g").attr("id",t.id).attr("class","stateGroup");s=A(t.doc,r,t.id,!i,a,l,u);{r=g(r,t,i);let e=r.node().getBBox();s.width=e.width,s.height=e.height+n.padding/2,k[t.id]={y:n.compositTitleSize}}}else s=x(e,t,d);if(t.note){const r={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},n=x(e,r,d);"left of"===t.note.position?(d.setNode(s.id+"-note",n),d.setNode(s.id,s)):(d.setNode(s.id,s),d.setNode(s.id+"-note",n)),d.setParent(s.id,s.id+"-group"),d.setParent(s.id+"-note",s.id+"-group")}else d.setNode(s.id,s)}s.Rm.debug("Count=",d.nodeCount(),d);let b=0;y.forEach(function(t){b++,s.Rm.debug("Setting edge",t),d.setEdge(t.id1,t.id2,{relation:t,width:_(t.title),height:n.labelHeight*o.Y2.getRows(t.title).length,labelpos:"c"},"id"+b)}),(0,c.Zp)(d),s.Rm.debug("Graph after layout",d.nodes());const T=e.node();d.nodes().forEach(function(t){if(void 0!==t&&void 0!==d.node(t)){s.Rm.warn("Node "+t+": "+JSON.stringify(d.node(t))),a.select("#"+T.id+" #"+t).attr("transform","translate("+(d.node(t).x-d.node(t).width/2)+","+(d.node(t).y+(k[t]?k[t].y:0)-d.node(t).height/2)+" )"),a.select("#"+T.id+" #"+t).attr("data-x-shift",d.node(t).x-d.node(t).width/2);l.querySelectorAll("#"+T.id+" #"+t+" .divider").forEach(t=>{const e=t.parentElement;let r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n)&&(n=0)),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)})}else s.Rm.debug("No Node "+t+": "+JSON.stringify(d.node(t)))});let C=T.getBBox();d.edges().forEach(function(t){void 0!==t&&void 0!==d.edge(t)&&(s.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(d.edge(t))),w(e,d.edge(t),d.edge(t).relation))}),C=T.getBBox();const E={id:r||"root",label:r||"root",width:0,height:0};return E.width=C.width+2*n.padding,E.height=C.height+2*n.padding,s.Rm.debug("Doc rendered",E,d),E},"renderDoc"),R={setConf:C,draw:S},L={parser:i.Zk,get db(){return new i.u4(1)},renderer:R,styles:i.tM,init:(0,s.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},743(t,e,r){"use strict";r.d(e,{diagram:()=>a});var n=r(1513),i=(r(9625),r(4345),r(3848),r(6615),r(1334),r(2654),r(5105),r(8013),r(1240),r(8221),r(1123),r(797)),a={parser:n.Zk,get db(){return new n.u4(2)},renderer:n.q7,styles:n.tM,init:(0,i.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},3049(t,e,r){"use strict";r.d(e,{diagram:()=>ct});var n=r(594),i=r(8221),a=r(1123),o=r(797),s=r(1444),l=r(5097),c=r(8041),h=r(5263),u=function(){var t=(0,o.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[6,11,13,14,15,17,19,20,23,24],r=[1,12],n=[1,13],i=[1,14],a=[1,15],s=[1,16],l=[1,19],c=[1,20],h={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:(0,o.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:n.setDirection("LR");break;case 4:n.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 11:n.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),n.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),n.getCommonDb().setAccDescription(this.$);break;case 15:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:n.addTask(a[s],0,""),this.$=a[s];break;case 19:n.addEvent(a[s].substr(2)),this.$=a[s]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(e,[2,5],{5:6}),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:n,17:i,19:a,20:s,21:17,22:18,23:l,24:c},t(e,[2,10],{1:[2,1]}),t(e,[2,6]),{12:21,14:r,15:n,17:i,19:a,20:s,21:17,22:18,23:l,24:c},t(e,[2,8]),t(e,[2,9]),t(e,[2,11]),{16:[1,22]},{18:[1,23]},t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,7]),t(e,[2,12]),t(e,[2,13])],defaultActions:{},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},u=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(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,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 3:case 4:break;case 2:return 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}}();function d(){this.yy={}}return h.lexer=u,(0,o.K2)(d,"Parser"),d.prototype=h,h.Parser=d,new d}();u.parser=u;var d=u,p={};(0,o.VA)(p,{addEvent:()=>A,addSection:()=>C,addTask:()=>_,addTaskOrg:()=>R,clear:()=>T,default:()=>I,getCommonDb:()=>x,getDirection:()=>k,getSections:()=>E,getTasks:()=>S,setDirection:()=>w});var f="",g=0,m="LR",y=[],v=[],b=[],x=(0,o.K2)(()=>a.Wt,"getCommonDb"),T=(0,o.K2)(function(){y.length=0,v.length=0,f="",b.length=0,m="LR",(0,a.IU)()},"clear"),w=(0,o.K2)(function(t){m=t},"setDirection"),k=(0,o.K2)(function(){return m},"getDirection"),C=(0,o.K2)(function(t){f=t,y.push(t)},"addSection"),E=(0,o.K2)(function(){return y},"getSections"),S=(0,o.K2)(function(){let t=L();let e=0;for(;!t&&e<100;)t=L(),e++;return v.push(...b),v},"getTasks"),_=(0,o.K2)(function(t,e,r){const n={id:g++,section:f,type:f,task:t,score:e||0,events:r?[r]:[]};b.push(n)},"addTask"),A=(0,o.K2)(function(t){b.find(t=>t.id===g-1).events.push(t)},"addEvent"),R=(0,o.K2)(function(t){const e={section:f,type:f,description:t,task:t,classes:[]};v.push(e)},"addTaskOrg"),L=(0,o.K2)(function(){const t=(0,o.K2)(function(t){return b[t].processed},"compileTask");let e=!0;for(const[r,n]of b.entries())t(r),e=e&&n.processed;return e},"compileTasks"),I={clear:T,getCommonDb:x,getDirection:k,setDirection:w,addSection:C,getSections:E,getTasks:S,addTask:_,addTaskOrg:R,addEvent:A},D=0,N=(0,o.K2)(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),void 0!==e.class&&r.attr("class",e.class),r},"drawRect"),M=(0,o.K2)(function(t,e){const r=15,n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",r).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const n=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const n=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(r/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,o.K2)(a,"smile"),(0,o.K2)(l,"sad"),(0,o.K2)(c,"ambivalent"),e.score>3?a(i):e.score<3?l(i):c(i),n},"drawFace"),O=(0,o.K2)(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),void 0!==r.class&&r.attr("class",r.class),void 0!==e.title&&r.append("title").text(e.title),r},"drawCircle"),$=(0,o.K2)(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),void 0!==e.class&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(r),n},"drawText"),P=(0,o.K2)(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}(0,o.K2)(r,"genPoints");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,$(t,e)},"drawLabel"),B=(0,o.K2)(function(t,e,r){const n=t.append("g"),i=q();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,N(n,i),W(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),F=-1,z=(0,o.K2)(function(t,e,r,n){const i=e.x+r.width/2,a=t.append("g");F++;a.append("line").attr("id",n+"-task"+F).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),M(a,{cx:i,cy:300+30*(5-e.score),score:e.score});const o=q();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,N(a,o),W(r)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),K=(0,o.K2)(function(t,e){N(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,o.K2)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),q=(0,o.K2)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),W=function(){function t(t,e,r,i,a,o,s,l){n(e.append("text").attr("x",r+a/2).attr("y",i+o/2+5).style("font-color",l).style("text-anchor","middle").text(t),s)}function e(t,e,r,i,a,o,s,l,c){const{taskFontSize:h,taskFontFamily:u}=l,d=t.split(/<br\s*\/?>/gi);for(let p=0;p<d.length;p++){const t=p*h-h*(d.length-1)/2,l=e.append("text").attr("x",r+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",r+a/2).attr("dy",t).text(d[p]),l.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(l,s)}}function r(t,r,i,a,o,s,l,c){const h=r.append("switch"),u=h.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,a,o,s,l,c),n(u,l)}function n(t,e){for(const r in e)r in e&&t.attr(r,e[r])}return(0,o.K2)(t,"byText"),(0,o.K2)(e,"byTspan"),(0,o.K2)(r,"byFo"),(0,o.K2)(n,"_setTextAttrs"),function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}(),U=(0,o.K2)(function(t,e){D=0,F=-1,t.append("defs").append("marker").attr("id",e+"-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")},"initGraphics");function G(t,e){t.each(function(){var t,r=(0,s.Ltv)(this),n=r.text().split(/(\s+|<br>)/).reverse(),i=[],a=r.attr("y"),o=parseFloat(r.attr("dy")),l=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;s<n.length;s++)t=n[n.length-1-s],i.push(t),l.text(i.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(i.pop(),l.text(i.join(" ").trim()),i="<br>"===t?[""]:[t],l=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}(0,o.K2)(G,"wrap");var Y=(0,o.K2)(function(t,e,r,n,i,a=!1){const{theme:o,look:l}=n,c=o?.includes("redux"),h=r%(n?.themeVariables?.THEME_COLOR_LIMIT??12)-1,u=t.append("g");e.section=h,u.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+h);const d=u.append("g"),p=u.append("g"),f=p.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(G,e.width).node().getBBox(),g=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;if(e.height=f.height+1.1*g*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,p.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),c&&p.attr("transform",`translate(${e.width/2}, ${a?e.padding/2+3:e.padding})`),H(d,e,h,i,n),"neo"===l&&(u.attr("data-look","neo"),c)){const e=o.includes("dark"),r=t.node()?.ownerSVGElement??t.node(),n=(0,s.Ltv)(r),i=n.attr("id")??"",a=i?`${i}-drop-shadow`:"drop-shadow";if(n.select(`#${a}`).empty()){const t=n.select("defs");(t.empty()?n.append("defs"):t).append("filter").attr("id",a).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",e?"0.2":"0.06").attr("flood-color",e?"#FFFFFF":"#000000")}}return e},"drawNode"),V=(0,o.K2)(function(t,e,r){const n=t.append("g"),i=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(G,e.width).node().getBBox(),a=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return n.remove(),i.height+1.1*a*.5+e.padding},"getVirtualNodeHeight"),H=(0,o.K2)(function(t,e,r,n,i){const{theme:a}=i,o=a?.includes("redux")?0:5,s=o>0?`M0 ${e.height-5} v${10-e.height} q0,-${o},${o},-${o} h${e.width-10} q${o},0,${o},${o} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;t.append("path").attr("id",n+"-node-"+D++).attr("class","node-bkg node-"+e.type).attr("d",s),a?.includes("redux")||t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),X={drawRect:N,drawCircle:O,drawSection:B,drawText:$,drawLabel:P,drawTask:z,drawBackgroundRect:K,getTextObj:j,getNoteRect:q,initGraphics:U,drawNode:Y,getVirtualNodeHeight:V},Z=(0,o.K2)(function(t,e,r,n){const i=(0,a.D7)(),{look:l,theme:c,themeVariables:h}=i,{useGradient:u,gradientStart:d,gradientStop:p}=h,f=i.timeline?.leftMargin??50;o.Rm.debug("timeline",n.db);const g=i.securityLevel;let m;"sandbox"===g&&(m=(0,s.Ltv)("#i"+e));const y=("sandbox"===g?(0,s.Ltv)(m.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select("#"+e);y.append("g");const v=n.db.getTasks(),b=n.db.getCommonDb().getDiagramTitle();o.Rm.debug("task",v),X.initGraphics(y,e);const x=n.db.getSections();o.Rm.debug("sections",x);let T=0,w=0,k=0,C=0,E=50+f,S=50;C=50;let _=0,A=!0;x.forEach(function(t){const e={number:_,descr:t,section:_,width:150,padding:20,maxHeight:T},r=X.getVirtualNodeHeight(y,e,i);o.Rm.debug("sectionHeight before draw",r),T=Math.max(T,r+20)});let R=0,L=0;o.Rm.debug("tasks.length",v.length);for(const[a,s]of v.entries()){const t={number:a,descr:s,section:s.section,width:150,padding:20,maxHeight:w},e=X.getVirtualNodeHeight(y,t,i);o.Rm.debug("taskHeight before draw",e),w=Math.max(w,e+20),R=Math.max(R,s.events.length);let r=0;for(const n of s.events){const t={descr:n,section:s.section,number:s.section,width:150,padding:20,maxHeight:50};r+=X.getVirtualNodeHeight(y,t,i)}s.events.length>0&&(r+=10*(s.events.length-1)),L=Math.max(L,r)}o.Rm.debug("maxSectionHeight before draw",T),o.Rm.debug("maxTaskHeight before draw",w),x&&x.length>0?x.forEach(t=>{const r=v.filter(e=>e.section===t),n={number:_,descr:t,section:_,width:200*Math.max(r.length,1)-50,padding:20,maxHeight:T};o.Rm.debug("sectionNode",n);const a=y.append("g"),s=X.drawNode(a,n,_,i,e);o.Rm.debug("sectionNode output",s),a.attr("transform",`translate(${E}, 50)`),S+=T+50,r.length>0&&Q(y,r,_,E,S,w,i,R,L,T,!1,e),E+=200*Math.max(r.length,1),S=50,_++}):(A=!1,Q(y,v,_,E,S,w,i,R,L,T,!0,e));const I=y.node().getBBox();o.Rm.debug("bounds",I),b&&y.append("text").text(b).attr("x","neo"===l?2*I.x+f:I.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),k=A?T+w+150:w+100;if(y.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",k).attr("x2",I.width+3*f).attr("y2",k).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),"neo"===l&&u&&"neutral"!==c){const t=y.select("defs"),e=(t.empty()?y.append("defs"):t).append("linearGradient").attr("id",y.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",d).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,a.ot)(void 0,y,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),Q=(0,o.K2)(function(t,e,r,n,i,a,s,l,c,h,u,d){for(const p of e){const e={descr:p.task,section:r,number:r,width:150,padding:20,maxHeight:a};o.Rm.debug("taskNode",e);const l=t.append("g").attr("class","taskWrapper"),h=X.drawNode(l,e,r,s,d).height;if(o.Rm.debug("taskHeight after draw",h),l.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,h),p.events){const e=t.append("g").attr("class","lineWrapper");let o=a;i+=100,o+=J(t,p.events,r,n,i,s,d),i-=100,e.append("line").attr("x1",n+95).attr("y1",i+a).attr("x2",n+95).attr("y2",i+a+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${d}-arrowhead)`).attr("stroke-dasharray","5,5")}n+=200,u&&!s.timeline?.disableMulticolor&&r++}i-=10},"drawTasks"),J=(0,o.K2)(function(t,e,r,n,i,a,s){let l=0;const c=i;i+=100;for(const h of e){const e={descr:h,section:r,number:r,width:150,padding:20,maxHeight:50};o.Rm.debug("eventNode",e);const c=t.append("g").attr("class","eventWrapper"),u=X.drawNode(c,e,r,a,s,!0).height;l+=u,c.attr("transform",`translate(${n}, ${i})`),i=i+10+u}return i=c,l},"drawEvents"),tt={setConf:(0,o.K2)(()=>{},"setConf"),draw:Z},et=200,rt=(0,o.K2)(function(t,e,r,s){const l=(0,a.D7)(),c=l.timeline?.leftMargin??50;o.Rm.debug("timeline",s.db);const h=(0,n.D)(e);h.append("g");const u=s.db.getTasks(),d=s.db.getCommonDb().getDiagramTitle();o.Rm.debug("task",u),X.initGraphics(h);const p=s.db.getSections();o.Rm.debug("sections",p);let f=0,g=0;const m=50+c;let y=50;const v=y,b=230,x=m+b;let T=0;const w=p&&p.length>0,k=w?x:m+b,C=Math.max(50,580);p.forEach(function(t){const e={number:T,descr:t,section:T,width:C,padding:5,maxHeight:f},r=X.getVirtualNodeHeight(h,e,l);o.Rm.debug("sectionHeight before draw",r),f=Math.max(f,r)});let E=0;o.Rm.debug("tasks.length",u.length);for(const[n,i]of u.entries()){const t={number:n,descr:i,section:i.section,width:et,padding:5,maxHeight:g},e=X.getVirtualNodeHeight(h,t,l);o.Rm.debug("taskHeight before draw",e),g=Math.max(g,e);let r=0;for(const n of i.events){const t={descr:n,section:i.section,number:i.section,width:300,padding:5,maxHeight:50};r+=X.getVirtualNodeHeight(h,t,l)}i.events.length>0&&(r+=10*(i.events.length-1)),E=Math.max(E,r)+0}o.Rm.debug("maxSectionHeight before draw",f),o.Rm.debug("maxTaskHeight before draw",g);const S=Math.max(g,E)+30;w?p.forEach(t=>{const e=u.filter(e=>e.section===t),r={number:T,descr:t,section:T,width:C,padding:5,maxHeight:f};o.Rm.debug("sectionNode",r);const n=h.append("g"),i=X.drawNode(n,r,T,l);o.Rm.debug("sectionNode output",i);const a=k-b;n.attr("transform",`translate(${a}, ${y})`);const s=y+i.height+20;e.length>0&&nt(h,e,T,k,s,g,l,S,!1);const c=e.length,d=i.height+20+S*Math.max(c,1)-(c>0?60:0);y+=d,T++}):nt(h,u,T,k,y,g,l,S,!0);let _=h.node()?.getBBox();if(!_)throw new Error("bbox not found");if(o.Rm.debug("bounds",_),d){if(h.append("text").text(d).attr("x",_.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),_=h.node()?.getBBox(),!_)throw new Error("bbox not found");o.Rm.debug("bounds after title",_)}const[A]=(0,i.I5)(l.fontSize),R=2*(A??16),L=.5*(A??16)+20,I=h.append("g").attr("class","lineWrapper");I.append("line").attr("x1",k).attr("y1",v-R).attr("x2",k).attr("y2",_.y+_.height+L).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),I.lower(),(0,a.ot)(void 0,h,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)},"draw"),nt=(0,o.K2)(function(t,e,r,n,i,a,s,l,c){for(const h of e){const e={descr:h.task,section:r,number:r,width:et,padding:5,maxHeight:a};o.Rm.debug("taskNode",e);const u=t.append("g").attr("class","taskWrapper"),d=X.drawNode(u,e,r,s),p=d.height;o.Rm.debug("taskHeight after draw",p);const f=n-20-d.width;if(u.attr("transform",`translate(${f}, ${i})`),a=Math.max(a,p),h.events&&h.events.length>0){const e=i,a=n+50;it(t,h.events,r,n,a,e,s)}i+=l,c&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),it=(0,o.K2)(function(t,e,r,n,i,a,s){let l=a;for(const c of e){const e={descr:c,section:r,number:r,width:300,padding:5,maxHeight:0};o.Rm.debug("eventNode",e);const a=t.append("g").attr("class","eventWrapper"),h=X.drawNode(a,e,r,s).height;a.attr("transform",`translate(${i}, ${l})`);const u=l+h/2;t.append("g").attr("class","lineWrapper").append("line").attr("x1",n).attr("y1",u).attr("x2",i).attr("y2",u).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),l=l+h+10}return l-a},"drawEvents"),at={setConf:(0,o.K2)(()=>{},"setConf"),draw:rt},ot=(0,o.K2)(t=>{const{theme:e}=(0,a.zj)(),r=e?.includes("dark"),n=e?.includes("color"),i=t.svgId?.replace(/^#/,"")??"",o=i?`url(#${i}-drop-shadow)`:t.dropShadow??"none";let s="";for(let a=0;a<t.THEME_COLOR_LIMIT;a++){const e=""+(17-3*a),i=n?t.borderColorArray[a]:t.mainBkg,l=n?t.borderColorArray[a]:t.nodeBorder;s+=`\n .section-${a-1} rect,\n .section-${a-1} path,\n .section-${a-1} circle {\n fill: ${r&&n?t.mainBkg:i};\n stroke: ${l};\n stroke-width: ${t.strokeWidth};\n filter: ${o};\n }\n\n .section-${a-1} text {\n fill: ${t.nodeBorder};\n font-weight: ${t.fontWeight}\n }\n\n .node-icon-${a-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+a]};\n }\n\n .section-edge-${a-1} {\n stroke: ${t["cScale"+a]};\n }\n\n .edge-depth-${a-1} {\n stroke-width: ${e};\n }\n\n .section-${a-1} line {\n stroke: ${t["cScaleInv"+a]};\n stroke-width: 3;\n }\n\n .lineWrapper line {\n stroke: ${t.nodeBorder};\n stroke-width:${t.strokeWidth}\n }\n\n .disabled,\n .disabled circle,\n .disabled text {\n fill: ${t.tertiaryColor??"lightgray"};\n }\n\n .disabled text {\n fill: ${t.clusterBorder??"#efefef"};\n }\n `}return s},"genReduxSections"),st=(0,o.K2)(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],(0,l.A)(t["lineColor"+r])?t["lineColor"+r]=(0,c.A)(t["lineColor"+r],20):t["lineColor"+r]=(0,h.A)(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){const n=""+(17-3*r);e+=`\n .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} path {\n fill: ${t["cScale"+r]};\n }\n .section-${r-1} text {\n fill: ${t["cScaleLabel"+r]};\n }\n .node-icon-${r-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+r]};\n }\n .section-edge-${r-1}{\n stroke: ${t["cScale"+r]};\n }\n .edge-depth-${r-1}{\n stroke-width: ${n};\n }\n .section-${r-1} line {\n stroke: ${t["cScaleInv"+r]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+r]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: ${t.tertiaryColor??"lightgray"};\n }\n .disabled text {\n fill: ${t.clusterBorder??"#efefef"};\n }\n `}return e},"genSections"),lt=(0,o.K2)(t=>{const{theme:e}=(0,a.zj)(),r=e?.includes("redux"),n="neutral"===e,i=t.svgId?.replace(/^#/,"")??"";let o="";if(t.useGradient&&i&&t.THEME_COLOR_LIMIT&&!n)for(let a=0;a<t.THEME_COLOR_LIMIT;a++)o+=`\n .section-${a-1}[data-look="neo"] rect,\n .section-${a-1}[data-look="neo"] path,\n .section-${a-1}[data-look="neo"] circle {\n fill: ${t.mainBkg};\n stroke: url(#${i}-gradient);\n stroke-width: 2;\n }\n .section-${a-1}[data-look="neo"] line {\n stroke: url(#${i}-gradient);\n stroke-width: 2;\n }`;return`\n .edge {\n stroke-width: 3;\n }\n ${r?ot(t):st(t)}\n ${o}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`},"getStyles"),ct={db:p,renderer:{setConf:(0,o.K2)(()=>{},"setConf"),draw:(0,o.K2)((t,e,r,n)=>"TD"===(n?.db?.getDirection?.()??"LR")?at.draw(t,e,r,n):tt.draw(t,e,r,n),"draw")},parser:d,styles:lt}},8105(t,e,r){"use strict";r.d(e,{diagram:()=>St});var n=r(594),i=r(8221),a=r(1123),o=r(797),s=r(1444),l=r(5097),c=r(5635);const h=(t,e)=>(0,c.A)(t,"a",-e);var u=r(8041),d=r(5263);const p=1e-10;function f(t,e){const r=function(t){const e=[];for(let r=0;r<t.length;++r)for(let n=r+1;n<t.length;++n){const i=v(t[r],t[n]);for(const t of i)t.parentIndex=[r,n],e.push(t)}return e}(t),n=r.filter(e=>function(t,e){return e.every(e=>m(t,e)<e.radius+p)}(e,t));let i=0,a=0;const o=[];if(n.length>1){const e=b(n);for(let t=0;t<n.length;++t){const r=n[t];r.angle=Math.atan2(r.x-e.x,r.y-e.y)}n.sort((t,e)=>e.angle-t.angle);let r=n[n.length-1];for(let s=0;s<n.length;++s){const e=n[s];a+=(r.x+e.x)*(e.y-r.y);const l={x:(e.x+r.x)/2,y:(e.y+r.y)/2};let c=null;for(let n=0;n<e.parentIndex.length;++n)if(r.parentIndex.includes(e.parentIndex[n])){const i=t[e.parentIndex[n]],a=Math.atan2(e.x-i.x,e.y-i.y),o=Math.atan2(r.x-i.x,r.y-i.y);let s=o-a;s<0&&(s+=2*Math.PI);const h=o-s/2;let u=m(l,{x:i.x+i.radius*Math.sin(h),y:i.y+i.radius*Math.cos(h)});u>2*i.radius&&(u=2*i.radius),(null==c||c.width>u)&&(c={circle:i,width:u,p1:e,p2:r,large:u>i.radius,sweep:!0})}null!=c&&(o.push(c),i+=g(c.circle.radius,c.width),r=e)}}else{let e=t[0];for(let n=1;n<t.length;++n)t[n].radius<e.radius&&(e=t[n]);let r=!1;for(let n=0;n<t.length;++n)if(m(t[n],e)>Math.abs(e.radius-t[n].radius)){r=!0;break}r?i=a=0:(i=e.radius*e.radius*Math.PI,o.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-p,y:e.y+e.radius},width:2*e.radius,large:!0,sweep:!0}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=o,e.innerPoints=n,e.intersectionPoints=r),i+a}function g(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function m(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function y(t,e,r){if(r>=t+e)return 0;if(r<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const n=e-(r*r-t*t+e*e)/(2*r);return g(t,t-(r*r-e*e+t*t)/(2*r))+g(e,n)}function v(t,e){const r=m(t,e),n=t.radius,i=e.radius;if(r>=n+i||r<=Math.abs(n-i))return[];const a=(n*n-i*i+r*r)/(2*r),o=Math.sqrt(n*n-a*a),s=t.x+a*(e.x-t.x)/r,l=t.y+a*(e.y-t.y)/r,c=-(e.y-t.y)*(o/r),h=-(e.x-t.x)*(o/r);return[{x:s+c,y:l-h},{x:s-c,y:l+h}]}function b(t){const e={x:0,y:0};for(const r of t)e.x+=r.x,e.y+=r.y;return e.x/=t.length,e.y/=t.length,e}function x(t){const e=new Array(t);for(let r=0;r<t;++r)e[r]=0;return e}function T(t,e){return x(t).map(()=>x(e))}function w(t,e){let r=0;for(let n=0;n<t.length;++n)r+=t[n]*e[n];return r}function k(t){return Math.sqrt(w(t,t))}function C(t,e,r){for(let n=0;n<e.length;++n)t[n]=e[n]*r}function E(t,e,r,n,i){for(let a=0;a<t.length;++a)t[a]=e*r[a]+n*i[a]}function S(t,e,r){const n=(r=r||{}).maxIterations||200*e.length,i=r.nonZeroDelta||1.05,a=r.zeroDelta||.001,o=r.minErrorDelta||1e-6,s=r.minErrorDelta||1e-5,l=void 0!==r.rho?r.rho:1,c=void 0!==r.chi?r.chi:2,h=void 0!==r.psi?r.psi:-.5,u=void 0!==r.sigma?r.sigma:.5;let d;const p=e.length,f=new Array(p+1);f[0]=e,f[0].fx=t(e),f[0].id=0;for(let T=0;T<p;++T){const r=e.slice();r[T]=r[T]?r[T]*i:a,f[T+1]=r,f[T+1].fx=t(r),f[T+1].id=T+1}function g(t){for(let e=0;e<t.length;e++)f[p][e]=t[e];f[p].fx=t.fx}const m=(t,e)=>t.fx-e.fx,y=e.slice(),v=e.slice(),b=e.slice(),x=e.slice();for(let T=0;T<n;++T){if(f.sort(m),r.history){const t=f.map(t=>{const e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),r.history.push({x:f[0].slice(),fx:f[0].fx,simplex:t})}d=0;for(let t=0;t<p;++t)d=Math.max(d,Math.abs(f[0][t]-f[1][t]));if(Math.abs(f[0].fx-f[p].fx)<o&&d<s)break;for(let t=0;t<p;++t){y[t]=0;for(let e=0;e<p;++e)y[t]+=f[e][t];y[t]/=p}const e=f[p];if(E(v,1+l,y,-l,e),v.fx=t(v),v.fx<f[0].fx)E(x,1+c,y,-c,e),x.fx=t(x),x.fx<v.fx?g(x):g(v);else if(v.fx>=f[p-1].fx){let r=!1;if(v.fx>e.fx?(E(b,1+h,y,-h,e),b.fx=t(b),b.fx<e.fx?g(b):r=!0):(E(b,1-h*l,y,h*l,e),b.fx=t(b),b.fx<v.fx?g(b):r=!0),r){if(u>=1)break;for(let e=1;e<f.length;++e)E(f[e],1-u,f[0],u,f[e]),f[e].fx=t(f[e])}}else g(v)}return f.sort(m),{fx:f[0].fx,x:f[0]}}function _(t,e,r,n,i,a,o){const s=r.fx,l=w(r.fxprime,e);let c=s,h=s,u=l,d=0;function p(h,d,p){for(let f=0;f<16;++f)if(i=(h+d)/2,E(n.x,1,r.x,i,e),c=n.fx=t(n.x,n.fxprime),u=w(n.fxprime,e),c>s+a*i*l||c>=p)d=i;else{if(Math.abs(u)<=-o*l)return i;u*(d-h)>=0&&(d=h),h=i,p=c}return 0}i=i||1,a=a||1e-6,o=o||.1;for(let f=0;f<10;++f){if(E(n.x,1,r.x,i,e),c=n.fx=t(n.x,n.fxprime),u=w(n.fxprime,e),c>s+a*i*l||f&&c>=h)return p(d,i,h);if(Math.abs(u)<=-o*l)return i;if(u>=0)return p(i,d,c);h=c,d=i,i*=2}return i}function A(t,e,r){let n={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const a=e.slice();let o,s,l,c=1;l=(r=r||{}).maxIterations||20*e.length,n.fx=t(n.x,n.fxprime),o=n.fxprime.slice(),C(o,n.fxprime,-1);for(let h=0;h<l;++h){if(c=_(t,o,n,i,c),r.history&&r.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:c}),c){E(a,1,i.fxprime,-1,n.fxprime);const t=w(n.fxprime,n.fxprime);E(o,Math.max(0,w(a,i.fxprime)/t),o,-1,i.fxprime),s=n,n=i,i=s}else C(o,n.fxprime,-1);if(k(n.fxprime)<=1e-5)break}return r.history&&r.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:c}),n}function R(t,e={}){e.maxIterations=e.maxIterations||500;const r=e.initialLayout||D,n=e.lossFunction||N,i=function(t,e={}){const r=e.distinct,n=t.map(t=>Object.assign({},t));function i(t){return t.join(";")}if(r){const t=new Map;for(const e of n)for(let r=0;r<e.sets.length;r++){const n=String(e.sets[r]);t.set(n,e.size+(t.get(n)||0));for(let i=r+1;i<e.sets.length;i++){const r=String(e.sets[i]),a=`${n};${r}`,o=`${r};${n}`;t.set(a,e.size+(t.get(a)||0)),t.set(o,e.size+(t.get(o)||0))}}for(const e of n)e.sets.length<3&&(e.size=t.get(i(e.sets)))}const a=[],o=new Set;for(const s of n)if(1===s.sets.length)a.push(s.sets[0]);else if(2===s.sets.length){const t=s.sets[0],e=s.sets[1];o.add(i(s.sets)),o.add(i([e,t]))}a.sort((t,e)=>t===e?0:t<e?-1:1);for(let s=0;s<a.length;++s){const t=a[s];for(let e=s+1;e<a.length;++e){const r=a[e];o.has(i([t,r]))||n.push({sets:[t,r],size:0})}}return n}(t,e),a=r(i,e),o=Object.keys(a),s=[];for(const c of o)s.push(a[c].x),s.push(a[c].y);const l=S(t=>{const e={};for(let r=0;r<o.length;++r){const n=o[r];e[n]={x:t[2*r],y:t[2*r+1],radius:a[n].radius}}return n(e,i)},s,e).x;for(let c=0;c<o.length;++c){const t=o[c];a[t].x=l[2*c],a[t].y=l[2*c+1]}return a}const L=1e-10;function I(t,e,r){return Math.min(t,e)*Math.min(t,e)*Math.PI<=r+1e-10?Math.abs(t-e):function(t,e,r,n){const i=(n=n||{}).maxIterations||100,a=n.tolerance||1e-10,o=t(e),s=t(r);let l=r-e;if(o*s>0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===s)return r;for(let c=0;c<i;++c){l/=2;const r=e+l,n=t(r);if(n*o>=0&&(e=r),Math.abs(l)<a||0===n)return r}return e+l}(n=>y(t,e,n)-r,0,t+e)}function D(t,e={}){let r=function(t,e){const r=e&&e.lossFunction?e.lossFunction:N,n={},i={};for(const u of t)if(1===u.sets.length){const t=u.sets[0];n[t]={x:1e10,y:1e10,rowid:n.length,size:u.size,radius:Math.sqrt(u.size/Math.PI)},i[t]=[]}t=t.filter(t=>2===t.sets.length);for(const u of t){let t=null!=u.weight?u.weight:1;const e=u.sets[0],r=u.sets[1];u.size+L>=Math.min(n[e].size,n[r].size)&&(t=0),i[e].push({set:r,size:u.size,weight:t}),i[r].push({set:e,size:u.size,weight:t})}const a=[];function o(t,e){return e.size-t.size}Object.keys(i).forEach(t=>{let e=0;for(let r=0;r<i[t].length;++r)e+=i[t][r].size*i[t][r].weight;a.push({set:t,size:e})}),a.sort(o);const s={};function l(t){return t.set in s}function c(t,e){n[e].x=t.x,n[e].y=t.y,s[e]=!0}c({x:0,y:0},a[0].set);for(let u=1;u<a.length;++u){const e=a[u].set,s=i[e].filter(l),d=n[e];if(s.sort(o),0===s.length)throw"ERROR: missing pairwise overlap information";const p=[];for(var h=0;h<s.length;++h){const t=n[s[h].set],e=I(d.radius,t.radius,s[h].size);p.push({x:t.x+e,y:t.y}),p.push({x:t.x-e,y:t.y}),p.push({y:t.y+e,x:t.x}),p.push({y:t.y-e,x:t.x});for(let r=h+1;r<s.length;++r){const i=n[s[r].set],a=I(d.radius,i.radius,s[r].size),o=v({x:t.x,y:t.y,radius:e},{x:i.x,y:i.y,radius:a});p.push(...o)}}let f=1e50,g=p[0];for(const i of p){n[e].x=i.x,n[e].y=i.y;const a=r(n,t);a<f&&(f=a,g=i)}c(g,e)}return n}(t,e);const n=e.lossFunction||N;if(t.length>=8){const i=function(t,e={}){const r=e.restarts||10,n=[],i={};for(const d of t)1===d.sets.length&&(i[d.sets[0]]=n.length,n.push(d));let{distances:a,constraints:o}=function(t,e,r){const n=T(e.length,e.length),i=T(e.length,e.length);return t.filter(t=>2===t.sets.length).forEach(t=>{const a=r[t.sets[0]],o=r[t.sets[1]],s=I(Math.sqrt(e[a].size/Math.PI),Math.sqrt(e[o].size/Math.PI),t.size);n[a][o]=n[o][a]=s;let l=0;t.size+1e-10>=Math.min(e[a].size,e[o].size)?l=1:t.size<=1e-10&&(l=-1),i[a][o]=i[o][a]=l}),{distances:n,constraints:i}}(t,n,i);const s=k(a.map(k))/a.length;a=a.map(t=>t.map(t=>t/s));const l=(t,e)=>function(t,e,r,n){for(let a=0;a<e.length;++a)e[a]=0;let i=0;for(let a=0;a<r.length;++a){const o=t[2*a],s=t[2*a+1];for(let l=a+1;l<r.length;++l){const c=t[2*l],h=t[2*l+1],u=r[a][l],d=n[a][l],p=(c-o)*(c-o)+(h-s)*(h-s),f=Math.sqrt(p),g=p-u*u;d>0&&f<=u||d<0&&f>=u||(i+=2*g*g,e[2*a]+=4*g*(o-c),e[2*a+1]+=4*g*(s-h),e[2*l]+=4*g*(c-o),e[2*l+1]+=4*g*(h-s))}}return i}(t,e,a,o);let c=null;for(let d=0;d<r;++d){const t=A(l,x(2*a.length).map(Math.random),e);(!c||t.fx<c.fx)&&(c=t)}const h=c.x,u={};for(let d=0;d<n.length;++d){const t=n[d];u[t.sets[0]]={x:h[2*d]*s,y:h[2*d+1]*s,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(const d of e.history)C(d.x,s);return u}(t,e);n(i,t)+1e-8<n(r,t)&&(r=i)}return r}function N(t,e){let r=0;for(const n of e){if(1===n.sets.length)continue;let e;if(2===n.sets.length){const r=t[n.sets[0]],i=t[n.sets[1]];e=y(r.radius,i.radius,m(r,i))}else e=f(n.sets.map(e=>t[e]));r+=(null!=n.weight?n.weight:1)*(e-n.size)*(e-n.size)}return r}function M(t,e){let r=0;for(const n of e){if(1===n.sets.length)continue;let e;if(2===n.sets.length){const r=t[n.sets[0]],i=t[n.sets[1]];e=y(r.radius,i.radius,m(r,i))}else e=f(n.sets.map(e=>t[e]));const i=null!=n.weight?n.weight:1,a=Math.log((e+1)/(n.size+1));r+=i*a*a}return r}function O(t,e,r){if(null==r?t.sort((t,e)=>e.radius-t.radius):t.sort(r),t.length>0){const e=t[0].x,r=t[0].y;for(const n of t)n.x-=e,n.y-=r}if(2===t.length){m(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y)}if(t.length>1){const r=Math.atan2(t[1].x,t[1].y)-e,n=Math.cos(r),i=Math.sin(r);for(const e of t){const t=e.x,r=e.y;e.x=n*t-i*r,e.y=i*t+n*r}}if(t.length>2){let r=Math.atan2(t[2].x,t[2].y)-e;for(;r<0;)r+=2*Math.PI;for(;r>2*Math.PI;)r-=2*Math.PI;if(r>Math.PI){const e=t[1].y/(1e-10+t[1].x);for(const r of t){var n=(r.x+e*r.y)/(1+e*e);r.x=2*n-r.x,r.y=2*n*e-r.y}}}}function $(t){const e=e=>({max:t.reduce((t,r)=>Math.max(t,r[e]+r.radius),Number.NEGATIVE_INFINITY),min:t.reduce((t,r)=>Math.min(t,r[e]-r.radius),Number.POSITIVE_INFINITY)});return{xRange:e("x"),yRange:e("y")}}function P(t,e,r){null==e&&(e=Math.PI/2);let n=z(t).map(t=>Object.assign({},t));const i=function(t){function e(t){return t.parent!==t&&(t.parent=e(t.parent)),t.parent}function r(t,r){const n=e(t),i=e(r);n.parent=i}t.forEach(t=>{t.parent=t});for(let i=0;i<t.length;++i)for(let e=i+1;e<t.length;++e){const n=t[i].radius+t[e].radius;m(t[i],t[e])+1e-10<n&&r(t[e],t[i])}const n=new Map;for(let i=0;i<t.length;++i){const r=e(t[i]).parent.setid;n.has(r)||n.set(r,[]),n.get(r).push(t[i])}return t.forEach(t=>{delete t.parent}),Array.from(n.values())}(n);for(const c of i){O(c,e,r);const t=$(c);c.size=(t.xRange.max-t.xRange.min)*(t.yRange.max-t.yRange.min),c.bounds=t}i.sort((t,e)=>e.size-t.size),n=i[0];let a=n.bounds;const o=(a.xRange.max-a.xRange.min)/50;function s(t,e,r){if(!t)return;const i=t.bounds;let s,l;if(e)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;const t=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;t<0&&(s+=t)}if(r)l=a.yRange.max-i.yRange.min+o;else{l=a.yRange.max-i.yRange.max;const t=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;t<0&&(l+=t)}for(const a of t)a.x+=s,a.y+=l,n.push(a)}let l=1;for(;l<i.length;)s(i[l],!0,!1),s(i[l+1],!1,!0),s(i[l+2],!0,!0),l+=3,a=$(n);return F(n)}function B(t,e,r,n,i){const a=z(t);e-=2*n,r-=2*n;const{xRange:o,yRange:s}=$(a);if(o.max===o.min||s.max===s.min)return console.log("not scaling solution: zero size detected"),t;let l,c;if(i){const t=2*Math.sqrt(i/Math.PI);l=e/t,c=r/t}else l=e/(o.max-o.min),c=r/(s.max-s.min);const h=Math.min(c,l),u=(e-(o.max-o.min)*h)/2,d=(r-(s.max-s.min)*h)/2;return F(a.map(t=>({radius:h*t.radius,x:n+u+(t.x-o.min)*h,y:n+d+(t.y-s.min)*h,setid:t.setid})))}function F(t){const e={};for(const r of t)e[r.setid]=r;return e}function z(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function K(t={}){let e=!1,r=600,n=350,i=15,a=1e3,o=Math.PI/2,s=!0,l=null,c=!0,h=!0,u=null,d=null,p=!1,f=null,g=!(!t||!t.symmetricalTextCentre)&&t.symmetricalTextCentre,m={},y=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],v=0,b=function(t){if(t in m)return m[t];var e=m[t]=y[v];return v+=1,v>=y.length&&(v=0),e},x=R,T=N;function w(m){let y=m.datum();const v=new Set;y.forEach(t=>{0==t.size&&1==t.sets.length&&v.add(t.sets[0])}),y=y.filter(t=>!t.sets.some(t=>v.has(t)));let w={},k={};if(y.length>0){let t=x(y,{lossFunction:T,distinct:p});s&&(t=P(t,o,d)),w=B(t,r,n,i,l),k=G(w,y,g)}const C={};function E(t){return t.sets in C?C[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}y.forEach(t=>{t.label&&(C[t.sets]=t.label)}),m.selectAll("svg").data([w]).enter().append("svg");const S=m.select("svg");e?S.attr("viewBox",`0 0 ${r} ${n}`):S.attr("width",r).attr("height",n);const _={};let A=!1;function R(t){return e=>H(t.sets.map(t=>{let i=_[t],a=w[t];return i||(i={x:r/2,y:n/2,radius:1}),a||(a={x:r/2,y:n/2,radius:1}),{x:i.x*(1-e)+a.x*e,y:i.y*(1-e)+a.y*e,radius:i.radius*(1-e)+a.radius*e}}),f)}S.selectAll(".venn-area path").each(function(t){const e=this.getAttribute("d");1==t.sets.length&&e&&!p&&(A=!0,_[t.sets[0]]=function(t){const e=t.split(" ");return{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}(e))});const L=S.selectAll(".venn-area").data(y,t=>t.sets),I=L.enter().append("g").attr("class",t=>`venn-area venn-${1==t.sets.length?"circle":"intersection"}${t.colour||t.color?" venn-coloured":""}`).attr("data-venn-sets",t=>t.sets.join("_")),D=I.append("path"),N=I.append("text").attr("class","label").text(t=>E(t)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",n/2);function M(t){return"function"==typeof t.transition?t.transition("venn").duration(a):t}h&&(D.style("fill-opacity","0").filter(t=>1==t.sets.length).style("fill",t=>t.colour?t.colour:t.color?t.color:b(t.sets)).style("fill-opacity",".25"),N.style("fill",e=>e.colour||e.color?"#FFF":t.textFill?t.textFill:1==e.sets.length?b(e.sets):"#444"));let O=m;A&&"function"==typeof O.transition?(O=M(m),O.selectAll("path").attrTween("d",R)):O.selectAll("path").attr("d",t=>H(t.sets.map(t=>w[t])),f);const $=O.selectAll("text").filter(t=>t.sets in k).text(t=>E(t)).attr("x",t=>Math.floor(k[t.sets].x)).attr("y",t=>Math.floor(k[t.sets].y));c&&(A?"on"in $?$.on("end",j(w,E)):$.each("end",j(w,E)):$.each(j(w,E)));const F=M(L.exit()).remove();"function"==typeof L.transition&&F.selectAll("path").attrTween("d",R);const z=F.selectAll("text").attr("x",r/2).attr("y",n/2);return null!==u&&(N.style("font-size","0px"),$.style("font-size",u),z.style("font-size","0px")),{circles:w,textCentres:k,nodes:L,enter:I,update:O,exit:F}}return w.wrap=function(t){return arguments.length?(c=t,w):c},w.useViewBox=function(){return e=!0,w},w.width=function(t){return arguments.length?(r=t,w):r},w.height=function(t){return arguments.length?(n=t,w):n},w.padding=function(t){return arguments.length?(i=t,w):i},w.distinct=function(t){return arguments.length?(p=t,w):p},w.colours=function(t){return arguments.length?(b=t,w):b},w.colors=function(t){return arguments.length?(b=t,w):b},w.fontSize=function(t){return arguments.length?(u=t,w):u},w.round=function(t){return arguments.length?(f=t,w):f},w.duration=function(t){return arguments.length?(a=t,w):a},w.layoutFunction=function(t){return arguments.length?(x=t,w):x},w.normalize=function(t){return arguments.length?(s=t,w):s},w.scaleToFit=function(t){return arguments.length?(l=t,w):l},w.styled=function(t){return arguments.length?(h=t,w):h},w.orientation=function(t){return arguments.length?(o=t,w):o},w.orientationOrder=function(t){return arguments.length?(d=t,w):d},w.lossFunction=function(t){return arguments.length?(T="default"===t?N:"logRatio"===t?M:t,w):T},w}function j(t,e){return function(r){const n=this,i=t[r.sets[0]].radius||50,a=e(r)||"",o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3;let l=o.pop(),c=[l],h=0;n.textContent=null;const u=[];function d(t){const e=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return e.textContent=t,u.push(e),n.append(e),e}let p=d(l);for(;l=o.pop(),l;){c.push(l);const t=c.join(" ");p.textContent=t,t.length>s&&p.getComputedTextLength()>i&&(c.pop(),p.textContent=c.join(" "),c=[l],p=d(l),h++)}const f=.35-1.1*h/2,g=n.getAttribute("x"),m=n.getAttribute("y");u.forEach((t,e)=>{t.setAttribute("x",g),t.setAttribute("y",m),t.setAttribute("dy",`${f+1.1*e}em`)})}}function q(t,e,r){let n=e[0].radius-m(e[0],t);for(let i=1;i<e.length;++i){const r=e[i].radius-m(e[i],t);r<=n&&(n=r)}for(let i=0;i<r.length;++i){const e=m(r[i],t)-r[i].radius;e<=n&&(n=e)}return n}function W(t,e,r){const n=[];for(const h of t)n.push({x:h.x,y:h.y}),n.push({x:h.x+h.radius/2,y:h.y}),n.push({x:h.x-h.radius/2,y:h.y}),n.push({x:h.x,y:h.y+h.radius/2}),n.push({x:h.x,y:h.y-h.radius/2});let i=n[0],a=q(n[0],t,e);for(let h=1;h<n.length;++h){const r=q(n[h],t,e);r>=a&&(i=n[h],a=r)}const o=S(r=>-1*q({x:r[0],y:r[1]},t,e),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:r?0:o[0],y:o[1]};let l=!0;for(const h of t)if(m(s,h)>h.radius){l=!1;break}for(const h of e)if(m(s,h)<h.radius){l=!1;break}if(l)return s;if(1==t.length)return{x:t[0].x,y:t[0].y};const c={};return f(t,c),0===c.arcs.length?{x:0,y:-1e3,disjoint:!0}:1==c.arcs.length?{x:c.arcs[0].circle.x,y:c.arcs[0].circle.y}:e.length?W(t,[]):b(c.arcs.map(t=>t.p1))}function U(t){const e={},r=Object.keys(t);for(const n of r)e[n]=[];for(let n=0;n<r.length;n++){const i=r[n],a=t[i];for(let o=n+1;o<r.length;++o){const n=r[o],s=t[n],l=m(a,s);l+s.radius<=a.radius+1e-10?e[n].push(i):l+a.radius<=s.radius+1e-10&&e[i].push(n)}}return e}function G(t,e,r){const n={},i=U(t);for(let a=0;a<e.length;++a){const o=e[a].sets,s={},l={};for(let t=0;t<o.length;++t){s[o[t]]=!0;const e=i[o[t]];for(let t=0;t<e.length;++t)l[e[t]]=!0}const c=[],h=[];for(let e in t)e in s?c.push(t[e]):e in l||h.push(t[e]);const u=W(c,h,r);n[o]=u,u.disjoint&&e[a].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return n}function Y(t){if(0===t.length)return[];const e={};return f(t,e),e.arcs}function V(t,e){if(0===t.length)return"M 0 0";const r=Math.pow(10,e||0),n=null!=e?t=>Math.round(t*r)/r:t=>t;if(1==t.length){const e=t[0].circle;return function(t,e,r){const n=[];return n.push("\nM",t,e),n.push("\nm",-r,0),n.push("\na",r,r,0,1,0,2*r,0),n.push("\na",r,r,0,1,0,2*-r,0),n.join(" ")}(n(e.x),n(e.y),n(e.radius))}const i=["\nM",n(t[0].p2.x),n(t[0].p2.y)];for(const a of t){const t=n(a.circle.radius);i.push("\nA",t,t,0,a.large?1:0,a.sweep?1:0,n(a.p1.x),n(a.p1.y))}return i.join(" ")}function H(t,e){return V(Y(t),e)}var X=r(2274),Z=function(){var t=(0,o.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[5,8],r=[7,8,11,12,17,19,22,24],n=[1,17],i=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],l=[1,39],c=[7,8,11,12,17,19,22,24,27],h=[1,57],u=[1,56],d=[1,58],p=[1,59],f=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],m={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,o.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=a[s];break;case 8:n.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:n.addSubsetData([a[s]],void 0,void 0),n.setIndentMode&&n.setIndentMode(!0);break;case 10:n.addSubsetData([a[s-1]],a[s],void 0),n.setIndentMode&&n.setIndentMode(!0);break;case 11:n.addSubsetData([a[s-2]],void 0,parseFloat(a[s])),n.setIndentMode&&n.setIndentMode(!0);break;case 12:n.addSubsetData([a[s-3]],a[s-2],parseFloat(a[s])),n.setIndentMode&&n.setIndentMode(!0);break;case 13:if(a[s].length<2)throw new Error("union requires multiple identifiers");n.validateUnionIdentifiers&&n.validateUnionIdentifiers(a[s]),n.addSubsetData(a[s],void 0,void 0),n.setIndentMode&&n.setIndentMode(!0);break;case 14:if(a[s-1].length<2)throw new Error("union requires multiple identifiers");n.validateUnionIdentifiers&&n.validateUnionIdentifiers(a[s-1]),n.addSubsetData(a[s-1],a[s],void 0),n.setIndentMode&&n.setIndentMode(!0);break;case 15:if(a[s-2].length<2)throw new Error("union requires multiple identifiers");n.validateUnionIdentifiers&&n.validateUnionIdentifiers(a[s-2]),n.addSubsetData(a[s-2],void 0,parseFloat(a[s])),n.setIndentMode&&n.setIndentMode(!0);break;case 16:if(a[s-3].length<2)throw new Error("union requires multiple identifiers");n.validateUnionIdentifiers&&n.validateUnionIdentifiers(a[s-3]),n.addSubsetData(a[s-3],a[s-2],parseFloat(a[s])),n.setIndentMode&&n.setIndentMode(!0);break;case 17:case 18:case 19:n.addTextData(a[s-1],a[s],void 0);break;case 20:case 21:n.addTextData(a[s-2],a[s-1],a[s]);break;case 23:n.addStyleData(a[s-1],a[s]);break;case 24:case 25:case 26:if(!(l=n.getCurrentSets()))throw new Error("text requires set");n.addTextData(l,a[s],void 0);break;case 27:case 28:var l;if(!(l=n.getCurrentSets()))throw new Error("text requires set");n.addTextData(l,a[s-1],a[s]);break;case 29:case 41:case 34:this.$=[a[s]];break;case 30:case 42:this.$=[...a[s-2],a[s]];break;case 31:this.$=[a[s-2],a[s]];break;case 33:this.$=a[s].join(" ")}},"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(r,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(r,[2,5]),t(r,[2,6]),t(r,[2,7]),t(r,[2,8]),{13:16,20:n,21:i},{13:20,18:19,20:n,21:i},{13:20,18:21,20:n,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:i},t(r,[2,9],{14:[1,27],15:[1,28]}),t(a,[2,43]),t(a,[2,44]),t(r,[2,13],{14:[1,29],15:[1,30],27:s}),t(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},t(r,[2,22]),t(r,[2,24],{14:[1,35]}),t(r,[2,25],{14:[1,36]}),t(r,[2,26]),{20:l,25:37,26:38,27:s},t(r,[2,10],{15:[1,40]}),{16:[1,41]},t(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:i},t(r,[2,17],{14:[1,45]}),t(r,[2,18],{14:[1,46]}),t(r,[2,19]),t(r,[2,27]),t(r,[2,28]),t(r,[2,23],{27:[1,47]}),t(c,[2,29]),{15:[1,48]},{16:[1,49]},t(r,[2,11]),{16:[1,50]},t(r,[2,15]),t(a,[2,42]),t(r,[2,20]),t(r,[2,21]),{20:l,26:51},{16:h,20:u,21:[1,53],28:52,29:54,30:55,31:d,32:p,33:f},t(r,[2,12]),t(r,[2,16]),t(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,20:u,31:d,32:p,33:f}),t(g,[2,34]),t(g,[2,36]),t(g,[2,37]),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,35])],defaultActions:{6:[2,1]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],s=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=s[T]&&s[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],s[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},y=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(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,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(t.getIndentMode&&t.getIndentMode())return t.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:t.setIndentMode&&t.setIndentMode(!1),this.begin("INITIAL"),this.unput(e.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!t.consumeIndentText)return 19;t.consumeIndentText=!1;break;case 15:return 24;case 16:return e.yytext=e.yytext.slice(2,-2),14;case 17:return e.yytext=e.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}}();function v(){this.yy={}}return m.lexer=y,(0,o.K2)(v,"Parser"),v.prototype=m,m.Parser=v,new v}();Z.parser=Z;var Q,J=Z,tt=[],et=[],rt=[],nt=new Set,it=!1,at=(0,o.K2)((t,e,r)=>{const n=dt(t).sort(),i=r??10/Math.pow(t.length,2);Q=n,1===n.length&&nt.add(n[0]),tt.push({sets:n,size:i,label:e?st(e):void 0})},"addSubsetData"),ot=(0,o.K2)(()=>tt,"getSubsetData"),st=(0,o.K2)(t=>{const e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),lt=(0,o.K2)(t=>t?st(t):t,"normalizeStyleValue"),ct=(0,o.K2)((t,e,r)=>{const n=st(e);et.push({sets:dt(t).sort(),id:n,label:r?st(r):void 0})},"addTextData"),ht=(0,o.K2)((t,e)=>{const r=dt(t).sort(),n={};for(const[i,a]of e)n[i]=lt(a)??a;rt.push({targets:r,styles:n})},"addStyleData"),ut=(0,o.K2)(()=>rt,"getStyleData"),dt=(0,o.K2)(t=>t.map(t=>st(t)),"normalizeIdentifierList"),pt=(0,o.K2)(t=>{const e=dt(t).filter(t=>!nt.has(t));if(e.length>0)throw new Error(`unknown set identifier: ${e.join(", ")}`)},"validateUnionIdentifiers"),ft=(0,o.K2)(()=>et,"getTextData"),gt=(0,o.K2)(()=>Q,"getCurrentSets"),mt=(0,o.K2)(()=>it,"getIndentMode"),yt=(0,o.K2)(t=>{it=t},"setIndentMode"),vt=a.UI.venn;function bt(){return(0,i.$t)(vt,(0,a.zj)().venn)}(0,o.K2)(bt,"getConfig");var xt={getConfig:bt,clear:(0,o.K2)(()=>{(0,a.IU)(),tt.length=0,et.length=0,rt.length=0,nt.clear(),Q=void 0,it=!1},"customClear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI,addSubsetData:at,getSubsetData:ot,addTextData:ct,addStyleData:ht,validateUnionIdentifiers:pt,getTextData:ft,getStyleData:ut,getCurrentSets:gt,getIndentMode:mt,setIndentMode:yt},Tt=(0,o.K2)(t=>`\n .venn-title {\n font-size: 32px;\n fill: ${t.vennTitleTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-circle text {\n font-size: 48px;\n font-family: ${t.fontFamily};\n }\n\n .venn-intersection text {\n font-size: 48px;\n fill: ${t.vennSetTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-text-node {\n font-family: ${t.fontFamily};\n color: ${t.vennSetTextColor};\n }\n`,"getStyles");function wt(t){const e=new Map;for(const r of t){const t=r.targets.join("|"),n=e.get(t);n?Object.assign(n,r.styles):e.set(t,{...r.styles})}return e}(0,o.K2)(wt,"buildStyleByKey");var kt=(0,o.K2)((t,e,r,i)=>{const o=i.db,c=o.getConfig?.(),{themeVariables:p,look:f,handDrawnSeed:g}=(0,a.zj)(),m="handDrawn"===f,y=[p.venn1,p.venn2,p.venn3,p.venn4,p.venn5,p.venn6,p.venn7,p.venn8].filter(Boolean),v=o.getDiagramTitle?.(),b=o.getSubsetData(),x=o.getTextData(),T=wt(o.getStyleData()),w=c?.width??800,k=c?.height??450,C=w/1600,E=v?48*C:0,S=p.primaryTextColor??p.textColor,_=(0,n.D)(e);_.attr("viewBox",`0 0 ${w} ${k}`),v&&_.append("text").text(v).attr("class","venn-title").attr("font-size",32*C+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*C).style("fill",p.vennTitleTextColor||p.titleColor);const A=(0,s.Ltv)(document.createElement("div")),L=K().width(w).height(k-E);A.datum(b).call(L);const I=m?X.A.svg(A.select("svg").node()):void 0,D=function(t,e={}){const{lossFunction:r,layoutFunction:n=R,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:o,width:s=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:d,round:p=2}=e;let f=n(t,{lossFunction:"default"!==r&&r?"logRatio"===r?M:r:N,distinct:d});i&&(f=P(f,a,o));const g=B(f,s,l,c,h),m=G(g,t,u),y=new Map(Object.keys(g).map(t=>[t,{set:t,x:g[t].x,y:g[t].y,radius:g[t].radius}])),v=t.map(t=>{const e=t.sets.map(t=>y.get(t)),r=Y(e);return{circles:e,arcs:r,path:V(r,p),area:t,has:new Set(t.sets)}});function b(t){let e="";for(const r of v)r.has.size>t.length&&t.every(t=>r.has.has(t))&&(e+=" "+r.path);return e}return v.map(({circles:t,arcs:e,path:r,area:n})=>({data:n,text:m[n.sets],circles:t,arcs:e,path:r,distinctPath:r+b(n.sets)}))}(b,{width:w,height:k-E,padding:c?.padding??15}),O=new Map;for(const n of D){const t=Ct([...n.data.sets].sort());O.set(t,n)}x.length>0&&Et(c,O,A,x,C,T);const $=(0,l.A)(p.background||"#f4f4f4");A.selectAll(".venn-circle").each(function(t,e){const r=(0,s.Ltv)(this),n=Ct([...t.sets].sort()),i=T.get(n),a=i?.fill||y[e%y.length]||p.primaryColor;r.classed("venn-set-"+e%8,!0);const o=i?.["fill-opacity"]??.1,l=i?.stroke||a,c=i?.["stroke-width"]||""+5*C;if(m&&I){const t=O.get(n);if(t&&t.circles.length>0){const n=t.circles[0],i=I.circle(n.x,n.y,2*n.radius,{roughness:.7,seed:g,fill:h(a,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:60*e-41,stroke:l,strokeWidth:parseFloat(String(c))});r.select("path").remove(),r.node()?.insertBefore(i,r.select("text").node())}}else r.select("path").style("fill",a).style("fill-opacity",o).style("stroke",l).style("stroke-width",c).style("stroke-opacity",.95);const f=i?.color||($?(0,u.A)(a,30):(0,d.A)(a,30));r.select("text").style("font-size",48*C+"px").style("fill",f)}),m&&I?A.selectAll(".venn-intersection").each(function(t){const e=(0,s.Ltv)(this),r=Ct([...t.sets].sort()),n=T.get(r),i=n?.fill;if(i){const t=e.select("path"),r=t.attr("d");if(r){const e=I.path(r,{roughness:.7,seed:g,fill:h(i,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),n=t.node();n?.parentNode?.insertBefore(e,n),t.remove()}}else e.select("path").style("fill-opacity",0);e.select("text").style("font-size",48*C+"px").style("fill",n?.color??p.vennSetTextColor??S)}):(A.selectAll(".venn-intersection text").style("font-size",48*C+"px").style("fill",t=>{const e=Ct([...t.sets].sort());return T.get(e)?.color??p.vennSetTextColor??S}),A.selectAll(".venn-intersection path").style("fill-opacity",t=>{const e=Ct([...t.sets].sort());return T.get(e)?.fill?1:0}).style("fill",t=>{const e=Ct([...t.sets].sort());return T.get(e)?.fill??"transparent"}));const F=_.append("g").attr("transform",`translate(0, ${E})`),z=A.select("svg").node();if(z&&"childNodes"in z)for(const n of[...z.childNodes])F.node()?.appendChild(n);(0,a.a$)(_,k,w,c?.useMaxWidth??!0)},"draw");function Ct(t){return t.join("|")}function Et(t,e,r,n,i,a){const o=t?.useDebugLayout??!1,s=r.select("svg").append("g").attr("class","venn-text-nodes"),l=new Map;for(const c of n){const t=Ct(c.sets),e=l.get(t);e?e.push(c):l.set(t,[c])}for(const[c,h]of l.entries()){const t=e.get(c);if(!t?.text)continue;const r=t.text.x,n=t.text.y,l=Math.min(...t.circles.map(t=>t.radius)),u=Math.min(...t.circles.map(t=>t.radius-Math.hypot(r-t.x,n-t.y)));let d=Number.isFinite(u)?Math.max(0,u):0;0===d&&Number.isFinite(l)&&(d=.6*l);const p=s.append("g").attr("class","venn-text-area").attr("font-size",40*i+"px");o&&p.append("circle").attr("class","venn-text-debug-circle").attr("cx",r).attr("cy",n).attr("r",d).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const f=Math.max(80*i,2*d*.95),g=Math.max(60*i,2*d*.95),m=(t.data.label&&t.data.label.length>0?Math.min(32*i,.25*d):0)+(h.length<=2?30*i:0),y=r-f/2,v=n-g/2+m,b=Math.max(1,Math.ceil(Math.sqrt(h.length))),x=f/b,T=g/Math.max(1,Math.ceil(h.length/b));for(const[e,s]of h.entries()){const t=e%b,r=Math.floor(e/b),n=y+x*(t+.5),l=v+T*(r+.5);o&&p.append("rect").attr("class","venn-text-debug-cell").attr("x",y+x*t).attr("y",v+T*r).attr("width",x).attr("height",T).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const c=.9*x,h=.9*T,u=p.append("foreignObject").attr("class","venn-text-node-fo").attr("width",c).attr("height",h).attr("x",n-c/2).attr("y",l-h/2).attr("overflow","visible"),d=a.get(s.id)?.color,f=u.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(s.label??s.id);d&&f.style("color",d)}}}(0,o.K2)(Ct,"stableSetsKey"),(0,o.K2)(Et,"renderTextNodes");var St={parser:J,db:xt,renderer:{draw:kt},styles:Tt}},2665(t,e,r){"use strict";r.d(e,{diagram:()=>P});var n=r(594),i=r(5871),a=r(8221),o=r(1123),s=r(797),l=r(8731),c=(0,s.K2)((t,e)=>{const r=t<=1?100*t:t;if(r<0||r>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return r},"toPercent"),h=(0,s.K2)((t,e,r)=>({x:c(e,`${r} evolution`),y:c(t,`${r} visibility`)}),"toCoordinates"),u=(0,s.K2)(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),d=(0,s.K2)(t=>{if(!t?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(t),r=e?.[1];return t.includes("<>")?{flow:"bidirectional",label:r}:t.includes("<")?{flow:"backward",label:r}:t.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),p=(0,s.K2)((t,e)=>{if((0,i.S)(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const r=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),n=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);e.updateAxes({stages:r,stageBoundaries:n})}if(t.anchors.forEach(t=>{const r=h(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,r.x,r.y,"anchor")}),t.components.forEach(t=>{const r=h(t.visibility,t.evolution,`Component "${t.name}"`),n=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,i=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,a=t.decorator?.strategy;e.addNode(t.name,t.name,r.x,r.y,"component",n,i,t.inertia,a)}),t.notes.forEach(t=>{const r=h(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,r.x,r.y)}),t.pipelines.forEach(t=>{const r=e.getNode(t.parent);if(!r||"number"!=typeof r.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const n=r.y;e.startPipeline(t.parent),t.components.forEach(r=>{const i=`${t.parent}_${r.name}`,a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,o=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,s=c(r.evolution,`Pipeline component "${r.name}" evolution`);e.addNode(i,r.name,s,n,"pipeline-component",a,o),e.addPipelineComponent(t.parent,i)})}),t.links.forEach(t=>{const r=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let n=u(t.fromPort)??u(t.toPort);const{flow:i,label:a}=d(t.arrow);!n&&i&&(n=i);const o=t.linkLabel,s=a??o;e.addLink(e.resolveNodeId(t.from),e.resolveNodeId(t.to),r,s,n)}),t.evolves.forEach(t=>{const r=e.getNode(t.component);if(void 0!==r?.y){const n=c(t.target,`Evolve target for "${t.component}"`);e.addTrend(t.component,n,r.y)}}),t.annotations.length>0){const r=t.annotations[0],n=h(r.x,r.y,"Annotations box");e.setAnnotationsBox(n.x,n.y)}t.annotation.forEach(t=>{const r=h(t.x,t.y,`Annotation ${t.number}`);e.addAnnotation(t.number,[{x:r.x,y:r.y}],t.text)}),t.accelerators.forEach(t=>{const r=h(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,r.x,r.y)}),t.deaccelerators.forEach(t=>{const r=h(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,r.x,r.y)})},"populateDb"),f={parser:{yy:void 0},parse:(0,s.K2)(async t=>{const e=await(0,l.qg)("wardley",t);s.Rm.debug(e);const r=f.parser?.yy;if(!r||"function"!=typeof r.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");p(e,r)},"parse")},g=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{(0,s.K2)(this,"WardleyBuilder")}addNode(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},r={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,r)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const r=this.pipelines.get(t);r&&r.componentIds.push(e);const n=this.nodes.get(e);n&&(n.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(const[e,r]of this.nodes)if(r.label===t)return e;return t}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function m(){return(0,o.D7)()["wardley-beta"]}function y(t,e,r,n,i,a,o,s,l){g.addNode({id:t,label:e,x:r,y:n,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:l})}function v(t,e,r=!1,n,i){g.addLink({source:t,target:e,dashed:r,label:n,flow:i})}function b(t,e,r){g.addTrend({nodeId:t,targetX:e,targetY:r})}function x(t,e,r){g.addAnnotation({number:t,coordinates:e,text:r})}function T(t,e,r){g.addNote({text:t,x:e,y:r})}function w(t,e,r){g.addAccelerator({name:t,x:e,y:r})}function k(t,e,r){g.addDeaccelerator({name:t,x:e,y:r})}function C(t,e){g.setAnnotationsBox(t,e)}function E(t,e){g.setSize(t,e)}function S(t){g.startPipeline(t)}function _(t,e){g.addPipelineComponent(t,e)}function A(t){g.setAxes(t)}function R(t){return g.getNode(t)}function L(t){return g.resolveNodeId(t)}function I(){return g.build()}function D(){g.clear(),(0,o.IU)()}(0,s.K2)(m,"getConfig"),(0,s.K2)(y,"addNode"),(0,s.K2)(v,"addLink"),(0,s.K2)(b,"addTrend"),(0,s.K2)(x,"addAnnotation"),(0,s.K2)(T,"addNote"),(0,s.K2)(w,"addAccelerator"),(0,s.K2)(k,"addDeaccelerator"),(0,s.K2)(C,"setAnnotationsBox"),(0,s.K2)(E,"setSize"),(0,s.K2)(S,"startPipeline"),(0,s.K2)(_,"addPipelineComponent"),(0,s.K2)(A,"updateAxes"),(0,s.K2)(R,"getNode"),(0,s.K2)(L,"resolveNodeId"),(0,s.K2)(I,"getWardleyData"),(0,s.K2)(D,"clear");var N={getConfig:m,addNode:y,addLink:v,addTrend:b,addAnnotation:x,addNote:T,addAccelerator:w,addDeaccelerator:k,setAnnotationsBox:C,setSize:E,startPipeline:S,addPipelineComponent:_,updateAxes:A,getNode:R,resolveNodeId:L,getWardleyData:I,clear:D,setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI},M=["Genesis","Custom Built","Product","Commodity"],O=(0,s.K2)(()=>{const{themeVariables:t}=(0,o.D7)();return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),$=(0,s.K2)(()=>{const t=(0,o.D7)()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),P={parser:f,db:N,renderer:{draw:(0,s.K2)((t,e,r,i)=>{s.Rm.debug("Rendering Wardley map\n"+t);const a=$(),l=O(),c=1.6*a.nodeRadius,h=i.db,u=h.getWardleyData(),d=h.getDiagramTitle(),p=u.size?.width??a.width,f=u.size?.height??a.height,g=(0,n.D)(e);g.selectAll("*").remove(),(0,o.a$)(g,f,p,a.useMaxWidth),g.attr("viewBox",`0 0 ${p} ${f}`);const m=g.append("g").attr("class","wardley-map"),y=g.append("defs");y.append("marker").attr("id",`arrow-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.evolutionStroke).attr("stroke","none"),y.append("marker").attr("id",`link-arrow-end-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.linkStroke).attr("stroke","none"),y.append("marker").attr("id",`link-arrow-start-${e}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",l.linkStroke).attr("stroke","none"),m.append("rect").attr("class","wardley-background").attr("width",p).attr("height",f).attr("fill",l.backgroundColor);const v=p-2*a.padding,b=f-2*a.padding;d&&m.append("text").attr("class","wardley-title").attr("x",p/2).attr("y",a.padding/2).attr("fill",l.axisTextColor).attr("font-size",1.05*a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const x=(0,s.K2)(t=>a.padding+t/100*v,"projectX"),T=(0,s.K2)(t=>f-a.padding-t/100*b,"projectY"),w=m.append("g").attr("class","wardley-axes");w.append("line").attr("x1",a.padding).attr("x2",p-a.padding).attr("y1",f-a.padding).attr("y2",f-a.padding).attr("stroke",l.axisColor).attr("stroke-width",1),w.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",f-a.padding).attr("stroke",l.axisColor).attr("stroke-width",1);const k=u.axes.xLabel??"Evolution",C=u.axes.yLabel??"Visibility";w.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+v/2).attr("y",f-a.padding/4).attr("fill",l.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(k),w.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+b/2).attr("fill",l.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+b/2})`).text(C);const E=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:M;if(E.length>0){const t=m.append("g").attr("class","wardley-stages"),e=u.axes.stageBoundaries,r=[];if(e&&e.length===E.length){let t=0;e.forEach(e=>{r.push({start:t,end:e}),t=e})}else{const t=1/E.length;E.forEach((e,n)=>{r.push({start:n*t,end:(n+1)*t})})}E.forEach((e,n)=>{const i=r[n],o=a.padding+i.start*v,s=(o+(a.padding+i.end*v))/2;n>0&&t.append("line").attr("x1",o).attr("x2",o).attr("y1",a.padding).attr("y2",f-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",s).attr("y",f-a.padding/1.5).attr("fill",l.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(a.showGrid){const t=m.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const r=e/4,n=a.padding+v*r;t.append("line").attr("x1",n).attr("x2",n).attr("y1",a.padding).attr("y2",f-a.padding).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",p-a.padding).attr("y1",f-a.padding-b*r).attr("y2",f-a.padding-b*r).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6")}}const S=new Map;if(u.nodes.forEach(t=>{S.set(t.id,{x:x(t.x),y:T(t.y),node:t})}),u.pipelines.length>0){const t=m.append("g").attr("class","wardley-pipelines"),e=m.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach(r=>{if(0===r.componentIds.length)return;const n=r.componentIds.map(t=>({id:t,pos:S.get(t),node:u.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t<n.length-1;t++){const r=n[t],i=n[t+1];e.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",r.pos.x).attr("y1",r.pos.y).attr("x2",i.pos.x).attr("y2",i.pos.y).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let i=1/0,o=-1/0,s=0;if(r.componentIds.forEach(t=>{const e=S.get(t);e&&(i=Math.min(i,e.x),o=Math.max(o,e.x),s=e.y)}),i!==1/0&&o!==-1/0){const e=15,n=4*a.nodeRadius,h=s-n/2,u=S.get(r.nodeId);if(u){const t=(i+o)/2;u.x=t,u.y=h-c/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",i-e).attr("y",h).attr("width",o-i+2*e).attr("height",n).attr("fill","none").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=m.append("g").attr("class","wardley-links"),A=new Map;u.pipelines.forEach(t=>{A.set(t.nodeId,new Set(t.componentIds))});const R=u.links.filter(t=>{if(!S.has(t.source)||!S.has(t.target))return!1;const e=A.get(t.target);return!e?.has(t.source)});_.selectAll("line").data(R).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=S.get(t.source),r=S.get(t.target),n=u.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):a.nodeRadius,i=r.x-e.x,o=r.y-e.y,s=Math.sqrt(i*i+o*o);return e.x+i/s*n}).attr("y1",t=>{const e=S.get(t.source),r=S.get(t.target),n=u.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):a.nodeRadius,i=r.x-e.x,o=r.y-e.y,s=Math.sqrt(i*i+o*o);return e.y+o/s*n}).attr("x2",t=>{const e=S.get(t.source),r=S.get(t.target),n=u.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):a.nodeRadius,i=e.x-r.x,o=e.y-r.y,s=Math.sqrt(i*i+o*o);return r.x+i/s*n}).attr("y2",t=>{const e=S.get(t.source),r=S.get(t.target),n=u.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):a.nodeRadius,i=e.x-r.x,o=e.y-r.y,s=Math.sqrt(i*i+o*o);return r.y+o/s*n}).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),_.selectAll("text").data(R.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=S.get(t.source),r=S.get(t.target),n=(e.x+r.x)/2,i=r.y-e.y,a=r.x-e.x;return n+8*(i/Math.sqrt(a*a+i*i))}).attr("y",t=>{const e=S.get(t.source),r=S.get(t.target),n=(e.y+r.y)/2,i=r.x-e.x,a=r.y-e.y;return n+8*(-i/Math.sqrt(i*i+a*a))}).attr("fill",l.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=S.get(t.source),r=S.get(t.target),n=(e.x+r.x)/2,i=(e.y+r.y)/2,a=r.x-e.x,o=r.y-e.y,s=Math.sqrt(a*a+o*o),l=n+8*(o/s),c=i+8*(-a/s);let h=180*Math.atan2(o,a)/Math.PI;return(h>90||h<-90)&&(h+=180),`rotate(${h} ${l} ${c})`}).text(t=>t.label);const L=m.append("g").attr("class","wardley-trends"),I=u.trends.map(t=>{const e=S.get(t.nodeId);if(!e)return null;const r=x(t.targetX),n=T(t.targetY),i=r-e.x,o=n-e.y,s=Math.sqrt(i*i+o*o),l=a.nodeRadius+2;return{origin:e,targetX:r,targetY:n,adjustedX2:s>l?r-i/s*l:r,adjustedY2:s>l?n-o/s*l:n}}).filter(t=>null!==t);L.selectAll("line").data(I).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",l.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const D=m.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));D.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>S.get(t.id).x).attr("cy",t=>S.get(t.id).y).attr("r",2*a.nodeRadius).attr("fill","#666").attr("stroke",l.componentStroke).attr("stroke-width",1),D.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>S.get(t.id).x).attr("cy",t=>S.get(t.id).y).attr("r",2*a.nodeRadius).attr("fill","#ccc").attr("stroke",l.componentStroke).attr("stroke-width",1),D.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>S.get(t.id).x).attr("cy",t=>S.get(t.id).y).attr("r",2*a.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const N=D.filter(t=>"market"===t.sourceStrategy);N.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>S.get(t.id).x).attr("cy",t=>S.get(t.id).y).attr("r",2*a.nodeRadius).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),D.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>S.get(t.id).x).attr("cy",t=>S.get(t.id).y).attr("r",a.nodeRadius).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1);const P=.7*a.nodeRadius,B=1.2*a.nodeRadius;if(N.append("line").attr("class","wardley-market-line").attr("x1",t=>S.get(t.id).x).attr("y1",t=>S.get(t.id).y-B).attr("x2",t=>S.get(t.id).x-B*Math.cos(Math.PI/6)).attr("y2",t=>S.get(t.id).y+B*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),N.append("line").attr("class","wardley-market-line").attr("x1",t=>S.get(t.id).x-B*Math.cos(Math.PI/6)).attr("y1",t=>S.get(t.id).y+B*Math.sin(Math.PI/6)).attr("x2",t=>S.get(t.id).x+B*Math.cos(Math.PI/6)).attr("y2",t=>S.get(t.id).y+B*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),N.append("line").attr("class","wardley-market-line").attr("x1",t=>S.get(t.id).x+B*Math.cos(Math.PI/6)).attr("y1",t=>S.get(t.id).y+B*Math.sin(Math.PI/6)).attr("x2",t=>S.get(t.id).x).attr("y2",t=>S.get(t.id).y-B).attr("stroke",l.componentStroke).attr("stroke-width",1),N.append("circle").attr("class","wardley-market-dot").attr("cx",t=>S.get(t.id).x).attr("cy",t=>S.get(t.id).y-B).attr("r",P).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),N.append("circle").attr("class","wardley-market-dot").attr("cx",t=>S.get(t.id).x-B*Math.cos(Math.PI/6)).attr("cy",t=>S.get(t.id).y+B*Math.sin(Math.PI/6)).attr("r",P).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),N.append("circle").attr("class","wardley-market-dot").attr("cx",t=>S.get(t.id).x+B*Math.cos(Math.PI/6)).attr("cy",t=>S.get(t.id).y+B*Math.sin(Math.PI/6)).attr("r",P).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),D.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>S.get(t.id).x-c/2).attr("y",t=>S.get(t.id).y-c/2).attr("width",c).attr("height",c).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1),D.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=S.get(t.id);let r=t.isPipelineParent?c/2+15:a.nodeRadius+15;return t.sourceStrategy&&(r+=a.nodeRadius+10),e.x+r}).attr("y1",t=>{const e=S.get(t.id),r=t.isPipelineParent?c:2*a.nodeRadius;return e.y-r/2}).attr("x2",t=>{const e=S.get(t.id);let r=t.isPipelineParent?c/2+15:a.nodeRadius+15;return t.sourceStrategy&&(r+=a.nodeRadius+10),e.x+r}).attr("y2",t=>{const e=S.get(t.id),r=t.isPipelineParent?c:2*a.nodeRadius;return e.y+r/2}).attr("stroke",l.componentStroke).attr("stroke-width",6),D.append("text").attr("x",t=>{const e=S.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let r=a.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(r+=10);const n=t.labelOffsetX??r;return e.x+n}).attr("y",t=>{const e=S.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let r=-a.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(r-=10);const n=t.labelOffsetY??r;return e.y+n}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?l.evolutionStroke:"anchor"===t.className?"#000":l.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),u.annotations.length>0){const t=m.append("g").attr("class","wardley-annotations");if(u.annotations.forEach(e=>{const r=e.coordinates.map(t=>({x:x(t.x),y:T(t.y)}));if(r.length>1)for(let n=0;n<r.length-1;n++)t.append("line").attr("class","wardley-annotation-line").attr("x1",r[n].x).attr("y1",r[n].y).attr("x2",r[n+1].x).attr("y2",r[n+1].y).attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");r.forEach(r=>{const n=t.append("g").attr("class","wardley-annotation");n.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5),n.append("text").attr("x",r.x).attr("y",r.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(e.number)})}),u.annotationsBox){let e=x(u.annotationsBox.x),r=T(u.annotationsBox.y);const n=10,i=16,o=11,s=t.append("g").attr("class","wardley-annotations-box"),c=[...u.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),h=[];if(c.forEach((t,a)=>{const c=s.append("text").attr("x",e+n).attr("y",r+n+(a+1)*i).attr("font-size",o).attr("fill",l.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);h.push(c)}),h.length>0){let t=0,o=0;h.forEach(e=>{const r=e.node(),n=r.getComputedTextLength();t=Math.max(t,n);const i=r.getBBox();o=Math.max(o,i.height)});const u=t+2*n+105,d=c.length*i+2*n+o/2,g=a.padding,m=p-a.padding-u,y=a.padding,v=f-a.padding-d;e=Math.max(g,Math.min(e,m)),r=Math.max(y,Math.min(r,v)),h.forEach((t,a)=>{t.attr("x",e+n).attr("y",r+n+(a+1)*i)}),s.insert("rect","text").attr("x",e).attr("y",r).attr("width",u).attr("height",d).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){const t=m.append("g").attr("class","wardley-notes");u.notes.forEach(e=>{const r=x(e.x),n=T(e.y);t.append("text").attr("x",r).attr("y",n).attr("text-anchor","start").attr("font-size",11).attr("fill",l.axisTextColor).attr("font-weight","bold").text(e.text)})}if(u.accelerators.length>0){const t=m.append("g").attr("class","wardley-accelerators");u.accelerators.forEach(e=>{const r=x(e.x),n=T(e.y),i=60,a=`\n M ${r} ${n-15}\n L ${r+i-20} ${n-15}\n L ${r+i-20} ${n-15-8}\n L ${r+i} ${n}\n L ${r+i-20} ${n+15+8}\n L ${r+i-20} ${n+15}\n L ${r} ${n+15}\n Z\n `;t.append("path").attr("d",a).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",r+30).attr("y",n+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(e.name)})}if(u.deaccelerators.length>0){const t=m.append("g").attr("class","wardley-deaccelerators");u.deaccelerators.forEach(e=>{const r=x(e.x),n=T(e.y),i=`\n M ${r+60} ${n-15}\n L ${r+20} ${n-15}\n L ${r+20} ${n-15-8}\n L ${r} ${n}\n L ${r+20} ${n+15+8}\n L ${r+20} ${n+15}\n L ${r+60} ${n+15}\n Z\n `;t.append("path").attr("d",i).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",r+30).attr("y",n+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:(0,s.K2)(({wardley:t}={})=>{const e=(0,o.P$)(),r=(0,o.zj)(),n=(0,a.$t)(e,r.themeVariables),i=(0,a.$t)(n.wardley,t);return`\n .wardley-background {\n fill: ${i.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${i.axisColor};\n }\n .wardley-axis-label {\n fill: ${i.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${i.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${i.gridColor};\n }\n .wardley-node circle {\n fill: ${i.componentFill};\n stroke: ${i.componentStroke};\n }\n .wardley-node-label {\n fill: ${i.componentLabelColor};\n }\n .wardley-link {\n stroke: ${i.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${i.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${i.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${i.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${i.annotationFill};\n stroke: ${i.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${i.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${i.annotationFill};\n stroke: ${i.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${i.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${i.componentStroke};\n }\n .wardley-notes text {\n fill: ${i.axisTextColor};\n }\n `},"styles")}},5692(t,e,r){"use strict";r.d(e,{diagram:()=>et});var n=r(594),i=r(1240),a=r(8221),o=r(1123),s=r(797),l=r(1444),c=function(){var t=(0,s.K2)(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],f=[1,31],g=[1,32],m=[1,33],y=[1,34],v=[1,35],b=[1,36],x=[1,37],T=[1,43],w=[1,42],k=[1,47],C=[1,50],E=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],R={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,s.K2)(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 5:n.setOrientation(a[s]);break;case 9:n.setDiagramTitle(a[s].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[s]);break;case 13:n.setLineData(a[s-1],a[s]);break;case 14:n.setBarData({text:"",type:"text"},a[s]);break;case 15:n.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 19:case 27:this.$=a[s-1];break;case 20:this.$=[Number(a[s-2]),...a[s]];break;case 21:this.$=[Number(a[s])];break;case 22:n.setXAxisTitle(a[s]);break;case 23:n.setXAxisTitle(a[s-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[s]);break;case 26:n.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 28:this.$=[a[s-2],...a[s]];break;case 29:this.$=[a[s]];break;case 30:n.setYAxisTitle(a[s]);break;case 31:n.setYAxisTitle(a[s-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 37:case 38:this.$={text:a[s],type:"text"};break;case 39:this.$={text:a[s],type:"markdown"};break;case 40:this.$=a[s];break;case 41:this.$=a[s-1]+""+a[s]}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:o}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:o}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:o}),{1:[2,3]},t(l,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:o}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:39,13:38,24:T,27:w,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:45,15:44,27:k,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:49,17:48,24:C,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{11:52,17:51,24:C,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},{20:[1,53]},{22:[1,54]},t(E,[2,18]),{1:[2,2]},t(E,[2,8]),t(E,[2,9]),t(S,[2,37],{40:55,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x}),t(S,[2,38]),t(S,[2,39]),t(_,[2,40]),t(_,[2,42]),t(_,[2,43]),t(_,[2,44]),t(_,[2,45]),t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(E,[2,10]),t(E,[2,22],{30:41,29:56,24:T,27:w}),t(E,[2,24]),t(E,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},t(E,[2,11]),t(E,[2,30],{33:60,27:k}),t(E,[2,32]),{31:[1,61]},t(E,[2,12]),{17:62,24:C},{25:63,27:A},t(E,[2,14]),{17:65,24:C},t(E,[2,16]),t(E,[2,17]),t(_,[2,41]),t(E,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(E,[2,31]),{27:[1,69]},t(E,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(E,[2,15]),t(E,[2,26]),t(E,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:f,45:g,46:m,47:y,48:v,49:b,50:x},t(E,[2,33]),t(E,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,r=[0],n=[],i=[null],a=[],o=this.table,l="",c=0,h=0,u=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),f={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(f.yy[g]=this.yy[g]);p.setInput(t,f.yy),f.yy.lexer=p,f.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var y=p.options&&p.options.ranges;function v(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(v,"lex");for(var b,x,T,w,k,C,E,S,_,A={};;){if(T=r[r.length-1],this.defaultActions[T]?w=this.defaultActions[T]:(null==b&&(b=v()),w=o[T]&&o[T][b]),void 0===w||!w.length||!w[0]){var R="";for(C in _=[],o[T])this.terminals_[C]&&C>2&&_.push("'"+this.terminals_[C]+"'");R=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(R,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:_})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,x?(b=x,x=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,m=p.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[w[1]][1],A.$=i[i.length-E],A._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(A,[l,h,c,f.yy,w[1],i,a].concat(d))))return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(A.$),a.push(A._$),S=o[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0},"parse")},L=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||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},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(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,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,r,n){switch(r){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function I(){this.yy={}}return R.lexer=L,(0,s.K2)(I,"Parser"),I.prototype=R,R.Parser=I,new I}();c.parser=c;var h=c;function u(t){return"bar"===t.type}function d(t){return"band"===t.type}function p(t){return"linear"===t.type}(0,s.K2)(u,"isBarPlot"),(0,s.K2)(d,"isBandAxisData"),(0,s.K2)(p,"isLinearAxisData");var f=class{constructor(t){this.parentGroup=t}static{(0,s.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};const r={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const a of t){const t=(0,i.W6)(n,1,a),o=t?t.width:a.length*e,s=t?t.height:e;r.width=Math.max(r.width,o),r.height=Math.max(r.height,s)}return n.remove(),r}},g=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,s.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const r=this.getLabelDimension(),n=.2*t.width;this.outerPadding=Math.min(r.width/2,n);const i=r.height+2*this.axisConfig.labelPadding;this.labelTextHeight=r.height,i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),r=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,r<=e&&(e-=r,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const r=this.getLabelDimension(),n=.2*t.height;this.outerPadding=Math.min(r.height/2,n);const i=r.width+2*this.axisConfig.labelPadding;i<=e&&(e-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),r=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,r<=e&&(e-=r,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},m=class extends g{static{(0,s.K2)(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=(0,l.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,l.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),s.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends g{static{(0,s.K2)(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=(0,l.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,l.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function v(t,e,r,n){const i=new f(n);return d(t)?new m(e,r,t.categories,t.title,i):new y(e,r,[t.min,t.max],t.title,i)}(0,s.K2)(v,"getAxis");var b=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,s.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(e.width,t.width),n=e.height+2*this.chartConfig.titlePadding;return e.width<=r&&e.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function x(t,e,r,n){const i=new f(n);return new b(i,t,e,r)}(0,s.K2)(x,"getChartTitleComponent");var T=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{(0,s.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let e;return e="horizontal"===this.orientation?(0,l.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,l.n8j)().x(t=>t[0]).y(t=>t[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},w=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{(0,s.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},k=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,s.K2)(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[e,r]of this.chartData.plots.entries())switch(r.type){case"line":{const n=new T(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break;case"bar":{const n=new w(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}}return t}};function C(t,e,r){return new k(t,e,r)}(0,s.K2)(C,"getPlotComponent");var E,S=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:x(t,e,r,n),plot:C(t,e,r),xAxis:v(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:v(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{(0,s.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});t-=o.width,e-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=o.height,e-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:e}),r=o.width,t-=o.width,t>0&&(i+=t,t=0),e>0&&(a+=e,e=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([r,r+i]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:n+a}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r=0,n=0,i=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});t-=s.width,e-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),r=s.height,e-=s.height,this.componentStore.xAxis.setAxisPosition("left"),s=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=s.width,n=s.width,this.componentStore.yAxis.setAxisPosition("top"),s=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=s.height,i=r+s.height,t>0&&(a+=t,t=0),e>0&&(o+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.yAxis.setRange([n,n+a]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},_=class{static{(0,s.K2)(this,"XYChartBuilder")}static build(t,e,r,n){return new S(t,e,r,n).getDrawableElement()}},A=0,R=$(),L=O(),I=P(),D=L.plotColorPalette.split(",").map(t=>t.trim()),N=!1,M=!1;function O(){const t=(0,o.P$)(),e=(0,o.zj)();return(0,a.$t)(t.xyChart,e.themeVariables.xyChart)}function $(){const t=(0,o.zj)();return(0,a.$t)(o.UI.xyChart,t.xyChart)}function P(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const e=(0,o.zj)();return(0,o.jZ)(t.trim(),e)}function F(t){E=t}function z(t){R.chartOrientation="horizontal"===t?"horizontal":"vertical"}function K(t){I.xAxis.title=B(t.text)}function j(t,e){I.xAxis={type:"linear",title:I.xAxis.title,min:t,max:e},N=!0}function q(t){I.xAxis={type:"band",title:I.xAxis.title,categories:t.map(t=>B(t.text))},N=!0}function W(t){I.yAxis.title=B(t.text)}function U(t,e){I.yAxis={type:"linear",title:I.yAxis.title,min:t,max:e},M=!0}function G(t){const e=Math.min(...t),r=Math.max(...t),n=p(I.yAxis)?I.yAxis.min:1/0,i=p(I.yAxis)?I.yAxis.max:-1/0;I.yAxis={type:"linear",title:I.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function Y(t){let e=[];if(0===t.length)return e;if(!N){const e=p(I.xAxis)?I.xAxis.min:1/0,r=p(I.xAxis)?I.xAxis.max:-1/0;j(Math.min(e,1),Math.max(r,t.length))}if(M||G(t),d(I.xAxis)&&(e=I.xAxis.categories.map((e,r)=>[e,t[r]])),p(I.xAxis)){const r=I.xAxis.min,n=I.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let t=r;t<=n;t+=i)a.push(`${t}`);e=a.map((e,r)=>[e,t[r]])}return e}function V(t){return D[0===t?0:t%D.length]}function H(t,e){const r=Y(e);I.plots.push({type:"line",strokeFill:V(A),strokeWidth:2,data:r}),A++}function X(t,e){const r=Y(e);I.plots.push({type:"bar",fill:V(A),data:r}),A++}function Z(){if(0===I.plots.length)throw Error("No Plot to render, please provide a plot with some data");return I.title=(0,o.ab)(),_.build(R,I,L,E)}function Q(){return L}function J(){return R}function tt(){return I}(0,s.K2)(O,"getChartDefaultThemeConfig"),(0,s.K2)($,"getChartDefaultConfig"),(0,s.K2)(P,"getChartDefaultData"),(0,s.K2)(B,"textSanitizer"),(0,s.K2)(F,"setTmpSVGG"),(0,s.K2)(z,"setOrientation"),(0,s.K2)(K,"setXAxisTitle"),(0,s.K2)(j,"setXAxisRangeData"),(0,s.K2)(q,"setXAxisBand"),(0,s.K2)(W,"setYAxisTitle"),(0,s.K2)(U,"setYAxisRangeData"),(0,s.K2)(G,"setYAxisRangeFromPlotData"),(0,s.K2)(Y,"transformDataWithoutCategory"),(0,s.K2)(V,"getPlotColorFromPalette"),(0,s.K2)(H,"setLineData"),(0,s.K2)(X,"setBarData"),(0,s.K2)(Z,"getDrawableElem"),(0,s.K2)(Q,"getChartThemeConfig"),(0,s.K2)(J,"getChartConfig"),(0,s.K2)(tt,"getXYChartData");var et={parser:h,db:{getDrawableElem:Z,clear:(0,s.K2)(function(){(0,o.IU)(),A=0,R=$(),I={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},L=O(),D=L.plotColorPalette.split(",").map(t=>t.trim()),N=!1,M=!1},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI,setOrientation:z,setXAxisTitle:K,setXAxisRangeData:j,setXAxisBand:q,setYAxisTitle:W,setYAxisRangeData:U,setLineData:H,setBarData:X,setTmpSVGG:F,getChartThemeConfig:Q,getChartConfig:J,getXYChartData:tt},renderer:{draw:(0,s.K2)((t,e,r,i)=>{const a=i.db,l=a.getChartThemeConfig(),c=a.getChartConfig(),h=a.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function d(t){return"left"===t?"start":"right"===t?"end":"middle"}function p(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,s.K2)(u,"getDominantBaseLine"),(0,s.K2)(d,"getTextAnchor"),(0,s.K2)(p,"getTextTransformation"),s.Rm.debug("Rendering xychart chart\n"+t);const f=(0,n.D)(e),g=f.append("g").attr("class","main"),m=g.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");(0,o.a$)(f,c.height,c.width,!0),f.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",l.backgroundColor),a.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));const y=a.getDrawableElem(),v={};function b(t){let e=g,r="";for(const[n]of t.entries()){let i=g;n>0&&v[r]&&(i=v[r]),r+=t[n],e=v[r],e||(e=v[r]=i.append("g").attr("class",t[n]))}return e}(0,s.K2)(b,"getGroup");for(const n of y){if(0===n.data.length)continue;const t=b(n.groupTexts);switch(n.type){case"rect":if(t.selectAll("rect").data(n.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){const e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let r=function(t,e){const{data:r,label:n}=t;return e*n.length*i<=r.width-a};(0,s.K2)(r,"fitsHorizontally");const i=.7,a=10,o=n.data.map((t,e)=>({data:t,label:h[e].toString()})).filter(t=>t.data.width>0&&t.data.height>0),c=o.map(t=>{const{data:e}=t;let n=.7*e.height;for(;!r(t,n)&&n>0;)n-=1;return n}),u=Math.floor(Math.min(...c)),d=(0,s.K2)(t=>e?t.data.x+t.data.width+a:t.data.x+t.data.width-a,"determineLabelXPosition");t.selectAll("text").data(o).enter().append("text").attr("x",d).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",l.dataLabelColor).attr("font-size",`${u}px`).text(t=>t.label)}else{let r=function(t,e,r){const{data:n,label:i}=t,a=e*i.length*.7,o=n.x+n.width/2,s=o+a/2,l=o-a/2>=n.x&&s<=n.x+n.width,c=n.y+r+e<=n.y+n.height;return l&&c};(0,s.K2)(r,"fitsInBar");const i=10,a=n.data.map((t,e)=>({data:t,label:h[e].toString()})).filter(t=>t.data.width>0&&t.data.height>0),o=a.map(t=>{const{data:e,label:n}=t;let a=e.width/(.7*n.length);for(;!r(t,a,i)&&a>0;)a-=1;return a}),c=Math.floor(Math.min(...o)),u=(0,s.K2)(t=>e?t.data.y-i:t.data.y+i,"determineLabelYPosition");t.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",u).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",l.dataLabelColor).attr("font-size",`${c}px`).text(t=>t.label)}}break;case"text":t.selectAll("text").data(n.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>d(t.horizontalPos)).attr("transform",t=>p(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(n.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}},3047(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e);else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(e,{A:()=>gt});const a=Object.entries,o=Object.setPrototypeOf,s=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor;let h=Object.freeze,u=Object.seal,d=Object.create,p="undefined"!=typeof Reflect&&Reflect,f=p.apply,g=p.construct;h||(h=function(t){return t}),u||(u=function(t){return t}),f||(f=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return t.apply(e,n)}),g||(g=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return new t(...r)});const m=P(Array.prototype.forEach),y=P(Array.prototype.lastIndexOf),v=P(Array.prototype.pop),b=P(Array.prototype.push),x=P(Array.prototype.splice),T=Array.isArray,w=P(String.prototype.toLowerCase),k=P(String.prototype.toString),C=P(String.prototype.match),E=P(String.prototype.replace),S=P(String.prototype.indexOf),_=P(String.prototype.trim),A=P(Number.prototype.toString),R=P(Boolean.prototype.toString),L="undefined"==typeof BigInt?null:P(BigInt.prototype.toString),I="undefined"==typeof Symbol?null:P(Symbol.prototype.toString),D=P(Object.prototype.hasOwnProperty),N=P(Object.prototype.toString),M=P(RegExp.prototype.test),O=($=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return g($,e)});var $;function P(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return f(t,e,n)}}function B(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;if(o&&o(t,null),!T(e))return t;let n=e.length;for(;n--;){let i=e[n];if("string"==typeof i){const t=r(i);t!==i&&(s(e)||(e[n]=t),i=t)}t[i]=!0}return t}function F(t){for(let e=0;e<t.length;e++){D(t,e)||(t[e]=null)}return t}function z(t){const e=d(null);for(const n of a(t)){var r=i(n,2);const a=r[0],o=r[1];D(t,a)&&(T(o)?e[a]=F(o):o&&"object"==typeof o&&o.constructor===Object?e[a]=z(o):e[a]=o)}return e}function K(t,e){for(;null!==t;){const r=c(t,e);if(r){if(r.get)return P(r.get);if("function"==typeof r.value)return P(r.value)}t=l(t)}return function(){return null}}const j=h(["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","search","section","select","selectedcontent","shadow","slot","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"]),q=h(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),W=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=h(["animate","color-profile","cursor","discard","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"]),G=h(["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","mprescripts"]),Y=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),V=h(["#text"]),H=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),X=h(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","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"]),Z=h(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Q=h(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J=u(/{{[\w\W]*|^[\w\W]*}}/g),tt=u(/<%[\w\W]*|^[\w\W]*%>/g),et=u(/\${[\w\W]*/g),rt=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),nt=u(/^aria-[\-\w]+$/),it=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),at=u(/^(?:\w+script|data):/i),ot=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),st=u(/^html$/i),lt=u(/^[a-z][.\w]*(-[.\w]+)+$/i),ct=1,ht=3,ut=7,dt=8,pt=9,ft=function(){return"undefined"==typeof window?null:window};var gt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ft();const r=e=>t(e);if(r.version="3.4.4",r.removed=[],!e||!e.document||e.document.nodeType!==pt||!e.Element)return r.isSupported=!1,r;let n=e.document;const i=n,o=i.currentScript,s=e.DocumentFragment,l=e.HTMLTemplateElement,c=e.Node,u=e.Element,p=e.NodeFilter,f=e.NamedNodeMap,g=void 0===f?e.NamedNodeMap||e.MozNamedAttrMap:f,$=e.HTMLFormElement,P=e.DOMParser,F=e.trustedTypes,gt=u.prototype,mt=K(gt,"cloneNode"),yt=K(gt,"remove"),vt=K(gt,"nextSibling"),bt=K(gt,"childNodes"),xt=K(gt,"parentNode"),Tt=c&&c.prototype?K(c.prototype,"nodeType"):null;if("function"==typeof l){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let wt,kt="";const Ct=n,Et=Ct.implementation,St=Ct.createNodeIterator,_t=Ct.createDocumentFragment,At=Ct.getElementsByTagName,Rt=i.importNode;let Lt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof a&&"function"==typeof xt&&Et&&void 0!==Et.createHTMLDocument;const It=J,Dt=tt,Nt=et,Mt=rt,Ot=nt,$t=at,Pt=ot,Bt=lt;let Ft=it,zt=null;const Kt=B({},[...j,...q,...W,...G,...V]);let jt=null;const qt=B({},[...H,...X,...Z,...Q]);let Wt=Object.seal(d(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}})),Ut=null,Gt=null;const Yt=Object.seal(d(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Vt=!0,Ht=!0,Xt=!1,Zt=!0,Qt=!1,Jt=!0,te=!1,ee=!1,re=!1,ne=!1,ie=!1,ae=!1,oe=!0,se=!1;const le="user-content-";let ce=!0,he=!1,ue={},de=null;const pe=B({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let fe=null;const ge=B({},["audio","video","img","source","image","track"]);let me=null;const ye=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ve="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml";let Te=xe,we=!1,ke=null;const Ce=B({},[ve,be,xe],k);let Ee=B({},["mi","mo","mn","ms","mtext"]),Se=B({},["annotation-xml"]);const _e=B({},["title","style","font","a","script"]);let Ae=null;const Re=["application/xhtml+xml","text/html"];let Le=null,Ie=null;const De=n.createElement("form"),Ne=function(t){return t instanceof RegExp||t instanceof Function},Me=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ie&&Ie===t)return;t&&"object"==typeof t||(t={}),t=z(t),Ae=-1===Re.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Le="application/xhtml+xml"===Ae?k:w,zt=D(t,"ALLOWED_TAGS")&&T(t.ALLOWED_TAGS)?B({},t.ALLOWED_TAGS,Le):Kt,jt=D(t,"ALLOWED_ATTR")&&T(t.ALLOWED_ATTR)?B({},t.ALLOWED_ATTR,Le):qt,ke=D(t,"ALLOWED_NAMESPACES")&&T(t.ALLOWED_NAMESPACES)?B({},t.ALLOWED_NAMESPACES,k):Ce,me=D(t,"ADD_URI_SAFE_ATTR")&&T(t.ADD_URI_SAFE_ATTR)?B(z(ye),t.ADD_URI_SAFE_ATTR,Le):ye,fe=D(t,"ADD_DATA_URI_TAGS")&&T(t.ADD_DATA_URI_TAGS)?B(z(ge),t.ADD_DATA_URI_TAGS,Le):ge,de=D(t,"FORBID_CONTENTS")&&T(t.FORBID_CONTENTS)?B({},t.FORBID_CONTENTS,Le):pe,Ut=D(t,"FORBID_TAGS")&&T(t.FORBID_TAGS)?B({},t.FORBID_TAGS,Le):z({}),Gt=D(t,"FORBID_ATTR")&&T(t.FORBID_ATTR)?B({},t.FORBID_ATTR,Le):z({}),ue=!!D(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?z(t.USE_PROFILES):t.USE_PROFILES),Vt=!1!==t.ALLOW_ARIA_ATTR,Ht=!1!==t.ALLOW_DATA_ATTR,Xt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Zt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Qt=t.SAFE_FOR_TEMPLATES||!1,Jt=!1!==t.SAFE_FOR_XML,te=t.WHOLE_DOCUMENT||!1,ne=t.RETURN_DOM||!1,ie=t.RETURN_DOM_FRAGMENT||!1,ae=t.RETURN_TRUSTED_TYPE||!1,re=t.FORCE_BODY||!1,oe=!1!==t.SANITIZE_DOM,se=t.SANITIZE_NAMED_PROPS||!1,ce=!1!==t.KEEP_CONTENT,he=t.IN_PLACE||!1,Ft=function(t){try{return M(t,""),!0}catch(e){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:it,Te="string"==typeof t.NAMESPACE?t.NAMESPACE:xe,Ee=D(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?z(t.MATHML_TEXT_INTEGRATION_POINTS):B({},["mi","mo","mn","ms","mtext"]),Se=D(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?z(t.HTML_INTEGRATION_POINTS):B({},["annotation-xml"]);const e=D(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?z(t.CUSTOM_ELEMENT_HANDLING):d(null);if(Wt=d(null),D(e,"tagNameCheck")&&Ne(e.tagNameCheck)&&(Wt.tagNameCheck=e.tagNameCheck),D(e,"attributeNameCheck")&&Ne(e.attributeNameCheck)&&(Wt.attributeNameCheck=e.attributeNameCheck),D(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(Wt.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),Qt&&(Ht=!1),ie&&(ne=!0),ue&&(zt=B({},V),jt=d(null),!0===ue.html&&(B(zt,j),B(jt,H)),!0===ue.svg&&(B(zt,q),B(jt,X),B(jt,Q)),!0===ue.svgFilters&&(B(zt,W),B(jt,X),B(jt,Q)),!0===ue.mathMl&&(B(zt,G),B(jt,Z),B(jt,Q))),Yt.tagCheck=null,Yt.attributeCheck=null,D(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?Yt.tagCheck=t.ADD_TAGS:T(t.ADD_TAGS)&&(zt===Kt&&(zt=z(zt)),B(zt,t.ADD_TAGS,Le))),D(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?Yt.attributeCheck=t.ADD_ATTR:T(t.ADD_ATTR)&&(jt===qt&&(jt=z(jt)),B(jt,t.ADD_ATTR,Le))),D(t,"ADD_URI_SAFE_ATTR")&&T(t.ADD_URI_SAFE_ATTR)&&B(me,t.ADD_URI_SAFE_ATTR,Le),D(t,"FORBID_CONTENTS")&&T(t.FORBID_CONTENTS)&&(de===pe&&(de=z(de)),B(de,t.FORBID_CONTENTS,Le)),D(t,"ADD_FORBID_CONTENTS")&&T(t.ADD_FORBID_CONTENTS)&&(de===pe&&(de=z(de)),B(de,t.ADD_FORBID_CONTENTS,Le)),ce&&(zt["#text"]=!0),te&&B(zt,["html","head","body"]),zt.table&&(B(zt,["tbody"]),delete Ut.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw O('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');wt=t.TRUSTED_TYPES_POLICY,kt=wt.createHTML("")}else void 0===wt&&(wt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(r=e.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(F,o)),null!==wt&&"string"==typeof kt&&(kt=wt.createHTML(""));h&&h(t),Ie=t},Oe=B({},[...q,...W,...U]),$e=B({},[...G,...Y]),Pe=function(t){b(r.removed,{element:t});try{xt(t).removeChild(t)}catch(e){yt(t)}},Be=function(t,e){try{b(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(n){b(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(ne||ie)try{Pe(e)}catch(n){}else try{e.setAttribute(t,"")}catch(n){}},Fe=function(t){let e=null,r=null;if(re)t="<remove></remove>"+t;else{const e=C(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===Ae&&Te===xe&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=wt?wt.createHTML(t):t;if(Te===xe)try{e=(new P).parseFromString(i,Ae)}catch(o){}if(!e||!e.documentElement){e=Et.createDocument(Te,"template",null);try{e.documentElement.innerHTML=we?kt:i}catch(o){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Te===xe?At.call(e,te?"html":"body")[0]:te?e.documentElement:a},ze=function(t){return St.call(t.ownerDocument||t,t,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Ke=function(t){t.normalize();const e=St.call(t.ownerDocument||t,t,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let r=e.nextNode();for(;r;){let t=r.data;m([It,Dt,Nt],e=>{t=E(t,e," ")}),r.data=t,r=e.nextNode()}},je=function(t){return t instanceof $&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof g)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},qe=function(t){if(!Tt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Tt(t)}catch(e){return!1}};function We(t,e,n){m(t,t=>{t.call(r,e,n,Ie)})}const Ue=function(t){let e=null;if(We(Lt.beforeSanitizeElements,t,null),je(t))return Pe(t),!0;const n=Le(t.nodeName);if(We(Lt.uponSanitizeElement,t,{tagName:n,allowedTags:zt}),Jt&&t.hasChildNodes()&&!qe(t.firstElementChild)&&M(/<[/\w!]/g,t.innerHTML)&&M(/<[/\w!]/g,t.textContent))return Pe(t),!0;if(Jt&&t.namespaceURI===xe&&"style"===n&&qe(t.firstElementChild))return Pe(t),!0;if(t.nodeType===ut)return Pe(t),!0;if(Jt&&t.nodeType===dt&&M(/<[/\w]/g,t.data))return Pe(t),!0;if(Ut[n]||!(Yt.tagCheck instanceof Function&&Yt.tagCheck(n))&&!zt[n]){if(!Ut[n]&&Ve(n)){if(Wt.tagNameCheck instanceof RegExp&&M(Wt.tagNameCheck,n))return!1;if(Wt.tagNameCheck instanceof Function&&Wt.tagNameCheck(n))return!1}if(ce&&!de[n]){const e=xt(t)||t.parentNode,r=bt(t)||t.childNodes;if(r&&e){for(let n=r.length-1;n>=0;--n){const i=mt(r[n],!0);e.insertBefore(i,vt(t))}}}return Pe(t),!0}return t instanceof u&&!function(t){let e=xt(t);e&&e.tagName||(e={namespaceURI:Te,tagName:"template"});const r=w(t.tagName),n=w(e.tagName);return!!ke[t.namespaceURI]&&(t.namespaceURI===be?e.namespaceURI===xe?"svg"===r:e.namespaceURI===ve?"svg"===r&&("annotation-xml"===n||Ee[n]):Boolean(Oe[r]):t.namespaceURI===ve?e.namespaceURI===xe?"math"===r:e.namespaceURI===be?"math"===r&&Se[n]:Boolean($e[r]):t.namespaceURI===xe?!(e.namespaceURI===be&&!Se[n])&&!(e.namespaceURI===ve&&!Ee[n])&&!$e[r]&&(_e[r]||!Oe[r]):!("application/xhtml+xml"!==Ae||!ke[t.namespaceURI]))}(t)?(Pe(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!M(/<\/no(script|embed|frames)/i,t.innerHTML)?(Qt&&t.nodeType===ht&&(e=t.textContent,m([It,Dt,Nt],t=>{e=E(e,t," ")}),t.textContent!==e&&(b(r.removed,{element:t.cloneNode()}),t.textContent=e)),We(Lt.afterSanitizeElements,t,null),!1):(Pe(t),!0)},Ge=function(t,e,r){if(Gt[e])return!1;if(oe&&("id"===e||"name"===e)&&(r in n||r in De))return!1;const i=jt[e]||Yt.attributeCheck instanceof Function&&Yt.attributeCheck(e,t);if(Ht&&!Gt[e]&&M(Mt,e));else if(Vt&&M(Ot,e));else if(!i||Gt[e]){if(!(Ve(t)&&(Wt.tagNameCheck instanceof RegExp&&M(Wt.tagNameCheck,t)||Wt.tagNameCheck instanceof Function&&Wt.tagNameCheck(t))&&(Wt.attributeNameCheck instanceof RegExp&&M(Wt.attributeNameCheck,e)||Wt.attributeNameCheck instanceof Function&&Wt.attributeNameCheck(e,t))||"is"===e&&Wt.allowCustomizedBuiltInElements&&(Wt.tagNameCheck instanceof RegExp&&M(Wt.tagNameCheck,r)||Wt.tagNameCheck instanceof Function&&Wt.tagNameCheck(r))))return!1}else if(me[e]);else if(M(Ft,E(r,Pt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==S(r,"data:")||!fe[t]){if(Xt&&!M($t,E(r,Pt,"")));else if(r)return!1}else;return!0},Ye=B({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ve=function(t){return!Ye[w(t)]&&M(Bt,t)},He=function(t){We(Lt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||je(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:jt,forceKeepAttr:void 0};let i=e.length;for(;i--;){const o=e[i],s=o.name,l=o.namespaceURI,c=o.value,h=Le(s),u=c;let d="value"===s?u:_(u);if(n.attrName=h,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,We(Lt.uponSanitizeAttribute,t,n),d=n.attrValue,!se||"id"!==h&&"name"!==h||0===S(d,le)||(Be(s,t),d=le+d),Jt&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Be(s,t);continue}if("attributename"===h&&C(d,"href")){Be(s,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Be(s,t);continue}if(!Zt&&M(/\/>/i,d)){Be(s,t);continue}Qt&&m([It,Dt,Nt],t=>{d=E(d,t," ")});const p=Le(t.nodeName);if(Ge(p,h,d)){if(wt&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(l);else switch(F.getAttributeType(p,h)){case"TrustedHTML":d=wt.createHTML(d);break;case"TrustedScriptURL":d=wt.createScriptURL(d)}if(d!==u)try{l?t.setAttributeNS(l,s,d):t.setAttribute(s,d),je(t)?Pe(t):v(r.removed)}catch(a){Be(s,t)}}else Be(s,t)}We(Lt.afterSanitizeAttributes,t,null)},Xe=function(t){let e=null;const r=ze(t);for(We(Lt.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)We(Lt.uponSanitizeShadowNode,e,null),Ue(e),He(e),e.content instanceof s&&Xe(e.content);We(Lt.afterSanitizeShadowDOM,t,null)},Ze=function(t){if(t.nodeType===ct&&t.shadowRoot instanceof s){const e=t.shadowRoot;Ze(e),Xe(e)}const e=t.childNodes;if(!e)return;const r=[];m(e,t=>{b(r,t)});for(const n of r)Ze(n)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,o=null,l=null;if(we=!t,we&&(t="\x3c!--\x3e"),"string"!=typeof t&&!qe(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return A(t);case"boolean":return R(t);case"bigint":return L?L(t):"0";case"symbol":return I?I(t):"Symbol()";case"undefined":default:return N(t);case"function":case"object":{if(null===t)return N(t);const e=t,r=K(e,"toString");if("function"==typeof r){const t=r(e);return"string"==typeof t?t:N(t)}return N(t)}}}(t)))throw O("dirty is not a string, aborting");if(!r.isSupported)return t;if(ee||Me(e),r.removed=[],"string"==typeof t&&(he=!1),he){const e=t.nodeName;if("string"==typeof e){const t=Le(e);if(!zt[t]||Ut[t])throw O("root node is forbidden and cannot be sanitized in-place")}Ze(t)}else if(qe(t))n=Fe("\x3c!----\x3e"),a=n.ownerDocument.importNode(t,!0),a.nodeType===ct&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a),Ze(a);else{if(!ne&&!Qt&&!te&&-1===t.indexOf("<"))return wt&&ae?wt.createHTML(t):t;if(n=Fe(t),!n)return ne?null:ae?kt:""}n&&re&&Pe(n.firstChild);const c=ze(he?t:n);for(;o=c.nextNode();)Ue(o),He(o),o.content instanceof s&&Xe(o.content);if(he)return Qt&&Ke(t),t;if(ne){if(Qt&&Ke(n),ie)for(l=_t.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(jt.shadowroot||jt.shadowrootmode)&&(l=Rt.call(i,l,!0)),l}let h=te?n.outerHTML:n.innerHTML;return te&&zt["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&M(st,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),Qt&&m([It,Dt,Nt],t=>{h=E(h,t," ")}),wt&&ae?wt.createHTML(h):h},r.setConfig=function(){Me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ee=!0},r.clearConfig=function(){Ie=null,ee=!1},r.isValidAttribute=function(t,e,r){Ie||Me({});const n=Le(t),i=Le(e);return Ge(n,i,r)},r.addHook=function(t,e){"function"==typeof e&&b(Lt[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=y(Lt[t],e);return-1===r?void 0:x(Lt[t],r,1)[0]}return v(Lt[t])},r.removeHooks=function(t){Lt[t]=[]},r.removeAllHooks=function(){Lt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{default:()=>yr});var t=r(594),e=r(3283),i=r(3848),a=(r(6615),r(1334),r(2654),r(5105),r(8013),r(1240)),o=r(8221),s=r(1123),l=r(797),c=r(513),h=r(1444),u="comm",d="rule",p="decl",f="@keyframes",g="@layer",m=Math.abs,y=String.fromCharCode;Object.assign;function v(t){return t.trim()}function b(t,e,r){return t.replace(e,r)}function x(t,e){return 0|t.charCodeAt(e)}function T(t,e,r){return t.slice(e,r)}function w(t){return t.length}function k(t){return t.length}function C(t,e){return e.push(t),t}function E(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function S(t,e,r,n){switch(t.type){case g:if(t.children.length)break;case"@import":case"@namespace":case p:return t.return=t.return||t.value;case u:return"";case f:return t.return=t.value+"{"+E(t.children,n)+"}";case d:if(!w(t.value=t.props.join(",")))return""}return w(r=E(t.children,n))?t.return=t.value+"{"+r+"}":""}var _=1,A=1,R=0,L=0,I=0,D="";function N(t,e,r,n,i,a,o,s){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:_,column:A,length:o,return:"",siblings:s}}function M(){return I=L>0?x(D,--L):0,A--,10===I&&(A=1,_--),I}function O(){return I=L<R?x(D,L++):0,A++,10===I&&(A=1,_++),I}function $(){return x(D,L)}function P(){return L}function B(t,e){return T(D,t,e)}function F(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 z(t){return _=A=1,R=w(D=t),L=0,[]}function K(t){return D="",t}function j(t){return v(B(L-1,U(91===t?t+2:40===t?t+1:t)))}function q(t){for(;(I=$())&&I<33;)O();return F(t)>2||F(I)>3?"":" "}function W(t,e){for(;--e&&O()&&!(I<48||I>102||I>57&&I<65||I>70&&I<97););return B(t,P()+(e<6&&32==$()&&32==O()))}function U(t){for(;O();)switch(I){case t:return L;case 34:case 39:34!==t&&39!==t&&U(I);break;case 40:41===t&&U(t);break;case 92:O()}return L}function G(t,e){for(;O()&&t+I!==57&&(t+I!==84||47!==$()););return"/*"+B(e,L-1)+"*"+y(47===t?t:O())}function Y(t){for(;!F($());)O();return B(t,L)}function V(t){return K(H("",null,null,null,[""],t=z(t),0,[0],t))}function H(t,e,r,n,i,a,o,s,l){for(var c=0,h=0,u=o,d=0,p=0,f=0,g=1,m=1,v=1,k=0,E=0,S="",_=i,A=a,R=n,L=S;m;)switch(f=E,E=O()){case 40:108!=f&&58==x(L,u-1)?(k++,L+="("):L+=j(E);break;case 41:k--,L+=")";break;case 34:case 39:case 91:L+=j(E);break;case 9:case 10:case 13:case 32:if(k>0){L+=y(E);break}L+=q(f);break;case 92:L+=W(P()-1,7);continue;case 47:switch($()){case 42:case 47:C(Z(G(O(),P()),e,r,l),l),5!=F(f||1)&&5!=F($()||1)||!w(L)||" "===T(L,-1,void 0)||(L+=" ");break;default:L+="/"}break;case 123*g:s[c++]=w(L)*v;case 125*g:case 59:case 0:if(k>0&&E){L+=y(E);break}switch(E){case 0:case 125:m=0;case 59+h:-1==v&&(L=b(L,/\f/g,"")),p>0&&(w(L)-u||0===g)&&C(p>32?Q(L+";",n,r,u-1,l):Q(b(L," ","")+";",n,r,u-2,l),l);break;case 59:L+=";";default:if(C(R=X(L,e,r,c,h,i,s,S,_=[],A=[],u,a),a),123===E)if(0===h)H(L,e,R,R,_,a,u,s,A);else{switch(d){case 99:if(110===x(L,3))break;case 108:if(97===x(L,2))break;default:h=0;case 100:case 109:case 115:}h?H(t,R,R,n&&C(X(t,R,R,0,0,i,s,S,i,_=[],u,A),A),i,A,u,s,n?_:A):H(L,R,R,R,[""],A,0,s,A)}}c=h=p=0,g=v=1,S=L="",u=o;break;case 58:u=1+w(L),p=f;default:if(g<1)if(123==E)--g;else if(125==E&&0==g++&&125==M())continue;switch(L+=y(E),E*g){case 38:v=h>0?1:(L+="\f",-1);break;case 44:if(k>0)break;s[c++]=(w(L)-1)*v,v=1;break;case 64:45===$()&&(L+=j(O())),d=$(),h=u=w(S=L+=Y(P())),E++;break;case 45:45===f&&2==w(L)&&(g=0)}}return a}function X(t,e,r,n,i,a,o,s,l,c,h,u){for(var p=i-1,f=0===i?a:[""],g=k(f),y=0,x=0,w=0;y<n;++y)for(var C=0,E=T(t,p+1,p=m(x=o[y])),S=t;C<g;++C)(S=v(x>0?f[C]+" "+E:b(E,/&\f/g,f[C])))&&(l[w++]=S);return N(t,e,r,0===i?d:s,l,c,h,u)}function Z(t,e,r,n){return N(t,e,r,u,y(I),T(t,2,-2),0,n)}function Q(t,e,r,n,i){return N(t,e,r,p,T(t,0,n),T(t,n+1,-1),n,i)}var J=r(3047),tt=r(4608),et=r(622),rt=r(9663),nt=r(2178);function it(t){if(null==t)return!0;if((0,et.X)(t))return!!("function"==typeof t.splice||"string"==typeof t||(0,nt.P)(t)||(0,rt.i)(t)||(0,tt.N)(t))&&0===t.length;if("object"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}var at={id:"c4",detector:(0,l.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,7005));return{id:"c4",diagram:t}},"loader")},ot="flowchart",st={id:ot,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4219));return{id:ot,diagram:t}},"loader")},lt="flowchart-v2",ct={id:lt,detector:(0,l.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4219));return{id:lt,diagram:t}},"loader")},ht={id:"er",detector:(0,l.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,253));return{id:"er",diagram:t}},"loader")},ut="gitGraph",dt={id:ut,detector:(0,l.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,1795));return{id:ut,diagram:t}},"loader")},pt="gantt",ft={id:pt,detector:(0,l.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4045));return{id:pt,diagram:t}},"loader")},gt="info",mt={id:gt,detector:(0,l.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,786));return{id:gt,diagram:t}},"loader")},yt={id:"pie",detector:(0,l.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,9301));return{id:"pie",diagram:t}},"loader")},vt="quadrantChart",bt={id:vt,detector:(0,l.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8646));return{id:vt,diagram:t}},"loader")},xt="xychart",Tt={id:xt,detector:(0,l.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,5692));return{id:xt,diagram:t}},"loader")},wt="requirement",kt={id:wt,detector:(0,l.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,685));return{id:wt,diagram:t}},"loader")},Ct="sequence",Et={id:Ct,detector:(0,l.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,6246));return{id:Ct,diagram:t}},"loader")},St="class",_t={id:St,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8320));return{id:St,diagram:t}},"loader")},At="classDiagram",Rt={id:At,detector:(0,l.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2438));return{id:At,diagram:t}},"loader")},Lt="state",It={id:Lt,detector:(0,l.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8363));return{id:Lt,diagram:t}},"loader")},Dt="stateDiagram",Nt={id:Dt,detector:(0,l.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,743));return{id:Dt,diagram:t}},"loader")},Mt="journey",Ot={id:Mt,detector:(0,l.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4728));return{id:Mt,diagram:t}},"loader")},$t={draw:(0,l.K2)((e,r,n)=>{l.Rm.debug("rendering svg for syntax error\n");const i=(0,t.D)(r),a=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,s.a$)(i,100,512,!0),a.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"),a.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"),a.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"),a.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"),a.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"),a.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"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw")},Pt=$t,Bt={db:{},renderer:$t,parser:{parse:(0,l.K2)(()=>{},"parse")}},Ft="flowchart-elk",zt={id:Ft,detector:(0,l.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4219));return{id:Ft,diagram:t}},"loader")},Kt="timeline",jt={id:Kt,detector:(0,l.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,3049));return{id:Kt,diagram:t}},"loader")},qt="mindmap",Wt={id:qt,detector:(0,l.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,4799));return{id:qt,diagram:t}},"loader")},Ut="kanban",Gt={id:Ut,detector:(0,l.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,3723));return{id:Ut,diagram:t}},"loader")},Yt="sankey",Vt={id:Yt,detector:(0,l.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,7581));return{id:Yt,diagram:t}},"loader")},Ht="packet",Xt={id:Ht,detector:(0,l.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,9299));return{id:Ht,diagram:t}},"loader")},Zt="radar",Qt={id:Zt,detector:(0,l.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,6678));return{id:Zt,diagram:t}},"loader")},Jt="block",te={id:Jt,detector:(0,l.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8607));return{id:Jt,diagram:t}},"loader")},ee="treeView",re={id:ee,detector:(0,l.K2)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,3088));return{id:ee,diagram:t}},"loader")},ne="architecture",ie={id:ne,detector:(0,l.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,9557));return{id:ne,diagram:t}},"loader")},ae="eventmodeling",oe={id:ae,detector:(0,l.K2)(t=>/^\s*eventmodeling/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,1844));return{id:ae,diagram:t}},"loader")},se="ishikawa",le={id:se,detector:(0,l.K2)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,399));return{id:se,diagram:t}},"loader")},ce="venn",he={id:ce,detector:(0,l.K2)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,8105));return{id:ce,diagram:t}},"loader")},ue="treemap",de={id:ue,detector:(0,l.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,7059));return{id:ue,diagram:t}},"loader")},pe="wardley-beta",fe={id:pe,detector:(0,l.K2)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,l.K2)(async()=>{const{diagram:t}=await Promise.resolve().then(r.bind(r,2665));return{id:pe,diagram:t}},"loader")},ge=!1,me=(0,l.K2)(()=>{ge||(ge=!0,(0,s.Js)("error",Bt,t=>"error"===t.toLowerCase().trim()),(0,s.Js)("---",{db:{clear:(0,l.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,l.K2)(()=>{},"draw")},parser:{parse:(0,l.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,l.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,s.Xd)(zt,Wt,ie),(0,s.Xd)(at,Gt,Rt,_t,ht,ft,mt,yt,kt,Et,ct,st,jt,dt,Nt,It,Ot,bt,Vt,Xt,Tt,te,oe,re,Qt,le,de,he,fe))},"addDiagrams"),ye=(0,l.K2)(async()=>{l.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(s.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,s.Gs)(t)}catch{try{const{diagram:t,id:n}=await r();(0,s.Js)(n,t,e)}catch(n){throw l.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete s.mW[t],n}}}))).filter(t=>"rejected"===t.status);if(t.length>0){l.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)l.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function ve(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function be(t,e,r,n){if(void 0!==t.insert){if(r){const e=`chart-desc-${n}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${n}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,l.K2)(ve,"setA11yDiagramInfo"),(0,l.K2)(be,"addSVGa11yTitleDescription");var xe=class t{constructor(t,e,r,n,i){this.type=t,this.text=e,this.db=r,this.parser=n,this.renderer=i}static{(0,l.K2)(this,"Diagram")}static async fromText(e,r={}){const n=(0,s.zj)(),i=(0,s.Ch)(e,n);e=(0,o.C4)(e)+"\n";try{(0,s.Gs)(i)}catch{const t=(0,s.J$)(i);if(!t)throw new s.C0(`Diagram ${i} not found.`);const{id:e,diagram:r}=await t();(0,s.Js)(e,r)}const{db:a,parser:l,renderer:c,init:h}=(0,s.Gs)(i);return l.parser&&(l.parser.yy=a),a.clear?.(),h?.(n),r.title&&a.setDiagramTitle?.(r.title),await l.parse(e),new t(i,e,a,l,c)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Te=[],we=(0,l.K2)(()=>{Te.forEach(t=>{t()}),Te=[]},"attachFunctions"),ke=(0,l.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ce(t){const r=t.match(s.EJ);if(!r)return{text:t,metadata:{}};let n=(0,e.H)(r[1],{schema:e.r})??{};n="object"!=typeof n||Array.isArray(n)?{}:n;const i={};return n.displayMode&&(i.displayMode=n.displayMode.toString()),n.title&&(i.title=n.title.toString()),n.config&&(i.config=n.config),{text:t.slice(r[0].length),metadata:i}}(0,l.K2)(Ce,"extractFrontMatter");var Ee=(0,l.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Se=(0,l.K2)(t=>{const{text:e,metadata:r}=Ce(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),_e=(0,l.K2)(t=>{const e=o._K.detectInit(t)??{},r=o._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,o.vU)(t),directive:e}},"processDirectives");function Ae(t){const e=Ee(t),r=Se(e),n=_e(r.text),i=(0,o.$t)(r.config,n.directive);return{code:t=ke(n.text),title:r.title,config:i}}function Re(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,l.K2)(Ae,"preprocessDiagram"),(0,l.K2)(Re,"toBase64");var Le=["foreignobject"],Ie=["dominant-baseline"];function De(t){const e=Ae(t);return(0,s.cL)(),(0,s.xA)(e.config??{}),e}async function Ne(t,e){me();try{const{code:e,config:r}=De(t);return{diagramType:(await Ue(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}}(0,l.K2)(De,"processAndSetConfigs"),(0,l.K2)(Ne,"parse");var Me=(0,l.K2)((t,e,r=[])=>`.${t} ${e} ${(0,s.Df)(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),Oe=(0,l.K2)((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const n=(0,s.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{it(t.styles)||n.forEach(e=>{r.insertRule(Me(t.id,e,t.styles),r.cssRules.length)}),it(t.textStyles)||r.insertRule(Me(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let n="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),n=(0,s.KG)(e)+"\n"}else n+=`${t.themeCSS}\n`;return n+(0,s.KG)(r)},"createCssStyles"),$e=(0,l.K2)((t,e)=>{return E(V(`${t}{${e}}`),(n=k(r=[(0,l.K2)(function(e,r,n,i){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===f)return;e.props=e.props.map(e=>e.startsWith(t)?e:`${t} ${e}`)}else e.type.startsWith("@")&&(["@media","@supports",g,"@scope","@container","@starting-style",f].includes(e.type)||(l.Rm.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=u))},"addNamespace"),S]),function(t,e,i,a){for(var o="",s=0;s<n;s++)o+=r[s](t,e,i,a)||"";return o}));var r,n},"compileCSS"),Pe=(0,l.K2)((t,e,r,n)=>{const i=Oe(t,r),a=(0,s.tM)(e,i,{...t.themeVariables,theme:t.theme,look:t.look},n);return $e(n,a)},"createUserStyles"),Be=(0,l.K2)((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(0,o.Sm)(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),Fe=(0,l.K2)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${Re(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),ze=(0,l.K2)((t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return i&&o.attr("xmlns:xlink",i),o.append("g"),t},"appendDivSvgG");function Ke(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,l.K2)(Ke,"sandboxedIframe");var je=(0,l.K2)((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),qe=(0,l.K2)(async function(t,e,r){me();const n=De(e);e=n.code;const i=(0,s.zj)();l.Rm.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const a=`#${t}`,o="i"+t,c="#"+o,u="d"+t,d="#"+u,p=(0,l.K2)(()=>{const t=g?c:d,e=(0,h.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let f=(0,h.Ltv)(document.body);const g="sandbox"===i.securityLevel,m="loose"===i.securityLevel,y=i.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),g){const t=Ke((0,h.Ltv)(r),o);f=(0,h.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=(0,h.Ltv)(r);ze(f,t,u,`font-family: ${y}`,"http://www.w3.org/1999/xlink")}else{if(je(document,t,u,o),g){const t=Ke((0,h.Ltv)(document.body),o);f=(0,h.Ltv)(t.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=(0,h.Ltv)("body");ze(f,t,u)}let v,b;try{v=await xe.fromText(e,{title:n.title})}catch(I){if(i.suppressErrorRendering)throw p(),I;v=await xe.fromText("error"),b=I}const x=f.select(d).node(),T=v.type,w=x.firstChild,k=w.firstChild,C=v.renderer.getClasses?.(e,v),E=Pe(i,T,C,a),S=document.createElement("style");S.innerHTML=E,w.insertBefore(S,k);try{await v.renderer.draw(e,t,"11.15.0",v)}catch(D){throw i.suppressErrorRendering?p():Pt.draw(e,t,"11.15.0"),D}const _=f.select(`${d} svg`),A=v.db.getAccTitle?.(),R=v.db.getAccDescription?.();Ge(T,_,A,R),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=f.select(d).node().innerHTML;if(l.Rm.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),L=Be(L,g,(0,s._3)(i.arrowMarkerAbsolute)),g){const t=f.select(d+" svg").node();L=Fe(L,t)}else m||(L=J.A.sanitize(L,{ADD_TAGS:Le,ADD_ATTR:Ie,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(we(),b)throw b;return p(),{diagramType:T,svg:L,bindFunctions:v.db.bindFunctions}},"render");function We(t={}){const e=(0,s.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,s.wZ)(e),e?.theme&&e.theme in s.H$?e.themeVariables=s.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=s.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,s.UU)(e):(0,s.Q2)();(0,l.He)(r.logLevel),me()}(0,l.K2)(We,"initialize");var Ue=(0,l.K2)((t,e={})=>{const{code:r}=Ae(t);return xe.fromText(r,e)},"getDiagramFromText");function Ge(t,e,r,n){ve(e,t),be(e,r,n,e.attr("id"))}(0,l.K2)(Ge,"addA11yInfo");var Ye=Object.freeze({render:qe,parse:Ne,getDiagramFromText:Ue,initialize:We,getConfig:s.zj,setConfig:s.Nk,getSiteConfig:s.Q2,updateSiteConfig:s.B6,reset:(0,l.K2)(()=>{(0,s.cL)()},"reset"),globalReset:(0,l.K2)(()=>{(0,s.cL)(s.sb)},"globalReset"),defaultConfig:s.sb});(0,l.He)((0,s.zj)().logLevel),(0,s.cL)((0,s.zj)());var Ve=(0,l.K2)((t,e,r)=>{l.Rm.warn(t),(0,o.dq)(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}))},"handleError"),He=(0,l.K2)(async function(t={querySelector:".mermaid"}){try{await Xe(t)}catch(e){if((0,o.dq)(e)&&l.Rm.error(e.str),lr.parseError&&lr.parseError(e),!t.suppressErrors)throw l.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Xe=(0,l.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Ye.getConfig();let i;if(l.Rm.debug((t?"":"No ")+"Callback function found"),r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}l.Rm.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(l.Rm.debug("Start On Load: "+n?.startOnLoad),Ye.updateSiteConfig({startOnLoad:n?.startOnLoad}));const a=new o._K.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const h=[];for(const d of Array.from(i)){if(l.Rm.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;s=d.innerHTML,s=(0,c.T)(o._K.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const r=o._K.detectInit(s);r&&l.Rm.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:n}=await or(e,s,d);d.innerHTML=r,t&&await t(e),n&&n(d)}catch(u){Ve(u,h,lr.parseError)}}if(h.length>0)throw h[0]},"runThrowsErrors"),Ze=(0,l.K2)(function(t){Ye.initialize(t)},"initialize"),Qe=(0,l.K2)(async function(t,e,r){l.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Ze(t);const n={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await He(n)},"init"),Je=(0,l.K2)(async(t,{lazyLoad:e=!0}={})=>{me(),(0,s.Xd)(...t),!1===e&&await ye()},"registerExternalDiagrams"),tr=(0,l.K2)(function(){if(lr.startOnLoad){const{startOnLoad:t}=Ye.getConfig();t&&lr.run().catch(t=>l.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",tr,!1);var er=(0,l.K2)(function(t){lr.parseError=t},"setParseErrorHandler"),rr=[],nr=!1,ir=(0,l.K2)(async()=>{if(!nr){for(nr=!0;rr.length>0;){const e=rr.shift();if(e)try{await e()}catch(t){l.Rm.error("Error executing queue",t)}}nr=!1}},"executeQueue"),ar=(0,l.K2)(async(t,e)=>new Promise((r,n)=>{const i=(0,l.K2)(()=>new Promise((i,a)=>{Ye.parse(t,e).then(t=>{i(t),r(t)},t=>{l.Rm.error("Error parsing",t),lr.parseError?.(t),a(t),n(t)})}),"performCall");rr.push(i),ir().catch(n)}),"parse"),or=(0,l.K2)((t,e,r)=>new Promise((n,i)=>{const a=(0,l.K2)(()=>new Promise((a,o)=>{Ye.render(t,e,r).then(t=>{a(t),n(t)},t=>{l.Rm.error("Error parsing",t),lr.parseError?.(t),o(t),i(t)})}),"performCall");rr.push(a),ir().catch(i)}),"render"),sr=(0,l.K2)(()=>Object.keys(s.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),lr={startOnLoad:!0,mermaidAPI:Ye,parse:ar,render:or,init:Qe,run:He,registerExternalDiagrams:Je,registerLayoutLoaders:i.sO,initialize:Ze,parseError:void 0,contentLoaded:tr,setParseErrorHandler:er,detectType:s.Ch,registerIconPacks:a.pC,getRegisteredDiagramsMetadata:sr},cr=lr,hr=function(t,e,r,n){return new(r||(r=Promise))(function(i,a){function o(t){try{l(n.next(t))}catch(e){a(e)}}function s(t){try{l(n.throw(t))}catch(e){a(e)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(o,s)}l((n=n.apply(t,e||[])).next())})},ur=function(t,e){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(l){s=[6,l],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},dr="gantt",pr=/^\s*gantt(?:\s|$)/i;function fr(t){t.style.maxWidth="100%"}function gr(t){return hr(this,void 0,void 0,function(){var e;return ur(this,function(r){switch(r.label){case 0:return(e=t.querySelectorAll(".mermaid")).forEach(function(t){(function(t){var e;return pr.test(null!==(e=t.textContent)&&void 0!==e?e:"")})(t)&&(t.dataset.mermaidDiagram=dr)}),[4,cr.init({},e)];case 1:return r.sent(),function(t){t.querySelectorAll('.mermaid[data-mermaid-diagram="'.concat(dr,'"]')).forEach(function(t){if(t instanceof SVGSVGElement)fr(t);else{var e=t.querySelector("svg");e instanceof SVGSVGElement&&fr(e)}}),t.querySelectorAll(".mermaid svg, svg.mermaid").forEach(function(t){null!==t.querySelector(".sectionTitle, .taskText, .taskTextOutsideLeft, .taskTextOutsideRight, .grid")&&fr(t)})}(t),e.forEach(function(t){return t.classList.add("content-center")}),[2]}})})}function mr(t){gr(t).catch(function(){})}const yr={initMermaid:function(){mr(document),document.querySelectorAll(".pluggable").forEach(function(t){return t.addEventListener("onPluginReady",function(){mr(t)})})}}})(),window.__DOCS_MERMAID__=n})(); |