{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-constraints/src/components/demo/lively-petrinet-transition.js"],"names":["Morph","Helper","LivelyPetrinetTransition","initialize","componentId","getRandomId","windowTitle","registerButtons","inputLabel","get","addEventListener","evt","onLabelChange","label","getAttribute","value","id","setAttribute","graphicElement"],"mappings":";;;;;;AAAOA,W;;AACCC,Y,4CAAAA,M;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,YAAMC,wBAAN,SAAuCF,KAAvC,CAA6C;;AAG1DG,qBAAa;AACX,cAAI,CAAC,KAAKC,WAAV,EAAuB;AACrB,iBAAKA,WAAL,GAAmBH,OAAOI,WAAP,EAAnB;AACD;AACD,eAAKC,WAAL,GAAmB,0BAAnB;AACA,eAAKC,eAAL;;AAEA,gBAAMC,aAAa,KAAKC,GAAL,CAAS,aAAT,CAAnB;;AAEA;;AAEAD,qBAAWE,gBAAX,CAA4B,QAA5B,EAAuCC,GAAD,IAAS,KAAKC,aAAL,CAAmBD,GAAnB,CAA/C;;AAEA;;AAEA,gBAAME,QAAQ,KAAKC,YAAL,CAAkB,OAAlB,CAAd;;AAEA,cAAID,KAAJ,EAAW;AACTL,uBAAWO,KAAX,GAAmBF,KAAnB;AACD;AAGF;;AAGD,YAAIT,WAAJ,GAAkB;AAChB,iBAAO,KAAKU,YAAL,CAAkB,aAAlB,CAAP;AACD;;AAED,YAAIV,WAAJ,CAAgBY,EAAhB,EAAoB;AAClB,eAAKC,YAAL,CAAkB,aAAlB,EAAiCD,EAAjC;AACD;;AAEDJ,sBAAcD,GAAd,EAAmB;AACjB,eAAKM,YAAL,CAAkB,OAAlB,EAA2B,KAAKR,GAAL,CAAS,aAAT,EAAwBM,KAAnD;AACD;;AAMDG,yBAAiB;AACf,iBAAO,KAAKT,GAAL,CAAS,aAAT,CAAP;AACD;;AA9CyD;;yBAAvCP,wB","file":"lively-petrinet-transition.js","sourcesContent":["import Morph from \"src/components/widgets/lively-morph.js\"\nimport {Helper} from \"src/components/demo/lively-petrinet-helper.js\"\n\nexport default class LivelyPetrinetTransition extends Morph {\n  \n\n  initialize() {\n    if (!this.componentId) {\n      this.componentId = Helper.getRandomId();\n    }\n    this.windowTitle = \"LivelyPetrinetTransition\";\n    this.registerButtons();\n    \n    const inputLabel = this.get(\"#inputLabel\");\n    \n    // Register Listeners\n    \n    inputLabel.addEventListener(\"change\", (evt) => this.onLabelChange(evt));\n    \n    // Initialize Displayed Values\n    \n    const label = this.getAttribute(\"label\")\n    \n    if (label) {\n      inputLabel.value = label;\n    }\n    \n    \n  } \n  \n  \n  get componentId() {\n    return this.getAttribute(\"componentId\");\n  }\n\n  set componentId(id) {\n    this.setAttribute(\"componentId\", id);\n  }\n  \n  onLabelChange(evt) {\n    this.setAttribute(\"label\", this.get(\"#inputLabel\").value);\n  } \n  \n  \n  \n  \n  \n  graphicElement() {\n    return this.get(\"#transition\");\n  }\n  \n}"]}