"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[161],{7161:(e,t,s)=>{s.d(t,{diagram:()=>N});var o=s(77415),a=s(45625),r=s(74309),i=s(31460),n=s(62335);s(93628),s(17967),s(27856),s(29451),s(69368);const d="rect",c="rectWithTitle",l="statediagram",p=`${l}-state`,b="transition",g=`${b} note-edge`,h=`${l}-note`,u=`${l}-cluster`,y=`${l}-cluster-alt`,f="parent",w="note",x="----",$=`${x}${w}`,m=`${x}${f}`,T="fill:none",S="fill: #333",k="text",D="normal";let A={},v=0;function B(e="",t=0,s="",o=x){return`state-${e}${null!==s&&s.length>0?`${o}${s}`:""}-${t}`}const E=(e,t,s,a,r,n)=>{const l=s.id,b=null==(x=a[l])?"":x.classes?x.classes.join(" "):"";var x;if("root"!==l){let t=d;!0===s.start&&(t="start"),!1===s.start&&(t="end"),s.type!==o.D&&(t=s.type),A[l]||(A[l]={id:l,shape:t,description:i.e.sanitizeText(l,(0,i.c)()),classes:`${b} ${p}`});const a=A[l];s.description&&(Array.isArray(a.description)?(a.shape=c,a.description.push(s.description)):a.description.length>0?(a.shape=c,a.description===l?a.description=[s.description]:a.description=[a.description,s.description]):(a.shape=d,a.description=s.description),a.description=i.e.sanitizeTextOrArray(a.description,(0,i.c)())),1===a.description.length&&a.shape===c&&(a.shape=d),!a.type&&s.doc&&(i.l.info("Setting cluster for ",l,R(s)),a.type="group",a.dir=R(s),a.shape=s.type===o.a?"divider":"roundedWithTitle",a.classes=a.classes+" "+u+" "+(n?y:""));const r={labelStyle:"",shape:a.shape,labelText:a.description,classes:a.classes,style:"",id:l,dir:a.dir,domId:B(l,v),type:a.type,padding:15,centerLabel:!0};if(s.note){const t={labelStyle:"",shape:"note",labelText:s.note.text,classes:h,style:"",id:l+$+"-"+v,domId:B(l,v,w),type:a.type,padding:15},o={labelStyle:"",shape:"noteGroup",labelText:s.note.text,classes:a.classes,style:"",id:l+m,domId:B(l,v,f),type:"group",padding:0};v++;const i=l+m;e.setNode(i,o),e.setNode(t.id,t),e.setNode(l,r),e.setParent(l,i),e.setParent(t.id,i);let n=l,d=t.id;"left of"===s.note.position&&(n=t.id,d=l),e.setEdge(n,d,{arrowhead:"none",arrowType:"",style:T,labelStyle:"",classes:g,arrowheadStyle:S,labelpos:"c",labelType:k,thickness:D})}else e.setNode(l,r)}t&&"root"!==t.id&&(i.l.trace("Setting node ",l," to be child of its parent ",t.id),e.setParent(l,t.id)),s.doc&&(i.l.trace("Adding nodes children "),C(e,s,s.doc,a,r,!n))},C=(e,t,s,a,r,n)=>{i.l.trace("items",s),s.forEach((s=>{switch(s.stmt){case o.b:case o.D:E(e,t,s,a,r,n);break;case o.S:{E(e,t,s.state1,a,r,n),E(e,t,s.state2,a,r,n);const o={id:"edge"+v,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:T,labelStyle:"",label:i.e.sanitizeText(s.description,(0,i.c)()),arrowheadStyle:S,labelpos:"c",labelType:k,thickness:D,classes:b};e.setEdge(s.state1.id,s.state2.id,o,v),v++}}}))},R=(e,t=o.c)=>{let s=t;if(e.doc)for(let t=0;t{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,o.d.clear()}}}}]);