You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
25 KiB
1 line
25 KiB
"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[9784],{23242:(Ut,tt,b)=>{b.d(tt,{j:()=>St,q:()=>et});var R=b(3685),L=b(31083),et=(0,R.eW)((g,E)=>{let m;return"sandbox"===E&&(m=(0,L.Ys)("#i"+g)),("sandbox"===E?(0,L.Ys)(m.nodes()[0].contentDocument.body):(0,L.Ys)("body")).select(`[id="${g}"]`)},"getDiagramElement"),St=(0,R.eW)((g,E,m,N)=>{g.attr("class",m);const{width:n,height:st,x:ut,y:dt}=Dt(g,E);(0,R.v2)(g,st,n,N);const V=Rt(ut,dt,n,st,E);g.attr("viewBox",V),R.cM.debug(`viewBox configured: ${V} with padding: ${E}`)},"setupViewPortForSVG"),Dt=(0,R.eW)((g,E)=>{const m=g.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:m.width+2*E,height:m.height+2*E,x:m.x,y:m.y}},"calculateDimensionsWithPadding"),Rt=(0,R.eW)((g,E,m,N,n)=>`${g-n} ${E-n} ${m} ${N}`,"createViewBox")},49784:(Ut,tt,b)=>{var U;b.r(tt),b.d(tt,{diagram:()=>Ht});var R=b(53420),L=b(23242),et=b(76794),N=(b(79487),b(11930),b(9681),b(25333),b(77437),b(50027),b(62477)),n=b(3685),st=b(31083),ut=b(84647),dt=b(29016),V=function(){var s=(0,n.eW)(function(C,a,c,o){for(c=c||{},o=C.length;o--;c[C[o]]=a);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],l=[1,10],_=[1,11],h=[1,12],u=[1,13],f=[1,20],x=[1,21],O=[1,22],S=[1,23],K=[1,24],M=[1,19],j=[1,25],_t=[1,26],P=[1,18],w=[1,33],Z=[1,34],bt=[1,35],ft=[1,36],yt=[1,37],It=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],A=[1,42],I=[1,43],G=[1,52],z=[40,50,68,69],Q=[1,63],H=[1,61],v=[1,58],J=[1,62],X=[1,64],it=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],vt=[63,64,65,66,67],Ct=[1,81],Nt=[1,80],xt=[1,78],Mt=[1,79],Pt=[6,10,42,47],Y=[6,10,13,41,42,47,48,49],rt=[1,89],nt=[1,88],at=[1,87],q=[19,56],Bt=[1,98],Wt=[1,97],pt=[19,56,58,60],kt={trace:(0,n.eW)(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,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$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",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"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],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:(0,n.eW)(function(a,c,o,r,d,t,$){var e=t.length-1;switch(d){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=t[e];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 44:case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:case 67:this.$=t[e].replace(/"/g,"");break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:l,24:_,26:h,28:u,29:14,30:15,31:16,32:17,33:f,34:x,35:O,36:S,37:K,40:M,43:j,44:_t,50:P},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:l,24:_,26:h,28:u,29:14,30:15,31:16,32:17,33:f,34:x,35:O,36:S,37:K,40:M,43:j,44:_t,50:P},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:w,64:Z,65:bt,66:ft,67:yt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(It,[2,54]),s(It,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:A,41:I},{16:44,40:A,41:I},{16:45,40:A,41:I},s(i,[2,4]),{11:46,40:M,50:P},{16:47,40:A,41:I},{18:48,19:[1,49],51:50,52:51,56:G},{11:53,40:M,50:P},{62:54,68:[1,55],69:[1,56]},s(z,[2,69]),s(z,[2,70]),s(z,[2,71]),s(z,[2,72]),s(z,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:Q,38:57,41:H,42:v,45:59,46:60,48:J,49:X},s(it,[2,37]),s(it,[2,38]),{16:65,40:A,41:I,42:v},{13:Q,38:66,41:H,42:v,45:59,46:60,48:J,49:X},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:v,63:w,64:Z,65:bt,66:ft,67:yt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:G},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:w,64:Z,65:bt,66:ft,67:yt},s(vt,[2,74]),s(vt,[2,75]),{6:Ct,10:Nt,39:77,42:xt,47:Mt},{40:[1,82],41:[1,83]},s(Pt,[2,43],{46:84,13:Q,41:H,48:J,49:X}),s(Y,[2,45]),s(Y,[2,50]),s(Y,[2,51]),s(Y,[2,52]),s(Y,[2,53]),s(i,[2,41],{42:v}),{6:Ct,10:Nt,39:85,42:xt,47:Mt},{14:86,40:rt,50:nt,70:at},{16:90,40:A,41:I},{11:91,40:M,50:P},{18:92,19:[1,93],51:50,52:51,56:G},s(i,[2,12]),{19:[2,57]},s(q,[2,58],{54:94,55:95,57:96,59:Bt,60:Wt}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:Q,41:H,45:101,46:60,48:J,49:X},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(it,[2,39]),s(it,[2,40]),s(Y,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:v},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(q,[2,59],{55:106,58:[1,107],60:Wt}),s(q,[2,60]),s(pt,[2,64]),s(q,[2,67]),s(pt,[2,66]),{18:108,19:[1,109],51:50,52:51,56:G},{16:110,40:A,41:I},s(Pt,[2,44],{46:84,13:Q,41:H,48:J,49:X}),{14:111,40:rt,50:nt,70:at},{16:112,40:A,41:I},{14:113,40:rt,50:nt,70:at},s(i,[2,13]),s(q,[2,61]),{57:114,59:Bt},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:v}),s(i,[2,11]),{13:[1,117],42:v},s(i,[2,10]),s(pt,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:G},{14:120,40:rt,50:nt,70:at},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:(0,n.eW)(function(a,c){if(!c.recoverable){var o=new Error(a);throw o.hash=c,o}this.trace(a)},"parseError"),parse:(0,n.eW)(function(a){var c=this,o=[0],r=[],d=[null],t=[],$=this.table,e="",ot=0,Lt=0,Vt=0,Xt=2,wt=1,qt=t.slice.call(arguments,1),y=Object.create(this.lexer),B={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(B.yy[gt]=this.yy[gt]);y.setInput(a,B.yy),B.yy.lexer=y,B.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Et=y.yylloc;t.push(Et);var $t=y.options&&y.options.ranges;function te(k){o.length=o.length-2*k,d.length=d.length-k,t.length=t.length-k}function Yt(){var k;return"number"!=typeof(k=r.pop()||y.lex()||wt)&&(k instanceof Array&&(k=(r=k).pop()),k=c.symbols_[k]||k),k}"function"==typeof B.yy.parseError?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.eW)(te,"popStack"),(0,n.eW)(Yt,"lex");for(var p,mt,W,T,Ot,lt,D,Ft,ht,F={};;){if(W=o[o.length-1],this.defaultActions[W]?T=this.defaultActions[W]:((null===p||typeof p>"u")&&(p=Yt()),T=$[W]&&$[W][p]),typeof T>"u"||!T.length||!T[0]){var Tt="";for(lt in ht=[],$[W])this.terminals_[lt]&<>Xt&&ht.push("'"+this.terminals_[lt]+"'");Tt=y.showPosition?"Parse error on line "+(ot+1)+":\n"+y.showPosition()+"\nExpecting "+ht.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(ot+1)+": Unexpected "+(p==wt?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(Tt,{text:y.match,token:this.terminals_[p]||p,line:y.yylineno,loc:Et,expected:ht})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+p);switch(T[0]){case 1:o.push(p),d.push(y.yytext),t.push(y.yylloc),o.push(T[1]),p=null,mt?(p=mt,mt=null):(Lt=y.yyleng,e=y.yytext,ot=y.yylineno,Et=y.yylloc,Vt>0&&Vt--);break;case 2:if(D=this.productions_[T[1]][1],F.$=d[d.length-D],F._$={first_line:t[t.length-(D||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(D||1)].first_column,last_column:t[t.length-1].last_column},$t&&(F._$.range=[t[t.length-(D||1)].range[0],t[t.length-1].range[1]]),typeof(Ot=this.performAction.apply(F,[e,Lt,ot,B.yy,T[1],d,t].concat(qt)))<"u")return Ot;D&&(o=o.slice(0,-1*D*2),d=d.slice(0,-1*D),t=t.slice(0,-1*D)),o.push(this.productions_[T[1]][0]),d.push(F.$),t.push(F._$),Ft=$[o[o.length-2]][o[o.length-1]],o.push(Ft);break;case 3:return!0}}return!0},"parse")},Jt=function(){return{EOF:1,parseError:(0,n.eW)(function(c,o){if(!this.yy.parser)throw new Error(c);this.yy.parser.parseError(c,o)},"parseError"),setInput:(0,n.eW)(function(a,c){return this.yy=c||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,n.eW)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,n.eW)(function(a){var c=a.length,o=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=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),o.length-1&&(this.yylineno-=o.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:(0,n.eW)(function(){return this._more=!0,this},"more"),reject:(0,n.eW)(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,n.eW)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,n.eW)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,n.eW)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,n.eW)(function(){var a=this.pastInput(),c=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:(0,n.eW)(function(a,c){var o,r,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),(r=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],o=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var t in d)this[t]=d[t];return!1}return!1},"test_match"),next:(0,n.eW)(function(){if(this.done)return this.EOF;var a,c,o,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),t=0;t<d.length;t++)if((o=this._input.match(this.rules[d[t]]))&&(!c||o[0].length>c[0].length)){if(c=o,r=t,this.options.backtrack_lexer){if(!1!==(a=this.test_match(o,d[t])))return a;if(this._backtrack){c=!1;continue}return!1}if(!this.options.flex)break}return c?!1!==(a=this.test_match(c,d[r]))&&a:""===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,n.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,n.eW)(function(c){this.conditionStack.push(c)},"begin"),popState:(0,n.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,n.eW)(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,n.eW)(function(c){return(c=this.conditionStack.length-1-Math.abs(c||0))>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:(0,n.eW)(function(c){this.begin(c)},"pushState"),stateStackSize:(0,n.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.eW)(function(c,o,r,d){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 70;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 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return o.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 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74: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,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],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,71,72,73,74],inclusive:!0}}}}();function ct(){this.yy={}}return kt.lexer=Jt,(0,n.eW)(ct,"Parser"),ct.prototype=kt,kt.Parser=ct,new ct}();V.parser=V;var Kt=V,jt=(U=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=n.GN,this.getAccTitle=n.eu,this.setAccDescription=n.U$,this.getAccDescription=n.Mx,this.setDiagramTitle=n.g2,this.getDiagramTitle=n.Kr,this.getConfig=(0,n.eW)(()=>(0,n.nV)().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)}addEntity(i,l=""){return this.entities.has(i)?!this.entities.get(i)?.alias&&l&&(this.entities.get(i).alias=l,n.cM.info(`Add alias '${l}' to entity '${i}'`)):(this.entities.set(i,{id:`entity-${i}-${this.entities.size}`,label:i,attributes:[],alias:l,shape:"erBox",look:(0,n.nV)().look??"default",cssClasses:"default",cssStyles:[]}),n.cM.info("Added new entity :",i)),this.entities.get(i)}getEntity(i){return this.entities.get(i)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(i,l){const _=this.addEntity(i);let h;for(h=l.length-1;h>=0;h--)l[h].keys||(l[h].keys=[]),l[h].comment||(l[h].comment=""),_.attributes.push(l[h]),n.cM.debug("Added attribute ",l[h].name)}addRelationship(i,l,_,h){const u=this.entities.get(i),f=this.entities.get(_);if(!u||!f)return;const x={entityA:u.id,roleA:l,entityB:f.id,relSpec:h};this.relationships.push(x),n.cM.debug("Added new relationship :",x)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(i){this.direction=i}getCompiledStyles(i){let l=[];for(const _ of i){const h=this.classes.get(_);h?.styles&&(l=[...l,...h.styles??[]].map(u=>u.trim())),h?.textStyles&&(l=[...l,...h.textStyles??[]].map(u=>u.trim()))}return l}addCssStyles(i,l){for(const _ of i){const h=this.entities.get(_);if(!l||!h)return;for(const u of l)h.cssStyles.push(u)}}addClass(i,l){i.forEach(_=>{let h=this.classes.get(_);void 0===h&&(h={id:_,styles:[],textStyles:[]},this.classes.set(_,h)),l&&l.forEach(function(u){if(/color/.exec(u)){const f=u.replace("fill","bgFill");h.textStyles.push(f)}h.styles.push(u)})})}setClass(i,l){for(const _ of i){const h=this.entities.get(_);if(h)for(const u of l)h.cssClasses+=" "+u}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,n.ZH)()}getData(){const i=[],l=[],_=(0,n.nV)();for(const u of this.entities.keys()){const f=this.entities.get(u);f&&(f.cssCompiledStyles=this.getCompiledStyles(f.cssClasses.split(" ")),i.push(f))}let h=0;for(const u of this.relationships){const f={id:(0,N.Ln)(u.entityA,u.entityB,{prefix:"id",counter:h++}),type:"normal",curve:"basis",start:u.entityA,end:u.entityB,label:u.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:u.relSpec.cardB.toLowerCase(),arrowTypeEnd:u.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==u.relSpec.relType?"solid":"dashed",look:_.look};l.push(f)}return{nodes:i,edges:l,other:{},config:_,direction:"TB"}}},__name(U,"ErDB"),U),At={};(0,n.r2)(At,{draw:()=>Zt});var Zt=(0,n.eW)(function(){var s=(0,R.Z)(function*(i,l,_,h){n.cM.info("REF0:"),n.cM.info("Drawing er diagram (unified)",l);const{securityLevel:u,er:f,layout:x}=(0,n.nV)(),O=h.db.getData(),S=(0,L.q)(l,u);O.type=h.type,O.layoutAlgorithm=(0,et._b)(x),O.config.flowchart.nodeSpacing=f?.nodeSpacing||140,O.config.flowchart.rankSpacing=f?.rankSpacing||80,O.direction=h.db.getDirection(),O.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],O.diagramId=l,yield(0,et.sY)(O,S),"elk"===O.layoutAlgorithm&&S.select(".edges").lower();const K=S.selectAll('[id*="-background"]');Array.from(K).length>0&&K.each(function(){const j=(0,st.Ys)(this),P=j.attr("id").replace("-background",""),w=S.select(`#${CSS.escape(P)}`);if(!w.empty()){const Z=w.attr("transform");j.attr("transform",Z)}});N.w8.insertTitle(S,"erDiagramTitleText",f?.titleTopMargin??25,h.db.getDiagramTitle()),(0,L.j)(S,8,"erDiagram",f?.useMaxWidth??!0)});return function(i,l,_,h){return s.apply(this,arguments)}}(),"draw"),Gt=(0,n.eW)((s,i)=>{const l=ut.Z,_=l(s,"r"),h=l(s,"g"),u=l(s,"b");return dt.Z(_,h,u,i)},"fade"),Ht={parser:Kt,get db(){return new jt},renderer:At,styles:(0,n.eW)(s=>`\n .entityBox {\n fill: ${s.mainBkg};\n stroke: ${s.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${s.tertiaryColor};\n opacity: 0.7;\n background-color: ${s.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${Gt(s.tertiaryColor,.5)};\n }\n\n .edgeLabel .label {\n fill: ${s.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${s.fontFamily};\n color: ${s.nodeTextColor||s.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: ${s.mainBkg};\n stroke: ${s.nodeBorder};\n stroke-width: 1px;\n }\n\n .relationshipLine {\n stroke: ${s.lineColor};\n stroke-width: 1;\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${s.lineColor} !important;\n stroke-width: 1;\n }\n`,"getStyles")}}}]); |