((() => { 'use strict'; requirejs.config(window.getRequirejsCDN()); requirejs([ 'interface/Interface', 'sequence/SequenceDiagram', ], ( Interface, SequenceDiagram ) => { const defaultCode = ( 'title Labyrinth\n' + '\n' + 'Bowie -> Goblin: You remind me of the babe\n' + 'Goblin -> Bowie: What babe?\n' + 'Bowie -> Goblin: The babe with the power\n' + 'Goblin -> Bowie: What power?\n' + 'note right of Bowie, Goblin: Most people get muddled here!\n' + 'Bowie -> Goblin: \'The power of voodoo\'\n' + 'Goblin -> Bowie: "Who-do?"\n' + 'Bowie -> Goblin: You do!\n' + 'Goblin -> Bowie: Do what?\n' + 'Bowie -> Goblin: Remind me of the babe!\n' + '\n' + 'Bowie -> Audience: Sings\n' + '\n' + 'terminators box\n' ); const library = [ { title: 'Simple arrow', code: '{Agent1} -> {Agent2}: {Message}', }, { title: 'Arrow with dotted line', code: '{Agent1} --> {Agent2}: {Message}', }, { title: 'Open arrow', code: '{Agent1} ->> {Agent2}: {Message}', }, { title: 'Wavy line', code: '{Agent1} ~> {Agent2}: {Message}', }, { title: 'Self-connection', code: '{Agent1} -> {Agent1}: {Message}', }, { title: 'Request/response pair', code: ( '{Agent1} -> +{Agent2}: {Request}\n' + '{Agent1} <-- -{Agent2}: {Response}' ), }, { title: 'Inline agent creation / destruction', code: ( '{Agent1} -> *{Agent2}: {Request}\n' + '{Agent1} <-- !{Agent2}: {Response}' ), }, { title: 'Agent creation / destruction', code: ( '{Agent1} -> {Agent2}: {Request}\n' + '{Agent1} <-- {Agent2}: {Response}\n' + 'end {Agent2}' ), preview: ( 'begin A\n' + '::\n' + 'A -> B: Request\n' + 'A <-- B: Response\n' + 'end B' ), }, { title: 'Numbered labels', code: 'autolabel "[]