 'black', strokeWidth: 1.5 }),
        new go.Shape({ toArrow: 'Standard', strokeWidth: 0 }),
        new go.TextBlock({
          segmentFraction: 0.5,
          segmentOffset: new go.Point(-10, 0),
          editable: true
        })
          .bindTwoWay('text')
          .bind('background', 'text', (t) => (t ? 'white' : null))
          .bindObject('segmentIndex', 'fromNode', (n) => (n.category === 'If' ? 1 : n.category === 'Switch' ? -2 : -Infinity))
      );

    function isLoopBack(link) {
      if (