var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var ASC; (function (ASC) { var ui; (function (ui_1) { function getFocusedDialog() { var $ds = $j('div.ui-dialog,div.yui-dialog'); if ($ds.length != 0) return $ds.last().get(0); return null; } ui_1.getFocusedDialog = getFocusedDialog; function autocomplete_data2items(data) { var items = []; for (var i = 0; i < data.length; i++) { var item = ASC.clone(data[i]); var l = '' + item.name; if (item.code) l += ' ' + item.code; if (item.code2) l += ' ' + item.code2; item.label = l; items.push(item); } return items; } ui_1.autocomplete_data2items = autocomplete_data2items; function autocomplete_renderItem(ul, item) { var $li = $j("