'use strict'; // Linked Monitors editor: round trip of an existing expression through // expr_to_ui()/ui_to_expr() with a minimal jQuery stand-in that follows // jQuery's select semantics (val() is null when no option matches). const assert = require('assert'); const fs = require('fs'); const path = require('path'); const vm = require('vm'); class El { constructor(tag) { this.tag = tag; this.options = []; this.selected = -1; this.value = ''; this.handlers = {}; this.children = []; this.text = ''; } } function wrap(el) { const w = { el: el, append(x) { if (typeof x === 'string') { const m = x.match(/^